summaryrefslogtreecommitdiff
path: root/includes/resourceloader/ResourceLoaderEditToolbarModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/resourceloader/ResourceLoaderEditToolbarModule.php')
-rw-r--r--includes/resourceloader/ResourceLoaderEditToolbarModule.php31
1 files changed, 8 insertions, 23 deletions
diff --git a/includes/resourceloader/ResourceLoaderEditToolbarModule.php b/includes/resourceloader/ResourceLoaderEditToolbarModule.php
index d79174cd..da729fdc 100644
--- a/includes/resourceloader/ResourceLoaderEditToolbarModule.php
+++ b/includes/resourceloader/ResourceLoaderEditToolbarModule.php
@@ -56,7 +56,7 @@ class ResourceLoaderEditToolbarModule extends ResourceLoaderFileModule {
// This is very conveniently formatted and we can pass it right through
$vars = $language->getImageFiles();
- // lessc tries to be helpful and parse our variables as LESS source code
+ // less.php tries to be helpful and parse our variables as LESS source code
foreach ( $vars as $key => &$value ) {
$value = self::cssSerializeString( $value );
}
@@ -65,25 +65,10 @@ class ResourceLoaderEditToolbarModule extends ResourceLoaderFileModule {
}
/**
- * @param ResourceLoaderContext $context
- * @return int UNIX timestamp
- */
- public function getModifiedTime( ResourceLoaderContext $context ) {
- return max(
- parent::getModifiedTime( $context ),
- $this->getHashMtime( $context )
- );
- }
-
- /**
- * @param ResourceLoaderContext $context
- * @return string Hash
+ * @return bool
*/
- public function getModifiedHash( ResourceLoaderContext $context ) {
- return md5(
- parent::getModifiedHash( $context ) .
- serialize( $this->getLessVars( $context ) )
- );
+ public function enableModuleContentVersion() {
+ return true;
}
/**
@@ -93,11 +78,11 @@ class ResourceLoaderEditToolbarModule extends ResourceLoaderFileModule {
*
* @throws MWException
* @param ResourceLoaderContext $context
- * @return lessc
+ * @return Less_Parser
*/
protected function getLessCompiler( ResourceLoaderContext $context = null ) {
- $compiler = parent::getLessCompiler();
- $compiler->setVariables( $this->getLessVars( $context ) );
- return $compiler;
+ $parser = parent::getLessCompiler();
+ $parser->ModifyVars( $this->getLessVars( $context ) );
+ return $parser;
}
}