Merge "Add columns option to Special:PrefixIndex"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 9fbf088..48f850f 100644 (file)
@@ -102,6 +102,7 @@ abstract class Installer {
                'mysql',
                'postgres',
                'oracle',
+               'mssql',
                'sqlite',
        );
 
@@ -116,11 +117,9 @@ abstract class Installer {
                'envCheckDB',
                'envCheckRegisterGlobals',
                'envCheckBrokenXML',
-               'envCheckPHP531',
                'envCheckMagicQuotes',
                'envCheckMagicSybase',
                'envCheckMbstring',
-               'envCheckZE1',
                'envCheckSafeMode',
                'envCheckXML',
                'envCheckPCRE',
@@ -347,15 +346,14 @@ abstract class Installer {
         * Constructor, always call this from child classes.
         */
        public function __construct() {
-               global $wgExtensionMessagesFiles, $wgUser;
+               global $wgMessagesDirs, $wgUser;
 
                // Disable the i18n cache and LoadBalancer
                Language::getLocalisationCache()->disableBackend();
                LBFactory::disableBackend();
 
-               // Load the installer's i18n file.
-               $wgExtensionMessagesFiles['MediawikiInstaller'] =
-                       __DIR__ . '/Installer.i18n.php';
+               // Load the installer's i18n.
+               $wgMessagesDirs['MediawikiInstaller'] = __DIR__ . '/i18n';
 
                // Having a user with id = 0 safeguards us from DB access via User::loadOptions().
                $wgUser = User::newFromId( 0 );
@@ -507,8 +505,7 @@ abstract class Installer {
        }
 
        /**
-        * Determine if LocalSettings.php exists. If it does, return its variables,
-        * merged with those from AdminSettings.php, as an array.
+        * Determine if LocalSettings.php exists. If it does, return its variables.
         *
         * @return Array
         */
@@ -526,9 +523,6 @@ abstract class Installer {
 
                require "$IP/includes/DefaultSettings.php";
                require "$IP/LocalSettings.php";
-               if ( file_exists( "$IP/AdminSettings.php" ) ) {
-                       require "$IP/AdminSettings.php";
-               }
 
                return get_defined_vars();
        }
@@ -647,15 +641,19 @@ abstract class Installer {
                if ( !$status->isOK() ) {
                        return $status;
                }
-               $status->value->insert( 'site_stats', array(
-                       'ss_row_id' => 1,
-                       'ss_total_views' => 0,
-                       'ss_total_edits' => 0,
-                       'ss_good_articles' => 0,
-                       'ss_total_pages' => 0,
-                       'ss_users' => 0,
-                       'ss_images' => 0 ),
-                       __METHOD__, 'IGNORE' );
+               $status->value->insert(
+                       'site_stats',
+                       array(
+                               'ss_row_id' => 1,
+                               'ss_total_views' => 0,
+                               'ss_total_edits' => 0,
+                               'ss_good_articles' => 0,
+                               'ss_total_pages' => 0,
+                               'ss_users' => 0,
+                               'ss_images' => 0
+                       ),
+                       __METHOD__, 'IGNORE'
+               );
 
                return Status::newGood();
        }
@@ -734,23 +732,6 @@ abstract class Installer {
                return true;
        }
 
-       /**
-        * Test PHP (probably 5.3.1, but it could regress again) to make sure that
-        * reference parameters to __call() are not converted to null
-        * @return bool
-        */
-       protected function envCheckPHP531() {
-               $test = new PhpRefCallBugTester;
-               $test->execute();
-               if ( !$test->ok ) {
-                       $this->showError( 'config-using531', phpversion() );
-
-                       return false;
-               }
-
-               return true;
-       }
-
        /**
         * Environment check for magic_quotes_runtime.
         * @return bool
@@ -793,20 +774,6 @@ abstract class Installer {
                return true;
        }
 
-       /**
-        * Environment check for zend.ze1_compatibility_mode.
-        * @return bool
-        */
-       protected function envCheckZE1() {
-               if ( wfIniGetBool( 'zend.ze1_compatibility_mode' ) ) {
-                       $this->showError( 'config-ze1' );
-
-                       return false;
-               }
-
-               return true;
-       }
-
        /**
         * Environment check for safe_mode.
         * @return bool