Patched jquery-1.4.2 to not crash in IE7 when a style property is set with 'null...
[mediawiki.git] / includes / installer / OracleInstaller.php
bloba97e1d9ffc82a46a3546e3e42108ec590353a591
1 <?php
3 class OracleInstaller extends InstallerDBType {
5 protected $globalNames = array(
6 'wgDBport',
7 'wgDBname',
8 'wgDBuser',
9 'wgDBpassword',
10 'wgDBprefix',
13 protected $internalDefaults = array(
14 '_InstallUser' => 'sys',
15 '_InstallPassword' => '',
18 function getName() {
19 return 'oracle';
22 function isCompiled() {
23 return $this->checkExtension( 'oci8' );
26 function getConnectForm() {
27 return
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' ) );
42 // Validate them
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'] );
53 // Submit user box
54 if ( $status->isOK() ) {
55 $status->merge( $this->submitInstallUserBox() );
57 if ( !$status->isOK() ) {
58 return $status;
61 // Try to connect
62 if ( $status->isOK() ) {
63 $status->merge( $this->attemptConnection() );
65 if ( !$status->isOK() ) {
66 return $status;
69 // Check version
71 $version = $this->conn->getServerVersion();
72 if ( version_compare( $version, $this->minimumVersion ) < 0 ) {
73 return Status::newFatal( 'config-postgres-old', $this->minimumVersion, $version );
76 return $status;
80 function getSettingsForm() {}
82 function submitSettingsForm() {}
84 function getConnection() {}
86 function setupDatabase() {}
88 function createTables() {}
90 function getLocalSettings() {
91 $prefix = $this->getVar( 'wgDBprefix' );
92 return
93 "# Oracle specific settings
94 \$wgDBprefix = \"{$prefix}\";";