Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/155294

Change subject: Consistently use 'Less' rather than 'LESS' in function names
......................................................................

Consistently use 'Less' rather than 'LESS' in function names

PHP function names are case-insensitive, so this is a fully
backwards-compatible change.

Change-Id: Ide04ad542ac5c3a26b6064093ae272cf9aeef2d1
---
M includes/resourceloader/ResourceLoader.php
M includes/resourceloader/ResourceLoaderFileModule.php
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/94/155294/1

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 198420c..c200408 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -1481,7 +1481,7 @@
 
                $less = new lessc();
                $less->setPreserveComments( true );
-               $less->setVariables( self::getLESSVars( $config ) );
+               $less->setVariables( self::getLessVars( $config ) );
                $less->setImportDir( $config->get( 
'ResourceLoaderLESSImportPaths' ) );
                foreach ( $config->get( 'ResourceLoaderLESSFunctions' ) as 
$name => $func ) {
                        $less->registerFunction( $name, $func );
@@ -1496,7 +1496,7 @@
         * @since 1.22
         * @return array Map of variable names to string CSS values.
         */
-       public static function getLESSVars( Config $config ) {
+       public static function getLessVars( Config $config ) {
                $lessVars = $config->get( 'ResourceLoaderLESSVars' );
                // Sort by key to ensure consistent hashing for cache lookups.
                ksort( $lessVars );
diff --git a/includes/resourceloader/ResourceLoaderFileModule.php 
b/includes/resourceloader/ResourceLoaderFileModule.php
index 8a223b0..9fdeb91 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -859,7 +859,7 @@
                }
 
                if ( $this->getStyleSheetLang( $localPath ) === 'less' ) {
-                       $style = $this->compileLESSFile( $localPath );
+                       $style = $this->compileLessFile( $localPath );
                        $this->hasGeneratedStyles = true;
                } else {
                        $style = file_get_contents( $localPath );
@@ -908,8 +908,8 @@
         * @param string $fileName File name of root LESS file.
         * @return string Cache key
         */
-       protected function getLESSCacheKey( $fileName ) {
-               $vars = json_encode( ResourceLoader::getLESSVars( 
$this->getConfig() ) );
+       protected function getLessCacheKey( $fileName ) {
+               $vars = json_encode( ResourceLoader::getLessVars( 
$this->getConfig() ) );
                $hash = md5( $fileName . $vars );
                return wfMemcKey( 'resourceloader', 'less', $hash );
        }
@@ -929,8 +929,8 @@
         * @param string $fileName File path of LESS source
         * @return string CSS source
         */
-       protected function compileLESSFile( $fileName ) {
-               $key = $this->getLESSCacheKey( $fileName );
+       protected function compileLessFile( $fileName ) {
+               $key = $this->getLessCacheKey( $fileName );
                $cache = wfGetCache( CACHE_ANYTHING );
 
                // The input to lessc. Either an associative array representing 
the

-- 
To view, visit https://gerrit.wikimedia.org/r/155294
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide04ad542ac5c3a26b6064093ae272cf9aeef2d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to