Index: branches/resourceloader/phase3/includes/ResourceLoader.php |
— | — | @@ -208,12 +208,6 @@ |
209 | 209 | $includeMessages = true; |
210 | 210 | } |
211 | 211 | |
212 | | - // Set parameters on all modules |
213 | | - // FIXME: This sucks |
214 | | - foreach ( self::$modules as $module ) { |
215 | | - $module->setParameters( $parameters ); |
216 | | - } |
217 | | - |
218 | 212 | // Build a list of requested modules excluding unrecognized ones which are collected into a list used to |
219 | 213 | // register the unrecognized modules with error status later on |
220 | 214 | $modules = array(); |
Index: branches/resourceloader/phase3/includes/ResourceLoaderModule.php |
— | — | @@ -207,16 +207,6 @@ |
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |
211 | | - * Set parameters used for obtaining this module. Ignored in this class |
212 | | - * but used in subclasses. |
213 | | - * |
214 | | - * FIXME: This is ugly and should ideally be killed with fire. I just don't know how else to do skin JS ATM. |
215 | | - */ |
216 | | - public function setParameters( $params ) { |
217 | | - $this->parameters = $params; |
218 | | - } |
219 | | - |
220 | | - /** |
221 | 211 | * Get the primary JS for this module. This is pulled from the |
222 | 212 | * script files added through addScripts() |
223 | 213 | * @return string JS |
— | — | @@ -316,15 +306,6 @@ |
317 | 307 | } |
318 | 308 | |
319 | 309 | /** |
320 | | - * Get a parameter previously set through setParameters() |
321 | | - * @param $param string Parameter name |
322 | | - * @return mixed Parameter value or null if not set |
323 | | - */ |
324 | | - public function getParameter( $param ) { |
325 | | - return isset( $this->parameters[$param] ) ? $this->parameters[$param] : null; |
326 | | - } |
327 | | - |
328 | | - /** |
329 | 310 | * Get the contents of a set of files and concatenate them, with |
330 | 311 | * newlines in between. Each file is used only once. |
331 | 312 | * @param $files array Array of file names |
— | — | @@ -337,17 +318,17 @@ |
338 | 319 | } |
339 | 320 | |
340 | 321 | class ResourceLoaderSiteJSModule extends ResourceLoaderModule { |
341 | | - public function getScript() { |
342 | | - return Skin::newFromKey( $this->getParameter( 'skin' ) )->generateUserJs(); |
| 322 | + public function getSkinScript( $skin ) { |
| 323 | + return Skin::newFromKey( $skin )->generateUserJs(); |
343 | 324 | } |
344 | 325 | |
345 | 326 | // Dummy overrides to return emptyness |
| 327 | + public function getScript() { return ''; } |
346 | 328 | public function getStyle() { return ''; } |
347 | 329 | public function getMessages() { return array(); } |
348 | 330 | public function getDependencies() { return array(); } |
349 | 331 | public function getDebugScript() { return ''; } |
350 | 332 | public function getLanguageScript( $lang ) { return ''; } |
351 | | - public function getSkinScript( $skin ) { return ''; } |
352 | 333 | public function getSkinStyle( $skin ) { return ''; } |
353 | 334 | public function getLoaderScript() { return false; } |
354 | 335 | } |