Merge "Title::getContentModel(): load from DB if necessary"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 0294c42..57fdab3 100644 (file)
@@ -352,17 +352,10 @@ abstract class Installer {
        abstract public function showError( $msg /*, ... */ );
 
        /**
-        * Shows messages to the user through a Status object
+        * Show a message to the installing user by using a Status object
         * @param Status $status
         */
-       public function showStatusMessage( Status $status ) {
-               $errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
-               if ( $errors ) {
-                       foreach ( $errors as $error ) {
-                               call_user_func( 'showMessage', $error );
-                       }
-               }
-       }
+       abstract public function showStatusMessage( Status $status );
 
        /**
         * Constructor, always call this from child classes.
@@ -536,6 +529,14 @@ abstract class Installer {
        public static function getExistingLocalSettings() {
                global $IP;
 
+               // You might be wondering why this is here. Well if you don't do this
+               // then some poorly-formed extensions try to call their own classes
+               // after immediately registering them. We really need to get extension
+               // registration out of the global scope and into a real format.
+               // @see https://bugzilla.wikimedia.org/67440
+               global $wgAutoloadClasses;
+               $wgAutoloadClasses = array();
+
                wfSuppressWarnings();
                $_lsExists = file_exists( "$IP/LocalSettings.php" );
                wfRestoreWarnings();
@@ -1281,8 +1282,8 @@ abstract class Installer {
         *
         * Used only by environment checks.
         *
-        * @param string $path path to search
-        * @param array $names of executable names
+        * @param string $path Path to search
+        * @param array $names Array of executable names
         * @param array|bool $versionInfo False or array with two members:
         *   0 => Command to run for version check, with $1 for the full executable name
         *   1 => String to compare the output with