Merge "ApiQueryRevisions: Remove bogus query optimization"
[lhc/web/wiklou.git] / includes / installer / MssqlInstaller.php
index 51db148..5a8403f 100644 (file)
@@ -218,6 +218,7 @@ class MssqlInstaller extends DatabaseInstaller {
                                'password' => $password,
                                'dbname' => false,
                                'flags' => 0,
+                               'schema' => $this->getVar( 'wgDBmwschema' ),
                                'tablePrefix' => $this->getVar( 'wgDBprefix' ) ) );
                        $db->prepareStatements( false );
                        $db->scrollableCursor( false );
@@ -648,6 +649,14 @@ class MssqlInstaller extends DatabaseInstaller {
                return $status;
        }
 
+       public function getGlobalDefaults() {
+               // The default $wgDBmwschema is null, which breaks Postgres and other DBMSes that require
+               // the use of a schema, so we need to set it here
+               return array_merge( parent::getGlobalDefaults(), array(
+                       'wgDBmwschema' => 'mediawiki',
+               ) );
+       }
+
        /**
         * Try to see if the login exists
         * @param string $user Username to check
@@ -693,7 +702,7 @@ class MssqlInstaller extends DatabaseInstaller {
        /**
         * Try to see if a given fulltext catalog exists
         * We assume we already have the appropriate database selected
-        * @param string $schemaName Catalog name to check
+        * @param string $catalogName Catalog name to check
         * @return bool
         */
        private function catalogExists( $catalogName ) {