3 class OracleInstaller
extends InstallerDBType
{
5 protected $globalNames = array(
13 protected $internalDefaults = array(
14 '_InstallUser' => 'sys',
15 '_InstallPassword' => '',
22 function isCompiled() {
23 return $this->checkExtension( 'oci8' );
26 function getConnectForm() {
28 Xml
::openElement( 'fieldset' ) .
29 Xml
::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
30 $this->getTextBox( 'wgDBname', 'config-db-name' ) .
31 $this->parent
->getHelpBox( 'config-db-name-help' ) .
32 $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
33 $this->parent
->getHelpBox( 'config-db-prefix-help' ) .
34 Xml
::closeElement( 'fieldset' ) .
35 $this->getInstallUserBox();
38 function submitConnectForm() {
39 // Get variables from the request
40 $newValues = $this->setVarsFromRequest( array( 'wgDBname', 'wgDBprefix' ) );
43 $status = Status
::newGood();
44 if ( !strlen( $newValues['wgDBname'] ) ) {
45 $status->fatal( 'config-missing-db-name' );
46 } elseif ( !preg_match( '/^[a-zA-Z0-9_]+$/', $newValues['wgDBname'] ) ) {
47 $status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] );
49 if ( !preg_match( '/^[a-zA-Z0-9_]*$/', $newValues['wgDBprefix'] ) ) {
50 $status->fatal( 'config-invalid-schema', $newValues['wgDBprefix'] );
54 if ( $status->isOK() ) {
55 $status->merge( $this->submitInstallUserBox() );
57 if ( !$status->isOK() ) {
62 if ( $status->isOK() ) {
63 $status->merge( $this->attemptConnection() );
65 if ( !$status->isOK() ) {
71 $version = $this->conn->getServerVersion();
72 if ( version_compare( $version, $this->minimumVersion ) < 0 ) {
73 return Status::newFatal( 'config-postgres-old', $this->minimumVersion, $version );
80 function getSettingsForm() {}
82 function submitSettingsForm() {}
84 function getConnection() {}
86 function setupDatabase() {}
88 function createTables() {}
90 function getLocalSettings() {
91 $prefix = $this->getVar( 'wgDBprefix' );
93 "# Oracle specific settings
94 \$wgDBprefix = \"{$prefix}\";";