| Index: branches/RL2/extensions/Gadgets/api/ApiQueryGadgets.php |
| — | — | @@ -84,8 +84,11 @@ |
| 85 | 85 | $row['json'] = $g->getJSON(); |
| 86 | 86 | } |
| 87 | 87 | if ( isset( $this->props['timestamp'] ) ) { |
| 88 | | - $row['timestamp'] = wfTimestamp( TS_ISO_8601, $g->getTimestamp() ); |
| | 88 | + $row['timestamp'] = wfTimestamp( TS_ISO_8601, $g->getModule()->getModifiedTime() ); |
| 89 | 89 | } |
| | 90 | + if ( isset( $this->props['definitiontimestamp'] ) ) { |
| | 91 | + $row['definitiontimestamp'] = wfTimestamp( TS_ISO_8601, $g->getTimestamp() ); |
| | 92 | + } |
| 90 | 93 | if ( isset( $this->props['desc'] ) ) { |
| 91 | 94 | $row['desc'] = wfMessage( $g->getDescriptionMsg() )->parse(); |
| 92 | 95 | } |
| — | — | @@ -140,12 +143,13 @@ |
| 141 | 144 | public function getAllowedParams() { |
| 142 | 145 | return array( |
| 143 | 146 | 'prop' => array( |
| 144 | | - ApiBase::PARAM_DFLT => 'name|json|timestamp', |
| | 147 | + ApiBase::PARAM_DFLT => 'name|json', |
| 145 | 148 | ApiBase::PARAM_ISMULTI => true, |
| 146 | 149 | ApiBase::PARAM_TYPE => array( |
| 147 | 150 | 'name', |
| 148 | 151 | 'json', |
| 149 | 152 | 'timestamp', |
| | 153 | + 'definitiontimestamp', |
| 150 | 154 | 'desc', |
| 151 | 155 | 'desc-raw', |
| 152 | 156 | 'category', |
| — | — | @@ -181,7 +185,8 @@ |
| 182 | 186 | 'What gadget information to get:', |
| 183 | 187 | ' name - Internal gadget name', |
| 184 | 188 | ' 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', |
| 186 | 191 | ' desc - Gadget description transformed into HTML (can be slow, use only if really needed)', |
| 187 | 192 | ' desc-raw - Gadget description in raw wikitext', |
| 188 | 193 | ' category - Internal name of a category gadget belongs to (empty if top-level gadget)', |