Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -526,6 +526,14 @@ |
527 | 527 | public function getDescription() { |
528 | 528 | return 'Enumerate recent changes'; |
529 | 529 | } |
| 530 | + |
| 531 | + public function getPossibleErrors() { |
| 532 | + return array_merge( parent::getPossibleErrors(), array( |
| 533 | + array( 'code' => 'show', 'info' => 'Incorrect parameter - mutually exclusive values may not be supplied' ), |
| 534 | + array( 'code' => 'permissiondenied', 'info' => 'You need the patrol right to request the patrolled flag' ), |
| 535 | + array( 'code' => 'user-excludeuser', 'info' => 'user and excludeuser cannot be used together' ), |
| 536 | + ) ); |
| 537 | + } |
530 | 538 | |
531 | 539 | protected function getExamples() { |
532 | 540 | return array ( |
Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -314,6 +314,15 @@ |
315 | 315 | 'For instance, a parameter marked (1) only applies to mode 1 and is ignored in modes 2 and 3.', |
316 | 316 | ); |
317 | 317 | } |
| 318 | + |
| 319 | + public function getPossibleErrors() { |
| 320 | + return array_merge( parent::getPossibleErrors(), array( |
| 321 | + array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revision information' ), |
| 322 | + array( 'code' => 'badparams', 'info' => 'user and excludeuser cannot be used together' ), |
| 323 | + array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revision content' ), |
| 324 | + array( 'code' => 'badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ), |
| 325 | + ) ); |
| 326 | + } |
318 | 327 | |
319 | 328 | protected function getExamples() { |
320 | 329 | return array ( |
Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php |
— | — | @@ -275,6 +275,14 @@ |
276 | 276 | public function getDescription() { |
277 | 277 | return 'List all pages in a given category'; |
278 | 278 | } |
| 279 | + |
| 280 | + public function getPossibleErrors() { |
| 281 | + return array_merge( parent::getPossibleErrors(), array( |
| 282 | + array( 'code' => 'notitle', 'info' => 'The cmtitle parameter is required' ), |
| 283 | + array( 'code' => 'invalidcategory', 'info' => 'The category name you entered is not valid' ), |
| 284 | + array( 'code' => 'badcontinue', 'info' => 'Invalid continue param. You should pass the original value returned by the previous query' ), |
| 285 | + ) ); |
| 286 | + } |
279 | 287 | |
280 | 288 | protected function getExamples() { |
281 | 289 | return array ( |
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -372,6 +372,18 @@ |
373 | 373 | public function getDescription() { |
374 | 374 | return "Get all recent changes to pages in the logged in user's watchlist"; |
375 | 375 | } |
| 376 | + |
| 377 | + public function getPossibleErrors() { |
| 378 | + return array_merge( parent::getPossibleErrors(), array( |
| 379 | + array( 'code' => 'bad_wlowner', 'info' => 'Specified user does not exist' ), |
| 380 | + array( 'code' => 'bad_wltoken', 'info' => 'Incorrect watchlist token provided -- please set a correct token in Special:Preferences' ), |
| 381 | + array( 'code' => 'notloggedin', 'info' => 'You must be logged-in to have a watchlist' ), |
| 382 | + array( 'code' => 'patrol', 'info' => 'patrol property is not available' ), |
| 383 | + array( 'code' => 'show', 'info' => 'Incorrect parameter - mutually exclusive values may not be supplied' ), |
| 384 | + array( 'code' => 'permissiondenied', 'info' => 'You need the patrol right to request the patrolled flag' ), |
| 385 | + array( 'code' => 'user-excludeuser', 'info' => 'user and excludeuser cannot be used together' ), |
| 386 | + ) ); |
| 387 | + } |
376 | 388 | |
377 | 389 | protected function getExamples() { |
378 | 390 | return array ( |
Index: trunk/phase3/includes/api/ApiPageSet.php |
— | — | @@ -691,6 +691,13 @@ |
692 | 692 | ); |
693 | 693 | } |
694 | 694 | |
| 695 | + public function getPossibleErrors() { |
| 696 | + return array_merge( parent::getPossibleErrors(), array( |
| 697 | + array( 'code' => 'multisource', 'info' => "Cannot use 'pageids' at the same time as 'dataSource'" ), |
| 698 | + array( 'code' => 'multisource', 'info' => "Cannot use 'revids' at the same time as 'dataSource'" ), |
| 699 | + ) ); |
| 700 | + } |
| 701 | + |
695 | 702 | public function getVersion() { |
696 | 703 | return __CLASS__ . ': $Id$'; |
697 | 704 | } |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -339,6 +339,14 @@ |
340 | 340 | array( 'mustbeloggedin', 'upload' ), |
341 | 341 | array( 'badaccess-groups' ), |
342 | 342 | array( 'badaccess-groups' ), |
| 343 | + array( 'code' => 'fetchfileerror', 'info' => '' ), |
| 344 | + array( 'code' => 'nomodule', 'info' => 'No upload module set' ), |
| 345 | + array( 'code' => 'empty-file', 'info' => 'The file you submitted was empty' ), |
| 346 | + array( 'code' => 'filetype-missing', 'info' => 'The file is missing an extension' ), |
| 347 | + array( 'code' => 'filename-tooshort', 'info' => 'The filename is too short' ), |
| 348 | + array( 'code' => 'overwrite', 'info' => 'Overwriting an existing file is not allowed' ), |
| 349 | + array( 'code' => 'stashfailed', 'info' => 'Stashing temporary file failed' ), |
| 350 | + array( 'code' => 'internal-error', 'info' => 'An internal error occurred' ), |
343 | 351 | ) ); |
344 | 352 | } |
345 | 353 | |
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -417,6 +417,15 @@ |
418 | 418 | public function getDescription() { |
419 | 419 | return 'Get all edits by a user'; |
420 | 420 | } |
| 421 | + |
| 422 | + public function getPossibleErrors() { |
| 423 | + return array_merge( parent::getPossibleErrors(), array( |
| 424 | + array( 'code' => 'param_user', 'info' => 'User parameter may not be empty.' ), |
| 425 | + array( 'code' => 'param_user', 'info' => 'User name user is not valid' ), |
| 426 | + array( 'code' => 'show', 'info' => 'Incorrect parameter - mutually exclusive values may not be supplied' ), |
| 427 | + array( 'code' => 'permissiondenied', 'info' => 'You need the patrol right to request the patrolled flag' ), |
| 428 | + ) ); |
| 429 | + } |
421 | 430 | |
422 | 431 | protected function getExamples() { |
423 | 432 | return array ( |