Merge "Use MediaWiki\SuppressWarnings around trigger_error('') instead @"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderFileModule.php
index b2ca291..42bd66a 100644 (file)
@@ -460,9 +460,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        throw new MWException( __METHOD__ . ": skip function file not found: \"$localPath\"" );
                }
                $contents = $this->stripBom( file_get_contents( $localPath ) );
-               if ( $this->getConfig()->get( 'ResourceLoaderValidateStaticJS' ) ) {
-                       $contents = $this->validateScriptFile( $localPath, $contents );
-               }
                return $contents;
        }
 
@@ -807,12 +804,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                                throw new MWException( __METHOD__ . ": script file not found: \"$localPath\"" );
                        }
                        $contents = $this->stripBom( file_get_contents( $localPath ) );
-                       if ( $this->getConfig()->get( 'ResourceLoaderValidateStaticJS' ) ) {
-                               // Static files don't really need to be checked as often; unlike
-                               // on-wiki module they shouldn't change unexpectedly without
-                               // admin interference.
-                               $contents = $this->validateScriptFile( $fileName, $contents );
-                       }
                        $js .= $contents . "\n";
                }
                return $js;
@@ -959,10 +950,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        $cache = ObjectCache::getLocalServerInstance( CACHE_ANYTHING );
                }
 
-               $vars = array_merge(
-                       $context->getResourceLoader()->getLessVars(),
-                       $this->getLessVars( $context )
-               );
+               $vars = $this->getLessVars( $context );
                // Construct a cache key from the LESS file name, and a hash digest
                // of the LESS variables used for compilation.
                ksort( $vars );