Index: trunk/extensions/ArticleFeedback/api/ApiQueryArticleFeedback.php |
— | — | @@ -111,7 +111,10 @@ |
112 | 112 | } |
113 | 113 | |
114 | 114 | foreach ( $ratings as $rat ) { |
115 | | - $result->setIndexedTagName( $rat['ratings'], 'r' ); |
| 115 | + if ( isset( $rat['ratings'] ) ) { |
| 116 | + $result->setIndexedTagName( $rat['ratings'], 'r' ); |
| 117 | + } |
| 118 | + |
116 | 119 | $result->addValue( array( 'query', $this->getModuleName() ), null, $rat ); |
117 | 120 | } |
118 | 121 | |
— | — | @@ -263,15 +266,15 @@ |
264 | 267 | |
265 | 268 | public function getParamDescription() { |
266 | 269 | return array( |
267 | | - 'pageid' => 'Page ID to get feedbacks for', |
268 | | - 'userrating' => "Whether to get the current user's ratings for the specific rev/article", |
| 270 | + 'pageid' => 'Page ID to get feedback ratings for', |
| 271 | + 'userrating' => "Whether to get the current user's ratings for the specified page", |
269 | 272 | 'anontoken' => 'Token for anonymous users', |
270 | 273 | ); |
271 | 274 | } |
272 | 275 | |
273 | 276 | public function getDescription() { |
274 | 277 | return array( |
275 | | - 'List all article feedbacks' |
| 278 | + 'List article feedback ratings for a specified page' |
276 | 279 | ); |
277 | 280 | } |
278 | 281 | |
— | — | @@ -285,7 +288,6 @@ |
286 | 289 | |
287 | 290 | protected function getExamples() { |
288 | 291 | return array( |
289 | | - 'api.php?action=query&list=articlefeedback', |
290 | 292 | 'api.php?action=query&list=articlefeedback&afpageid=1', |
291 | 293 | 'api.php?action=query&list=articlefeedback&afpageid=1&afuserrating=1', |
292 | 294 | ); |