Merge "Don't link to title on "htmlform-title-not-exists""
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderFileModule.php
index e4def4d..1421b10 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Resource loader module based on local JavaScript/CSS files.
+ * ResourceLoader module based on local JavaScript/CSS files.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -73,15 +73,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         */
        protected $debugScripts = array();
 
-       /**
-        * @var array List of paths to JavaScript files to include in the startup module
-        * @par Usage:
-        * @code
-        * array( [file-path], [file-path], ... )
-        * @endcode
-        */
-       protected $loaderScripts = array();
-
        /**
         * @var array List of paths to CSS files to always include
         * @par Usage:
@@ -195,8 +186,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *         ),
         *         // Scripts to include in debug contexts
         *         'debugScripts' => [file path string or array of file path strings],
-        *         // Scripts to include in the startup module
-        *         'loaderScripts' => [file path string or array of file path strings],
         *         // Modules which must be loaded before this module
         *         'dependencies' => [module name string or array of module name strings],
         *         'templates' => array(
@@ -239,7 +228,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                                // Lists of file paths
                                case 'scripts':
                                case 'debugScripts':
-                               case 'loaderScripts':
                                case 'styles':
                                        $this->{$member} = (array)$option;
                                        break;
@@ -390,18 +378,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                return $this->debugRaw;
        }
 
-       /**
-        * Get loader script.
-        *
-        * @return string|bool JavaScript code to be added to startup module
-        */
-       public function getLoaderScript() {
-               if ( count( $this->loaderScripts ) === 0 ) {
-                       return false;
-               }
-               return $this->readScriptFiles( $this->loaderScripts );
-       }
-
        /**
         * Get all styles for a given context.
         *
@@ -551,8 +527,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        $this->templates,
                        $context->getDebug() ? $this->debugScripts : array(),
                        $this->getLanguageScripts( $context->getLanguage() ),
-                       self::tryForKey( $this->skinScripts, $context->getSkin(), 'default' ),
-                       $this->loaderScripts
+                       self::tryForKey( $this->skinScripts, $context->getSkin(), 'default' )
                );
                if ( $this->skipFunction ) {
                        $files[] = $this->skipFunction;
@@ -592,7 +567,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                        // - position (only used by OutputPage)
                        'scripts',
                        'debugScripts',
-                       'loaderScripts',
                        'styles',
                        'languageScripts',
                        'skinScripts',
@@ -961,7 +935,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                static $cache;
 
                if ( !$cache ) {
-                       $cache = ObjectCache::newAccelerator( CACHE_ANYTHING );
+                       $cache = ObjectCache::getLocalServerInstance( CACHE_ANYTHING );
                }
 
                // Construct a cache key from the LESS file name and a hash digest