r76119 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76118‎ | r76119 | r76120 >
Date:18:33, 5 November 2010
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Fixed Doxygen incompatible JSDoc style comments (bad Trevor!) as per some comments on r75036.
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderModule.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderSiteModule.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderUserOptionsModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderSiteModule.php
@@ -30,7 +30,7 @@
3131 /**
3232 * Gets list of pages used by this module
3333 *
34 - * @return {array} List of pages
 34+ * @return Array: List of pages
3535 */
3636 protected function getPages( ResourceLoaderContext $context ) {
3737 global $wgHandheldStyle;
@@ -56,7 +56,7 @@
5757 /**
5858 * Gets group name
5959 *
60 - * @return {string} Name of group
 60+ * @return String: Name of group
6161 */
6262 public function getGroup() {
6363 return 'site';
Index: trunk/phase3/includes/resourceloader/ResourceLoader.php
@@ -30,7 +30,7 @@
3131
3232 /* Protected Static Members */
3333
34 - /** @var {array} List of module name/ResourceLoaderModule object pairs */
 34+ /** Array: List of module name/ResourceLoaderModule object pairs */
3535 protected $modules = array();
3636
3737 /* Protected Methods */
@@ -46,8 +46,8 @@
4747 * requests its own information. This sacrifice of modularity yields a profound
4848 * performance improvement.
4949 *
50 - * @param $modules Array: list of module names to preload information for
51 - * @param $context ResourceLoaderContext: context to load the information within
 50+ * @param $modules Array: List of module names to preload information for
 51+ * @param $context ResourceLoaderContext: Context to load the information within
5252 */
5353 protected function preloadModuleInfo( array $modules, ResourceLoaderContext $context ) {
5454 if ( !count( $modules ) ) {
@@ -114,9 +114,9 @@
115115 * If $data is empty, only contains whitespace or the filter was unknown,
116116 * $data is returned unmodified.
117117 *
118 - * @param $filter String: name of filter to run
119 - * @param $data String: text to filter, such as JavaScript or CSS text
120 - * @return String: filtered data
 118+ * @param $filter String: Name of filter to run
 119+ * @param $data String: Text to filter, such as JavaScript or CSS text
 120+ * @return String: Filtered data
121121 */
122122 protected function filter( $filter, $data ) {
123123 global $wgMemc;
@@ -187,14 +187,13 @@
188188 /**
189189 * Registers a module with the ResourceLoader system.
190190 *
191 - * @param $name Mixed: string of name of module or array of name/object pairs
192 - * @param $object ResourceLoaderModule: module object (optional when using
193 - * multiple-registration calling style)
194 - * @throws MWException If a duplicate module registration is attempted
195 - * @throws MWException If something other than a ResourceLoaderModule is being
196 - * registered
197 - * @return Boolean: false if there were any errors, in which case one or more
198 - * modules were not registered
 191+ * @param $name Mixed: Name of module as a string or List of name/object pairs as an array
 192+ * @param $object ResourceLoaderModule: Module object (optional when using
 193+ * multiple-registration calling style)
 194+ * @throws MWException: If a duplicate module registration is attempted
 195+ * @throws MWException: If something other than a ResourceLoaderModule is being registered
 196+ * @return Boolean: False if there were any errors, in which case one or more modules were not
 197+ * registered
199198 */
200199 public function register( $name, ResourceLoaderModule $object = null ) {
201200
@@ -236,7 +235,7 @@
237236 /**
238237 * Gets a map of all modules and their options
239238 *
240 - * @return Array: array( modulename => ResourceLoaderModule )
 239+ * @return Array: List of modules keyed by module name
241240 */
242241 public function getModules() {
243242 return $this->modules;
@@ -245,7 +244,7 @@
246245 /**
247246 * Get the ResourceLoaderModule object for a given module name.
248247 *
249 - * @param $name String: module name
 248+ * @param $name String: Module name
250249 * @return Mixed: ResourceLoaderModule if module has been registered, null otherwise
251250 */
252251 public function getModule( $name ) {
@@ -255,7 +254,7 @@
256255 /**
257256 * Outputs a response to a resource load-request, including a content-type header.
258257 *
259 - * @param $context ResourceLoaderContext: context in which a response should be formed
 258+ * @param $context ResourceLoaderContext: Context in which a response should be formed
260259 */
261260 public function respond( ResourceLoaderContext $context ) {
262261 global $wgResourceLoaderMaxage, $wgCacheEpoch;
@@ -345,10 +344,10 @@
346345 /**
347346 * Generates code for a response
348347 *
349 - * @param $context ResourceLoaderContext: context in which to generate a response
350 - * @param $modules Array: list of module objects keyed by module name
351 - * @param $missing Array: list of unavailable modules (optional)
352 - * @return String: response data
 348+ * @param $context ResourceLoaderContext: Context in which to generate a response
 349+ * @param $modules Array: List of module objects keyed by module name
 350+ * @param $missing Array: List of unavailable modules (optional)
 351+ * @return String: Response data
353352 */
354353 public function makeModuleResponse( ResourceLoaderContext $context,
355354 array $modules, $missing = array() )
@@ -447,12 +446,12 @@
448447 * given properties.
449448 *
450449 * @param $name Module name
451 - * @param $scripts Array of JavaScript code snippets to be executed after the
 450+ * @param $scripts Array: List of JavaScript code snippets to be executed after the
452451 * module is loaded
453 - * @param $styles Associative array mapping media type to associated CSS string
454 - * @param $messages Messages associated with this module. May either be an
455 - * associative array mapping message key to value, or a JSON-encoded message blob
456 - * containing the same data, wrapped in an XmlJsCode object.
 452+ * @param $styles Array: List of CSS strings keyed by media type
 453+ * @param $messages Mixed: List of messages associated with this module. May either be an
 454+ * associative array mapping message key to value, or a JSON-encoded message blob containing
 455+ * the same data, wrapped in an XmlJsCode object.
457456 */
458457 public static function makeLoaderImplementScript( $name, $scripts, $styles, $messages ) {
459458 if ( is_array( $scripts ) ) {
@@ -471,9 +470,8 @@
472471 /**
473472 * Returns JS code which, when called, will register a given list of messages.
474473 *
475 - * @param $messages May either be an associative array mapping message key
476 - * to value, or a JSON-encoded message blob containing the same data,
477 - * wrapped in an XmlJsCode object.
 474+ * @param $messages Mixed: Either an associative array mapping message key to value, or a
 475+ * JSON-encoded message blob containing the same data, wrapped in an XmlJsCode object.
478476 */
479477 public static function makeMessageSetScript( $messages ) {
480478 return Xml::encodeJsCall( 'mediaWiki.messages.set', array( (object)$messages ) );
@@ -483,7 +481,7 @@
484482 * Combines an associative array mapping media type to CSS into a
485483 * single stylesheet with @media blocks.
486484 *
487 - * @param $styles Array of CSS strings
 485+ * @param $styles Array: List of CSS strings keyed by media type
488486 */
489487 public static function makeCombinedStyles( array $styles ) {
490488 $out = '';
@@ -517,11 +515,11 @@
518516 * which will have values corresponding to $name, $version, $dependencies
519517 * and $group as supplied.
520518 *
521 - * @param $name The module name
522 - * @param $version The module version string
523 - * @param $dependencies Array of module names on which this module depends
524 - * @param $group The group which the module is in.
525 - * @param $script The JS loader script
 519+ * @param $name String: Module name
 520+ * @param $version Integer: Module version number as a timestamp
 521+ * @param $dependencies Array: List of module names on which this module depends
 522+ * @param $group String: Group which the module is in.
 523+ * @param $script String: JavaScript code
526524 */
527525 public static function makeCustomLoaderScript( $name, $version, $dependencies, $group, $script ) {
528526 $script = str_replace( "\n", "\n\t", trim( $script ) );
@@ -547,10 +545,10 @@
548546 * ) ):
549547 * Registers modules with the given names and parameters.
550548 *
551 - * @param $name The module name
552 - * @param $version The module version string
553 - * @param $dependencies Array of module names on which this module depends
554 - * @param $group The group which the module is in.
 549+ * @param $name String: Module name
 550+ * @param $version Integer: Module version number as a timestamp
 551+ * @param $dependencies Array: List of module names on which this module depends
 552+ * @param $group String: group which the module is in.
555553 */
556554 public static function makeLoaderRegisterScript( $name, $version = null,
557555 $dependencies = null, $group = null )
@@ -568,7 +566,7 @@
569567 * Returns JS code which runs given JS code if the client-side framework is
570568 * present.
571569 *
572 - * @param $script JS code to run
 570+ * @param $script String: JavaScript code
573571 */
574572 public static function makeLoaderConditionalScript( $script ) {
575573 $script = str_replace( "\n", "\n\t", trim( $script ) );
@@ -579,7 +577,7 @@
580578 * Returns JS code which will set the MediaWiki configuration array to
581579 * the given value.
582580 *
583 - * @param $configuration Associative array of configuration parameters
 581+ * @param $configuration Array: List of configuration values keyed by variable name
584582 */
585583 public static function makeConfigSetScript( array $configuration ) {
586584 return Xml::encodeJsCall( 'mediaWiki.config.set', array( $configuration ) );
Index: trunk/phase3/includes/resourceloader/ResourceLoaderUserOptionsModule.php
@@ -50,8 +50,8 @@
5151 * Fetch the context's user options, or if it doesn't match current user,
5252 * the default options.
5353 *
54 - * @param $context ResourceLoaderContext
55 - * @return array
 54+ * @param $context ResourceLoaderContext: Context object
 55+ * @return Array: List of user options keyed by option name
5656 */
5757 protected function contextUserOptions( ResourceLoaderContext $context ) {
5858 global $wgUser;
Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php
@@ -27,67 +27,67 @@
2828
2929 /* Protected Members */
3030
31 - /** @var {string} Local base path, see __construct() */
 31+ /** String: Local base path, see __construct() */
3232 protected $localBasePath = '';
33 - /** @var {string} Remote base path, see __construct() */
 33+ /** String: Remote base path, see __construct() */
3434 protected $remoteBasePath = '';
3535 /**
36 - * @var {array} List of paths to JavaScript files to always include
37 - * @format array( [file-path], [file-path], ... )
 36+ * Array: List of paths to JavaScript files to always include
 37+ * @example array( [file-path], [file-path], ... )
3838 */
3939 protected $scripts = array();
4040 /**
41 - * @var {array} List of JavaScript files to include when using a specific language
42 - * @format array( [language-code] => array( [file-path], [file-path], ... ), ... )
 41+ * Array: List of JavaScript files to include when using a specific language
 42+ * @example array( [language-code] => array( [file-path], [file-path], ... ), ... )
4343 */
4444 protected $languageScripts = array();
4545 /**
46 - * @var {array} List of JavaScript files to include when using a specific skin
47 - * @format array( [skin-name] => array( [file-path], [file-path], ... ), ... )
 46+ * Array: List of JavaScript files to include when using a specific skin
 47+ * @example array( [skin-name] => array( [file-path], [file-path], ... ), ... )
4848 */
4949 protected $skinScripts = array();
5050 /**
51 - * @var {array} List of paths to JavaScript files to include in debug mode
52 - * @format array( [skin-name] => array( [file-path], [file-path], ... ), ... )
 51+ * Array: List of paths to JavaScript files to include in debug mode
 52+ * @example array( [skin-name] => array( [file-path], [file-path], ... ), ... )
5353 */
5454 protected $debugScripts = array();
5555 /**
56 - * @var {array} List of paths to JavaScript files to include in the startup module
57 - * @format array( [file-path], [file-path], ... )
 56+ * Array: List of paths to JavaScript files to include in the startup module
 57+ * @example array( [file-path], [file-path], ... )
5858 */
5959 protected $loaderScripts = array();
6060 /**
61 - * @var {array} List of paths to CSS files to always include
62 - * @format array( [file-path], [file-path], ... )
 61+ * Array: List of paths to CSS files to always include
 62+ * @example array( [file-path], [file-path], ... )
6363 */
6464 protected $styles = array();
6565 /**
66 - * @var {array} List of paths to CSS files to include when using specific skins
67 - * @format array( [file-path], [file-path], ... )
 66+ * Array: List of paths to CSS files to include when using specific skins
 67+ * @example array( [file-path], [file-path], ... )
6868 */
6969 protected $skinStyles = array();
7070 /**
71 - * @var {array} List of modules this module depends on
72 - * @format array( [file-path], [file-path], ... )
 71+ * Array: List of modules this module depends on
 72+ * @example array( [file-path], [file-path], ... )
7373 */
7474 protected $dependencies = array();
7575 /**
76 - * @var {array} List of message keys used by this module
77 - * @format array( [message-key], [message-key], ... )
 76+ * Array: List of message keys used by this module
 77+ * @example array( [message-key], [message-key], ... )
7878 */
7979 protected $messages = array();
80 - /** @var {string} Name of group to load this module in */
 80+ /** String: Name of group to load this module in */
8181 protected $group;
82 - /** @var {boolean} Link to raw files in debug mode */
 82+ /** Boolean: Link to raw files in debug mode */
8383 protected $debugRaw = true;
8484 /**
85 - * @var {array} Cache for mtime
86 - * @format array( [hash] => [mtime], [hash] => [mtime], ... )
 85+ * Array: Cache for mtime
 86+ * @example array( [hash] => [mtime], [hash] => [mtime], ... )
8787 */
8888 protected $modifiedTime = array();
8989 /**
90 - * @var {array} Place where readStyleFile() tracks file dependencies
91 - * @format array( [file-path], [file-path], ... )
 90+ * Array: Place where readStyleFile() tracks file dependencies
 91+ * @example array( [file-path], [file-path], ... )
9292 */
9393 protected $localFileRefs = array();
9494
@@ -96,14 +96,14 @@
9797 /**
9898 * Constructs a new module from an options array.
9999 *
100 - * @param {array} $options Options array. If not given or empty, an empty
101 - * module will be constructed
102 - * @param {string} $localBasePath base path to prepend to all local paths
103 - * in $options. Defaults to $IP
104 - * @param {string} $remoteBasePath base path to prepend to all remote paths
105 - * in $options. Defaults to $wgScriptPath
 100+ * @param $options Array: List of options; if not given or empty, an empty module will be
 101+ * constructed
 102+ * @param $localBasePath String: Base path to prepend to all local paths in $options. Defaults
 103+ * to $IP
 104+ * @param $remoteBasePath String: Base path to prepend to all remote paths in $options. Defaults
 105+ * to $wgScriptPath
106106 *
107 - * @format $options
 107+ * @example $options
108108 * array(
109109 * // Scripts to always include
110110 * 'scripts' => [file path string or array of file path strings],
@@ -188,8 +188,8 @@
189189 /**
190190 * Gets all scripts for a given context concatenated together.
191191 *
192 - * @param {ResourceLoaderContext} $context Context in which to generate script
193 - * @return {string} JavaScript code for $context
 192+ * @param $context ResourceLoaderContext: Context in which to generate script
 193+ * @return String: JavaScript code for $context
194194 */
195195 public function getScript( ResourceLoaderContext $context ) {
196196 global $wgServer;
@@ -216,7 +216,7 @@
217217 /**
218218 * Gets loader script.
219219 *
220 - * @return {string} JavaScript code to be added to startup module
 220+ * @return String: JavaScript code to be added to startup module
221221 */
222222 public function getLoaderScript() {
223223 if ( count( $this->loaderScripts ) == 0 ) {
@@ -228,8 +228,8 @@
229229 /**
230230 * Gets all styles for a given context concatenated together.
231231 *
232 - * @param {ResourceLoaderContext} $context Context in which to generate styles
233 - * @return {string} CSS code for $context
 232+ * @param $context ResourceLoaderContext: Context in which to generate styles
 233+ * @return String: CSS code for $context
234234 */
235235 public function getStyles( ResourceLoaderContext $context ) {
236236 // Merge general styles and skin specific styles, retaining media type collation
@@ -263,7 +263,7 @@
264264 /**
265265 * Gets list of message keys used by this module.
266266 *
267 - * @return {array} List of message keys
 267+ * @return Array: List of message keys
268268 */
269269 public function getMessages() {
270270 return $this->messages;
@@ -272,7 +272,7 @@
273273 /**
274274 * Gets the name of the group this module should be loaded in.
275275 *
276 - * @return {string} Group name
 276+ * @return String: Group name
277277 */
278278 public function getGroup() {
279279 return $this->group;
@@ -281,7 +281,7 @@
282282 /**
283283 * Gets list of names of modules this module depends on.
284284 *
285 - * @return {array} List of module names
 285+ * @return Array: List of module names
286286 */
287287 public function getDependencies() {
288288 return $this->dependencies;
@@ -296,10 +296,10 @@
297297 * calculations on files relevant to the given language, skin and debug
298298 * mode.
299299 *
300 - * @param {ResourceLoaderContext} $context Context in which to calculate
 300+ * @param $context ResourceLoaderContext: Context in which to calculate
301301 * the modified time
302 - * @return {integer} UNIX timestamp
303 - * @see {ResourceLoaderModule::getFileDependencies}
 302+ * @return Integer: UNIX timestamp
 303+ * @see ResourceLoaderModule::getFileDependencies
304304 */
305305 public function getModifiedTime( ResourceLoaderContext $context ) {
306306 if ( isset( $this->modifiedTime[$context->getHash()] ) ) {
@@ -365,9 +365,9 @@
366366 /**
367367 * Collates file paths by option (where provided).
368368 *
369 - * @param {array} $list List of file paths in any combination of index/path
 369+ * @param $list Array: List of file paths in any combination of index/path
370370 * or path/options pairs
371 - * @return {array} List of file paths, collated by $option
 371+ * @return Array: List of file paths, collated by $option
372372 */
373373 protected static function collateFilePathListByOption( array $list, $option, $default ) {
374374 $collatedFiles = array();
@@ -393,10 +393,10 @@
394394 /**
395395 * Gets a list of element that match a key, optionally using a fallback key.
396396 *
397 - * @param {array} $list List of lists to select from
398 - * @param {string} $key Key to look for in $map
399 - * @param {string} $fallback Key to look for in $list if $key doesn't exist
400 - * @return {array} List of elements from $map which matched $key or $fallback,
 397+ * @param $list Array: List of lists to select from
 398+ * @param $key String: Key to look for in $map
 399+ * @param $fallback String: Key to look for in $list if $key doesn't exist
 400+ * @return Array: List of elements from $map which matched $key or $fallback,
401401 * or an empty list in case of no match
402402 */
403403 protected static function tryForKey( array $list, $key, $fallback = null ) {
@@ -414,8 +414,8 @@
415415 /**
416416 * Gets the contents of a list of JavaScript files.
417417 *
418 - * @param {array} $scripts List of file paths to scripts to read, remap and concetenate
419 - * @return {string} Concatenated and remapped JavaScript data from $scripts
 418+ * @param $scripts Array: List of file paths to scripts to read, remap and concetenate
 419+ * @return String: Concatenated and remapped JavaScript data from $scripts
420420 */
421421 protected function readScriptFiles( array $scripts ) {
422422 if ( empty( $scripts ) ) {
@@ -436,8 +436,8 @@
437437 /**
438438 * Gets the contents of a list of CSS files.
439439 *
440 - * @param {array} $styles List of file paths to styles to read, remap and concetenate
441 - * @return {array} List of concatenated and remapped CSS data from $styles,
 440+ * @param $styles Array: List of file paths to styles to read, remap and concetenate
 441+ * @return Array: List of concatenated and remapped CSS data from $styles,
442442 * keyed by media type
443443 */
444444 protected function readStyleFiles( array $styles ) {
@@ -458,8 +458,8 @@
459459 *
460460 * This method can be used as a callback for array_map()
461461 *
462 - * @param {string} $path File path of script file to read
463 - * @return {string} CSS data in script file
 462+ * @param $path String: File path of script file to read
 463+ * @return String: CSS data in script file
464464 */
465465 protected function readStyleFile( $path ) {
466466 $localPath = $this->getLocalPath( $path );
Index: trunk/phase3/includes/resourceloader/ResourceLoaderModule.php
@@ -40,7 +40,7 @@
4141 * Get this module's name. This is set when the module is registered
4242 * with ResourceLoader::register()
4343 *
44 - * @return Mixed: name (string) or null if no name was set
 44+ * @return Mixed: Name (string) or null if no name was set
4545 */
4646 public function getName() {
4747 return $this->name;
@@ -50,7 +50,7 @@
5151 * Set this module's name. This is called by ResourceLodaer::register()
5252 * when registering the module. Other code should not call this.
5353 *
54 - * @param $name String: name
 54+ * @param $name String: Name
5555 */
5656 public function setName( $name ) {
5757 $this->name = $name;
@@ -67,8 +67,8 @@
6868 * Get all JS for this module for a given language and skin.
6969 * Includes all relevant JS except loader scripts.
7070 *
71 - * @param $context ResourceLoaderContext object
72 - * @return String: JS
 71+ * @param $context ResourceLoaderContext: Context object
 72+ * @return String: JavaScript code
7373 */
7474 public function getScript( ResourceLoaderContext $context ) {
7575 // Stub, override expected
@@ -78,8 +78,8 @@
7979 /**
8080 * Get all CSS for this module for a given skin.
8181 *
82 - * @param $context ResourceLoaderContext object
83 - * @return array: strings of CSS keyed by media type
 82+ * @param $context ResourceLoaderContext: Context object
 83+ * @return Array: List of CSS strings keyed by media type
8484 */
8585 public function getStyles( ResourceLoaderContext $context ) {
8686 // Stub, override expected
@@ -91,7 +91,7 @@
9292 *
9393 * To get a JSON blob with messages, use MessageBlobStore::get()
9494 *
95 - * @return array of message keys. Keys may occur more than once
 95+ * @return Array: List of message keys. Keys may occur more than once
9696 */
9797 public function getMessages() {
9898 // Stub, override expected
@@ -101,7 +101,7 @@
102102 /**
103103 * Get the group this module is in.
104104 *
105 - * @return string of group name
 105+ * @return String: Group name
106106 */
107107 public function getGroup() {
108108 // Stub, override expected
@@ -111,7 +111,7 @@
112112 /**
113113 * Get the loader JS for this module, if set.
114114 *
115 - * @return Mixed: loader JS (string) or false if no custom loader set
 115+ * @return Mixed: JavaScript loader code as a string or boolean false if no custom loader set
116116 */
117117 public function getLoaderScript() {
118118 // Stub, override expected
@@ -131,7 +131,7 @@
132132 *
133133 * To add dependencies dynamically on the client side, use a custom
134134 * loader script, see getLoaderScript()
135 - * @return Array of module names (strings)
 135+ * @return Array: List of module names as strings
136136 */
137137 public function getDependencies() {
138138 // Stub, override expected
@@ -142,8 +142,8 @@
143143 * Get the files this module depends on indirectly for a given skin.
144144 * Currently these are only image files referenced by the module's CSS.
145145 *
146 - * @param $skin String: skin name
147 - * @return array of files
 146+ * @param $skin String: Skin name
 147+ * @return Array: List of files
148148 */
149149 public function getFileDependencies( $skin ) {
150150 // Try in-object cache first
@@ -168,8 +168,8 @@
169169 /**
170170 * Set preloaded file dependency information. Used so we can load this
171171 * information for all modules at once.
172 - * @param $skin string Skin name
173 - * @param $deps array Array of file names
 172+ * @param $skin String: Skin name
 173+ * @param $deps Array: Array of file names
174174 */
175175 public function setFileDependencies( $skin, $deps ) {
176176 $this->fileDeps[$skin] = $deps;
@@ -178,8 +178,8 @@
179179 /**
180180 * Get the last modification timestamp of the message blob for this
181181 * module in a given language.
182 - * @param $lang string Language code
183 - * @return int UNIX timestamp, or 0 if no blob found
 182+ * @param $lang String: Language code
 183+ * @return Integer: UNIX timestamp, or 0 if no blob found
184184 */
185185 public function getMsgBlobMtime( $lang ) {
186186 if ( !count( $this->getMessages() ) )
@@ -198,8 +198,8 @@
199199 /**
200200 * Set a preloaded message blob last modification timestamp. Used so we
201201 * can load this information for all modules at once.
202 - * @param $lang string Language code
203 - * @param $mtime int UNIX timestamp or 0 if there is no such blob
 202+ * @param $lang String: Language code
 203+ * @param $mtime Integer: UNIX timestamp or 0 if there is no such blob
204204 */
205205 public function setMsgBlobMtime( $lang, $mtime ) {
206206 $this->msgBlobMtime[$lang] = $mtime;
@@ -214,8 +214,8 @@
215215 * timestamps. Whenever anything happens that changes the module's
216216 * contents for these parameters, the mtime should increase.
217217 *
218 - * @param $context ResourceLoaderContext object
219 - * @return int UNIX timestamp
 218+ * @param $context ResourceLoaderContext: Context object
 219+ * @return Integer: UNIX timestamp
220220 */
221221 public function getModifiedTime( ResourceLoaderContext $context ) {
222222 // 0 would mean now
Index: trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -21,6 +21,7 @@
2222 */
2323
2424 class ResourceLoaderStartUpModule extends ResourceLoaderModule {
 25+
2526 /* Protected Members */
2627
2728 protected $modifiedTime = array();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75036Fixed ResourceLoaderFileModule constructor - collated lists were not being p...tparscal20:59, 19 October 2010

Comments

#Comment by Catrope (talk | contribs)   11:01, 8 November 2010

This partially undoes Tim's breaking of long lines in r75911.

#Comment by Trevor Parscal (WMF) (talk | contribs)   18:16, 8 November 2010

It conforms to the style guide's statement that line lengths should not exceed 100 characters. Arbitrarily breaking the line, or breaking comments at 80 and code at 100 seemed like a mishap to me, not intent.

#Comment by Catrope (talk | contribs)   18:28, 8 November 2010

Alright; as long as no one starts edit-warring about line lengths it's all fine by me.

Status & tagging log