r95964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95963‎ | r95964 | r95965 >
Date:11:49, 1 September 2011
Author:catrope
Status:ok
Tags:
Comment:
RL2: Add timestamp property to list=gadgets
Modified paths:
  • /branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php
@@ -83,6 +83,9 @@
8484 if ( isset( $this->props['json'] ) ) {
8585 $row['json'] = $g->getJSON();
8686 }
 87+ if ( isset( $this->props['timestamp'] ) ) {
 88+ $row['timestamp'] = wfTimestamp( TS_ISO_8601, $g->getTimestamp() );
 89+ }
8790 if ( isset( $this->props['desc'] ) ) {
8891 $row['desc'] = wfMessage( $g->getDescriptionMsg() )->parse();
8992 }
@@ -137,11 +140,12 @@
138141 public function getAllowedParams() {
139142 return array(
140143 'prop' => array(
141 - ApiBase::PARAM_DFLT => 'name|json',
 144+ ApiBase::PARAM_DFLT => 'name|json|timestamp',
142145 ApiBase::PARAM_ISMULTI => true,
143146 ApiBase::PARAM_TYPE => array(
144147 'name',
145148 'json',
 149+ 'timestamp',
146150 'desc',
147151 'desc-raw',
148152 'category',
@@ -177,6 +181,7 @@
178182 'What gadget information to get:',
179183 ' name - Internal gadget name',
180184 ' 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',
181186 ' desc - Gadget description transformed into HTML (can be slow, use only if really needed)',
182187 ' desc-raw - Gadget description in raw wikitext',
183188 ' category - Internal name of a category gadget belongs to (empty if top-level gadget)',

Follow-up revisions

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

Status & tagging log