r96201 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96200‎ | r96201 | r96202 >
Date:15:41, 3 September 2011
Author:krinkle
Status:ok
Tags:
Comment:
[ResourceLoader2] 'timestamp' > 'definitiontimestamp' to avoid confusion (Follows-up r95965)
Modified paths:
  • /branches/RL2/extensions/Gadgets/backend/GadgetResourceLoaderModule.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/backend/GadgetResourceLoaderModule.php
@@ -3,7 +3,7 @@
44 * ResourceLoader module for a single gadget
55 */
66 class GadgetResourceLoaderModule extends ResourceLoaderWikiModule {
7 - protected $pages, $dependencies, $messages, $source, $timestamp;
 7+ protected $pages, $dependencies, $messages, $source, $definitiontimestamp;
88
99 /**
1010 * Creates an instance of this class
@@ -16,15 +16,15 @@
1717 * @param $dependencies Array: Names of resources this module depends on
1818 * @param $messages Array: Keys of the i18n messages that this module needs
1919 * @param $source String: Name of the source of this module, as defined in ResourceLoader
20 - * @param $timestamp String: Last modification timestamp of the gadget metadata
 20+ * @param $definitiontimestamp String: Last modification timestamp of the gadget metadata
2121 * @param $db Database: Remote database object // TODO: How will this work for ForeignAPIGadgetRepo?
2222 */
23 - public function __construct( $pages, $dependencies, $messages, $source, $timestamp, $db ) {
 23+ public function __construct( $pages, $dependencies, $messages, $source, $definitiontimestamp, $db ) {
2424 $this->pages = $pages;
2525 $this->dependencies = $dependencies;
2626 $this->messages = $messages;
2727 $this->source = $source;
28 - $this->timestamp = $timestamp;
 28+ $this->definitiontimestamp = $definitiontimestamp;
2929 $this->db = $db;
3030 }
3131
@@ -65,13 +65,13 @@
6666 }
6767
6868 /**
69 - * Overrides ResourceLoaderWikiModule::getModifiedTime() to take $timestamp
 69+ * Overrides ResourceLoaderWikiModule::getModifiedTime() to take $definitiontimestamp
7070 * into account.
7171 * @param $context ResourceLoaderContext object
7272 * @return int UNIX timestamp
7373 */
7474 public function getModifiedTime( ResourceLoaderContext $context ) {
7575 $retval = parent::getModifiedTime( $context );
76 - return max( $retval, wfTimestamp( TS_UNIX, $this->timestamp ) );
 76+ return max( $retval, wfTimestamp( TS_UNIX, $this->definitiontimestamp ) );
7777 }
7878 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95965RL2: Followup r95964: rename timestamp to definitiontimestamp, and add the ti...catrope11:53, 1 September 2011

Status & tagging log