X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=8160e3d3dc1a4634c82c649b497d4cc738f61fc2;hb=bf1168b8cde7145ce4c85ba9bcb765494c288823;hp=987925c747a413f82a4082d9dadbc4637113e644;hpb=793d0cec58cbd738d4c4682db3a856f24de11c47;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 987925c747..8160e3d3dc 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -286,27 +286,27 @@ abstract class Installer { public $licenses = array( 'cc-by' => array( 'url' => 'http://creativecommons.org/licenses/by/3.0/', - 'icon' => '{$wgStylePath}/common/images/cc-by.png', + 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by.png', ), 'cc-by-sa' => array( 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/', - 'icon' => '{$wgStylePath}/common/images/cc-by-sa.png', + 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by-sa.png', ), 'cc-by-nc-sa' => array( 'url' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/', - 'icon' => '{$wgStylePath}/common/images/cc-by-nc-sa.png', + 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-by-nc-sa.png', ), 'cc-0' => array( 'url' => 'https://creativecommons.org/publicdomain/zero/1.0/', - 'icon' => '{$wgStylePath}/common/images/cc-0.png', + 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/cc-0.png', ), 'pd' => array( 'url' => '', - 'icon' => '{$wgStylePath}/common/images/public-domain.png', + 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/public-domain.png', ), 'gfdl' => array( 'url' => 'http://www.gnu.org/copyleft/fdl.html', - 'icon' => '{$wgStylePath}/common/images/gnu-fdl.png', + 'icon' => '{$wgResourceBasePath}/resources/assets/licenses/gnu-fdl.png', ), 'none' => array( 'url' => '', @@ -1468,6 +1468,22 @@ abstract class Installer { return $exts; } + /** + * Returns a default value to be used for $wgDefaultSkin: the preferred skin, if available among + * the installed skins, or any other one otherwise. + * + * @param string[] $skinNames Names of installed skins. + * @return string + */ + public function getDefaultSkin( array $skinNames ) { + $defaultSkin = $GLOBALS['wgDefaultSkin']; + if ( in_array( $defaultSkin, $skinNames ) ) { + return $defaultSkin; + } else { + return $skinNames[0]; + } + } + /** * Installs the auto-detected extensions. * @@ -1772,11 +1788,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 ); - }; } /**