r25540 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25539‎ | r25540 | r25541 >
Date:14:40, 5 September 2007
Author:catrope
Status:old
Tags:
Comment:
apiedit: Minor fixes
Modified paths:
  • /branches/apiedit/phase3/includes/SpecialUndelete.php (modified) (history)
  • /branches/apiedit/phase3/includes/api/ApiDelete.php (modified) (history)
  • /branches/apiedit/phase3/includes/api/ApiUndelete.php (modified) (history)

Diff [purge]

Index: branches/apiedit/phase3/includes/api/ApiDelete.php
@@ -88,7 +88,7 @@
8989
9090 $titleObj = NULL;
9191 if(!isset($params['title']))
92 - $this->dieUsage('The title parameter must be set', 'notarget');
 92+ $this->dieUsage('The title parameter must be set', 'notitle');
9393 if(!isset($params['token']))
9494 $this->dieUsage('The token parameter must be set', 'notoken');
9595
Index: branches/apiedit/phase3/includes/api/ApiUndelete.php
@@ -42,7 +42,7 @@
4343
4444 $titleObj = NULL;
4545 if(!isset($params['title']))
46 - $this->dieUsage('The title parameter must be set', 'notarget');
 46+ $this->dieUsage('The title parameter must be set', 'notitle');
4747 if(!isset($params['token']))
4848 $this->dieUsage('The token parameter must be set', 'notoken');
4949
@@ -67,7 +67,7 @@
6868 $this->dieUsage('No revisions could be restored', 'norevs');
6969 case PageArchive::UNDELETE_NOTAVAIL:
7070 $this->dieUsage('Not all requested revisions could be found', 'revsnotfound');
71 - case PageArchive::UNDELETE_UNKNOWN:
 71+ case PageArchive::UNDELETE_UNKNOWNERR:
7272 $this->dieUsage('Undeletion failed with unknown error', 'unknownerror');
7373 }
7474
Index: branches/apiedit/phase3/includes/SpecialUndelete.php
@@ -428,6 +428,9 @@
429429 $revision->insertOn( $dbw );
430430 $restored++;
431431 }
 432+ // Was anything restored at all?
 433+ if($restored == 0)
 434+ return 0;
432435
433436 if( $revision ) {
434437 // Attach the latest revision to the page...

Status & tagging log