r95965 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95964‎ | r95965 | r95966 >
Date:11:53, 1 September 2011
Author:catrope
Status:ok
Tags:
Comment:
RL2: Followup r95964: rename timestamp to definitiontimestamp, and add the timestamp of the module as 'timestamp'. Also remove timestamp from the default property list
Modified paths:
  • /branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php
@@ -84,8 +84,11 @@
8585 $row['json'] = $g->getJSON();
8686 }
8787 if ( isset( $this->props['timestamp'] ) ) {
88 - $row['timestamp'] = wfTimestamp( TS_ISO_8601, $g->getTimestamp() );
 88+ $row['timestamp'] = wfTimestamp( TS_ISO_8601, $g->getModule()->getModifiedTime() );
8989 }
 90+ if ( isset( $this->props['definitiontimestamp'] ) ) {
 91+ $row['definitiontimestamp'] = wfTimestamp( TS_ISO_8601, $g->getTimestamp() );
 92+ }
9093 if ( isset( $this->props['desc'] ) ) {
9194 $row['desc'] = wfMessage( $g->getDescriptionMsg() )->parse();
9295 }
@@ -140,12 +143,13 @@
141144 public function getAllowedParams() {
142145 return array(
143146 'prop' => array(
144 - ApiBase::PARAM_DFLT => 'name|json|timestamp',
 147+ ApiBase::PARAM_DFLT => 'name|json',
145148 ApiBase::PARAM_ISMULTI => true,
146149 ApiBase::PARAM_TYPE => array(
147150 'name',
148151 'json',
149152 'timestamp',
 153+ 'definitiontimestamp',
150154 'desc',
151155 'desc-raw',
152156 'category',
@@ -181,7 +185,8 @@
182186 'What gadget information to get:',
183187 ' name - Internal gadget name',
184188 ' json - JSON representation of the gadget metadata. All other prop attributes below are deprecated but provided for backwards compatibility',
185 - ' timestamp - Last changed timestamp of the gadget metadata',
 189+ ' timestamp - Last changed timestamp of the gadget module, including any files it references',
 190+ ' definitiontimestamp - Last changed timestamp of the gadget metadata',
186191 ' desc - Gadget description transformed into HTML (can be slow, use only if really needed)',
187192 ' desc-raw - Gadget description in raw wikitext',
188193 ' category - Internal name of a category gadget belongs to (empty if top-level gadget)',

Follow-up revisions

RevisionCommit summaryAuthorDate
r95978RL2: Fix error in r95965 caused by omission of $context parametercatrope13:08, 1 September 2011
r96201[ResourceLoader2] 'timestamp' > 'definitiontimestamp' to avoid confusion (Fol...krinkle15:41, 3 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95964RL2: Add timestamp property to list=gadgetscatrope11:49, 1 September 2011

Status & tagging log