<?php
-
-class OracleInstaller extends InstallerDBType {
+/**
+ * Oracle-specific installer.
+ *
+ * @file
+ * @ingroup Deployment
+ */
+
+/**
+ * Class for setting up the MediaWiki database using Oracle.
+ *
+ * @ingroup Deployment
+ * @since 1.17
+ */
+class OracleInstaller extends DatabaseInstaller {
protected $globalNames = array(
'wgDBport',
'_InstallPassword' => '',
);
- function getName() {
+ public function getName() {
return 'oracle';
}
return self::checkExtension( 'oci8' );
}
- function getConnectForm() {
+ public function getConnectForm() {
return
Xml::openElement( 'fieldset' ) .
Xml::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
$this->getInstallUserBox();
}
- function submitConnectForm() {
+ public function submitConnectForm() {
// Get variables from the request
$newValues = $this->setVarsFromRequest( array( 'wgDBname', 'wgDBprefix' ) );
return $status;
}
+ public function getConnection() {
+ $status = Status::newGood();
+ try {
+ $this->db = new DatabaseOracle(
+ $this->getVar( 'wgDBserver' ),
+ $this->getVar( '_InstallUser' ),
+ $this->getVar( '_InstallPassword' ),
+ false,
+ false,
+ 0,
+ $this->getVar( 'wgDBprefix' )
+ );
+ $status->value = $this->db;
+ } catch ( DBConnectionError $e ) {
+ $status->fatal( 'config-connection-error', $e->getMessage() );
+ }
+ return $status;
+ }
- function getSettingsForm() {}
-
- function submitSettingsForm() {}
-
- function getConnection() {}
-
- function setupDatabase() {}
-
- function createTables() {}
+ public function setupDatabase() {
+ // TODO
+ }
- function getLocalSettings() {
+ public function getLocalSettings() {
$prefix = $this->getVar( 'wgDBprefix' );
return
"# Oracle specific settings
\$wgDBprefix = \"{$prefix}\";";
}
-}
+
+ public function doUpgrade() {
+ // TODO
+ return false;
+ }
+}
\ No newline at end of file