Added some __METHOD__ to DatabaseBase::query() calls
[lhc/web/wiklou.git] / includes / installer / OracleInstaller.php
index 5392368..84d89f5 100644 (file)
@@ -1,5 +1,11 @@
 <?php
-
+/**
+ * Oracle-specific installer.
+ *
+ * @file
+ * @ingroup Deployment
+ */
 /**
  * Class for setting up the MediaWiki database using Oracle.
  * 
@@ -82,32 +88,38 @@ class OracleInstaller extends DatabaseInstaller {
                return $status;
        }
 
-
-       public function getSettingsForm() {
-               // TODO
-       }
-       
-       public function submitSettingsForm() {
-               // TODO
-       }
-
        public function getConnection() {
-               // TODO
+               $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;
        }
 
        public function setupDatabase() {
                // TODO
        }
 
-       public function createTables() {
-               // TODO
-       }
-
        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