r25426 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25425‎ | r25426 | r25427 >
Date:08:32, 3 September 2007
Author:ilabarg1
Status:old
Tags:
Comment:
[EditPage.php]-AS_HOOK_ERROR_A&B&C are put together as same constant error (AS_HOOK_ERROR).
Modified paths:
  • /branches/ApiEdit_Vodafone/includes/EditPage.php (modified) (history)

Diff [purge]

Index: branches/ApiEdit_Vodafone/includes/EditPage.php
@@ -16,9 +16,7 @@
1717 const AS_SUCCESS_NEW_ARTICLE = 201;
1818 const AS_HOOK_ERROR = 210;
1919 const AS_FILTERING = 211;
20 - const AS_EXIST_HOOK_ERROR_A = 212;
21 - const AS_EXIST_HOOK_ERROR_B = 213;
22 - const AS_EXIST_HOOK_ERROR_C = 214;
 20+ const AS_EXIST_HOOK_ERROR = 212;
2321 const AS_BLOCKED_PAGE_FOR_USER = 215;
2422 const AS_CONTENT_TOO_BIG = 216;
2523 const AS_USER_CANNOT_EDIT = 217;
@@ -665,7 +663,7 @@
666664 if( !wfRunHooks( 'EditPage::attemptSave', array( &$this ) ) )
667665 {
668666 wfDebug( "Hook 'EditPage::attemptSave' aborted article saving" );
669 - return self::AS_EXIST_HOOK_ERROR_A;
 667+ return self::AS_EXIST_HOOK_ERROR;
670668 // return false;
671669 }
672670
@@ -693,13 +691,13 @@
694692 # Error messages etc. could be handled within the hook...
695693 wfProfileOut( $fname );
696694 wfProfileOut( "$fname-checks" );
697 - return AS_EXIST_HOOK_ERROR_B;
 695+ return AS_EXIST_HOOK_ERROR;
698696 // return false;
699697 } elseif( $this->hookError != '' ) {
700698 # ...or the hook could be expecting us to produce an error
701699 wfProfileOut( "$fname-checks " );
702700 wfProfileOut( $fname );
703 - return self::AS_EXIST_HOOK_ERROR_C;
 701+ return self::AS_EXIST_HOOK_ERROR;
704702 // return true;
705703 }
706704 if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) {
@@ -2191,7 +2189,7 @@
21922190 $this->blockedPage();
21932191 return false;
21942192
2195 - case self::AS_EXIST_HOOK_ERROR_A:
 2193+ case self::AS_EXIST_HOOK_ERROR:
21962194 return false;
21972195
21982196 case self::AS_SPAM_ERROR:
@@ -2201,12 +2199,6 @@
22022200 case self::AS_FILTERING:
22032201 return false;
22042202
2205 - case self::AS_EXIST_HOOK_ERROR_B:
2206 - return false;
2207 -
2208 - case self::AS_EXIST_HOOK_ERROR_C:
2209 - return true;
2210 -
22112203 // case DEFAULT:
22122204 // return true;
22132205 }

Status & tagging log