Merge "mediawiki.ui: checkbox: Correct alignment of long labels"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index f84ed00..dc52554 100644 (file)
@@ -225,7 +225,7 @@ abstract class Installer {
 
                // $wgLogo is probably wrong (bug 48084); set something that will work.
                // Single quotes work fine here, as LocalSettingsGenerator outputs this unescaped.
-               'wgLogo' => '$wgStylePath/common/images/wiki.png',
+               'wgLogo' => '$wgScriptPath/resources/assets/wiki.png',
        );
 
        /**
@@ -674,7 +674,6 @@ abstract class Installer {
                        'site_stats',
                        array(
                                'ss_row_id' => 1,
-                               'ss_total_views' => 0,
                                'ss_total_edits' => 0,
                                'ss_good_articles' => 0,
                                'ss_total_pages' => 0,
@@ -728,7 +727,7 @@ abstract class Installer {
                }
                $databases = array_flip( $databases );
                if ( !$databases ) {
-                       $this->showError( 'config-no-db', $wgLang->commaList( $allNames ) );
+                       $this->showError( 'config-no-db', $wgLang->commaList( $allNames ), count( $allNames ) );
 
                        // @todo FIXME: This only works for the web installer!
                        return false;
@@ -898,11 +897,12 @@ abstract class Installer {
        }
 
        /**
-        * Scare user to death if they have mod_security
+        * Scare user to death if they have mod_security or mod_security2
         * @return bool
         */
        protected function envCheckModSecurity() {
-               if ( self::apacheModulePresent( 'mod_security' ) ) {
+               if ( self::apacheModulePresent( 'mod_security' )
+                       || self::apacheModulePresent( 'mod_security2' ) ) {
                        $this->showMessage( 'config-mod-security' );
                }
 
@@ -1377,7 +1377,7 @@ abstract class Installer {
 
                                try {
                                        $text = Http::get( $url . $file, array( 'timeout' => 3 ) );
-                               } catch ( MWException $e ) {
+                               } catch ( Exception $e ) {
                                        // Http::get throws with allow_url_fopen = false and no curl extension.
                                        $text = null;
                                }
@@ -1469,15 +1469,16 @@ abstract class Installer {
        }
 
        /**
-        * Returns a default value to be used for $wgDefaultSkin: the preferred skin, if available among
-        * the installed skins, or any other one otherwise.
+        * Returns a default value to be used for $wgDefaultSkin: normally the one set in DefaultSettings,
+        * but will fall back to another if the default skin is missing and some other one is present
+        * instead.
         *
         * @param string[] $skinNames Names of installed skins.
         * @return string
         */
        public function getDefaultSkin( array $skinNames ) {
                $defaultSkin = $GLOBALS['wgDefaultSkin'];
-               if ( in_array( $defaultSkin, $skinNames ) ) {
+               if ( !$skinNames || in_array( $defaultSkin, $skinNames ) ) {
                        return $defaultSkin;
                } else {
                        return $skinNames[0];
@@ -1753,7 +1754,7 @@ abstract class Installer {
                                false,
                                User::newFromName( 'MediaWiki default' )
                        );
-               } catch ( MWException $e ) {
+               } catch ( Exception $e ) {
                        //using raw, because $wgShowExceptionDetails can not be set yet
                        $status->fatal( 'config-install-mainpage-failed', $e->getMessage() );
                }
@@ -1788,11 +1789,6 @@ abstract class Installer {
 
                // Some of the environment checks make shell requests, remove limits
                $GLOBALS['wgMaxShellMemory'] = 0;
-
-               // Don't bother embedding images into generated CSS, which is not cached
-               $GLOBALS['wgResourceLoaderLESSFunctions']['embeddable'] = function ( $frame, $less ) {
-                       return $less->toBool( false );
-               };
        }
 
        /**