Index: branches/apiedit/phase3/includes/api/ApiDelete.php |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | |
90 | 90 | $titleObj = NULL; |
91 | 91 | if(!isset($params['title'])) |
92 | | - $this->dieUsage('The title parameter must be set', 'notarget'); |
| 92 | + $this->dieUsage('The title parameter must be set', 'notitle'); |
93 | 93 | if(!isset($params['token'])) |
94 | 94 | $this->dieUsage('The token parameter must be set', 'notoken'); |
95 | 95 | |
Index: branches/apiedit/phase3/includes/api/ApiUndelete.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | |
44 | 44 | $titleObj = NULL; |
45 | 45 | if(!isset($params['title'])) |
46 | | - $this->dieUsage('The title parameter must be set', 'notarget'); |
| 46 | + $this->dieUsage('The title parameter must be set', 'notitle'); |
47 | 47 | if(!isset($params['token'])) |
48 | 48 | $this->dieUsage('The token parameter must be set', 'notoken'); |
49 | 49 | |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | $this->dieUsage('No revisions could be restored', 'norevs'); |
69 | 69 | case PageArchive::UNDELETE_NOTAVAIL: |
70 | 70 | $this->dieUsage('Not all requested revisions could be found', 'revsnotfound'); |
71 | | - case PageArchive::UNDELETE_UNKNOWN: |
| 71 | + case PageArchive::UNDELETE_UNKNOWNERR: |
72 | 72 | $this->dieUsage('Undeletion failed with unknown error', 'unknownerror'); |
73 | 73 | } |
74 | 74 | |
Index: branches/apiedit/phase3/includes/SpecialUndelete.php |
— | — | @@ -428,6 +428,9 @@ |
429 | 429 | $revision->insertOn( $dbw ); |
430 | 430 | $restored++; |
431 | 431 | } |
| 432 | + // Was anything restored at all? |
| 433 | + if($restored == 0) |
| 434 | + return 0; |
432 | 435 | |
433 | 436 | if( $revision ) { |
434 | 437 | // Attach the latest revision to the page... |