X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderModule.php;h=298f1fef2379c68bf09d60f15a34400a7c114b1a;hb=5c51cb96eaea76d22b9c48928044a942c4be2feb;hp=1119cdbb08c6063a7b9b3a61759353bfab4b03e7;hpb=123d4122c84f4078de080046a1d2a4981dcdf4d7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 1119cdbb08..298f1fef23 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -407,9 +407,6 @@ abstract class ResourceLoaderModule { private static $jsParser; private static $parseCacheVersion = 1; - /** @var array Global LESS variables */ - private static $lessVars; - /** * Validate a given script file; if valid returns the original source. * If invalid, returns replacement JS source that throws an exception. @@ -457,42 +454,6 @@ abstract class ResourceLoaderModule { return self::$jsParser; } - /** - * @return lessc - */ - protected static function lessCompiler() { - global $wgResourceLoaderLESSFunctions, $wgResourceLoaderLESSImportPaths; - - $less = new lessc(); - $less->setPreserveComments( true ); - $less->setVariables( self::getLESSVars() ); - $less->setImportDir( $wgResourceLoaderLESSImportPaths ); - foreach ( $wgResourceLoaderLESSFunctions as $name => $func ) { - $less->registerFunction( $name, $func ); - } - // To ensure embedded resources are refreshed when their source files - // change, track the names and modification times of any files that - // were embedded as data URIs in the generated CSS source. - $less->embeddedFiles = array(); - return $less; - } - - /** - * Get global LESS variables. - * - * @return array: Map of variable names to string CSS values. - */ - protected static function getLESSVars() { - global $wgResourceLoaderLESSVars; - - if ( self::$lessVars === null ) { - self::$lessVars = $wgResourceLoaderLESSVars; - // Sort by key to ensure consistent hashing for cache lookups. - ksort( self::$lessVars ); - } - return self::$lessVars; - } - /** * Safe version of filemtime(), which doesn't throw a PHP warning if the file doesn't exist * but returns 1 instead.