r71631 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71630‎ | r71631 | r71632 >
Date:17:26, 25 August 2010
Author:catrope
Status:deferred
Tags:
Comment:
resourceloader: Abolishing the concept of a raw module. This currently breaks stuff but will be replaced by another concept shortly
Modified paths:
  • /branches/resourceloader/phase3/includes/ResourceLoaderModule.php (modified) (history)
  • /branches/resourceloader/phase3/resources/Resources.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/ResourceLoaderModule.php
@@ -29,7 +29,6 @@
3030 private $languageScripts = array();
3131 private $skinStyles = array();
3232 private $loaders = array();
33 - private $raw = false;
3433 private $parameters = array();
3534
3635 /* Public methods */
@@ -71,9 +70,6 @@
7271 case 'loaders':
7372 $this->loaders = (array)$value;
7473 break;
75 - case 'raw':
76 - $this->raw = (bool)$value;
77 - break;
7874 }
7975 }
8076 }
@@ -175,20 +171,6 @@
176172 }
177173
178174 /**
179 - * Set this module's raw flag. Raw modules are loaded before the
180 - * mediaWiki object and are not wrapped in any loading code.
181 - * They can only have scripts and debug scripts, nothing else.
182 - * Raw module can still be used as dependencies for other modules.
183 - *
184 - * Modules are non-raw by default.
185 - *
186 - * @param $raw bool If true, mark this module as raw, if false, mark it non-raw
187 - */
188 - public function setRaw( $raw = true ) {
189 - $this->raw = (bool)$raw;
190 - }
191 -
192 - /**
193175 * Set parameters used for obtaining this module. Ignored in this class
194176 * but used in subclasses.
195177 *
@@ -283,15 +265,6 @@
284266 }
285267
286268 /**
287 - * Check whether this module is in raw mode. See setRaw() for details
288 - * on what raw mode is.
289 - * @return bool
290 - */
291 - public function isRaw() {
292 - return $this->raw;
293 - }
294 -
295 - /**
296269 * Get a parameter previously set through setParameters()
297270 * @param $param string Parameter name
298271 * @return mixed Parameter value or null if not set
@@ -325,5 +298,4 @@
326299 public function getLanguageScript( $lang ) { return ''; }
327300 public function getSkinStyle( $skin ) { return ''; }
328301 public function getLoaderScript() { return false; }
329 - public function isRaw() { return true; }
330302 }
Index: branches/resourceloader/phase3/resources/Resources.php
@@ -7,7 +7,7 @@
88
99 /* jQuery */
1010
11 - 'jquery' => array( 'scripts' => 'resources/jquery/jquery.js', 'raw' => true ),
 11+ 'jquery' => array( 'scripts' => 'resources/jquery/jquery.js' ),
1212
1313 /* jQuery Plugins */
1414
@@ -250,7 +250,6 @@
251251 'mediawiki' => array(
252252 'scripts' => 'resources/mediawiki/mediawiki.js',
253253 'debugScripts' => 'resources/mediawiki/mediawiki.log.js',
254 - 'raw' => true,
255254 ),
256255
257256 /* MediaWiki Legacy */

Status & tagging log