http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95965
Revision: 95965
Author: catrope
Date: 2011-09-01 11:53:24 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
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: branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php
===================================================================
--- branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php 2011-09-01
11:49:09 UTC (rev 95964)
+++ branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php 2011-09-01
11:53:24 UTC (rev 95965)
@@ -84,8 +84,11 @@
$row['json'] = $g->getJSON();
}
if ( isset( $this->props['timestamp'] ) ) {
- $row['timestamp'] = wfTimestamp( TS_ISO_8601,
$g->getTimestamp() );
+ $row['timestamp'] = wfTimestamp( TS_ISO_8601,
$g->getModule()->getModifiedTime() );
}
+ if ( isset( $this->props['definitiontimestamp'] ) ) {
+ $row['definitiontimestamp'] = wfTimestamp(
TS_ISO_8601, $g->getTimestamp() );
+ }
if ( isset( $this->props['desc'] ) ) {
$row['desc'] = wfMessage(
$g->getDescriptionMsg() )->parse();
}
@@ -140,12 +143,13 @@
public function getAllowedParams() {
return array(
'prop' => array(
- ApiBase::PARAM_DFLT => 'name|json|timestamp',
+ ApiBase::PARAM_DFLT => 'name|json',
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => array(
'name',
'json',
'timestamp',
+ 'definitiontimestamp',
'desc',
'desc-raw',
'category',
@@ -181,7 +185,8 @@
'What gadget information to get:',
' name - Internal gadget name',
' json - JSON representation of the
gadget metadata. All other prop attributes below are deprecated but provided
for backwards compatibility',
- ' timestamp - Last changed timestamp of
the gadget metadata',
+ ' timestamp - Last changed timestamp of
the gadget module, including any files it references',
+ ' definitiontimestamp - Last changed timestamp
of the gadget metadata',
' desc - Gadget description
transformed into HTML (can be slow, use only if really needed)',
' desc-raw - Gadget description in raw
wikitext',
' category - Internal name of a category
gadget belongs to (empty if top-level gadget)',
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs