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