Index: branches/ApiEdit_Vodafone/includes/EditPage.php |
— | — | @@ -16,9 +16,7 @@ |
17 | 17 | const AS_SUCCESS_NEW_ARTICLE = 201; |
18 | 18 | const AS_HOOK_ERROR = 210; |
19 | 19 | 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; |
23 | 21 | const AS_BLOCKED_PAGE_FOR_USER = 215; |
24 | 22 | const AS_CONTENT_TOO_BIG = 216; |
25 | 23 | const AS_USER_CANNOT_EDIT = 217; |
— | — | @@ -665,7 +663,7 @@ |
666 | 664 | if( !wfRunHooks( 'EditPage::attemptSave', array( &$this ) ) ) |
667 | 665 | { |
668 | 666 | wfDebug( "Hook 'EditPage::attemptSave' aborted article saving" ); |
669 | | - return self::AS_EXIST_HOOK_ERROR_A; |
| 667 | + return self::AS_EXIST_HOOK_ERROR; |
670 | 668 | // return false; |
671 | 669 | } |
672 | 670 | |
— | — | @@ -693,13 +691,13 @@ |
694 | 692 | # Error messages etc. could be handled within the hook... |
695 | 693 | wfProfileOut( $fname ); |
696 | 694 | wfProfileOut( "$fname-checks" ); |
697 | | - return AS_EXIST_HOOK_ERROR_B; |
| 695 | + return AS_EXIST_HOOK_ERROR; |
698 | 696 | // return false; |
699 | 697 | } elseif( $this->hookError != '' ) { |
700 | 698 | # ...or the hook could be expecting us to produce an error |
701 | 699 | wfProfileOut( "$fname-checks " ); |
702 | 700 | wfProfileOut( $fname ); |
703 | | - return self::AS_EXIST_HOOK_ERROR_C; |
| 701 | + return self::AS_EXIST_HOOK_ERROR; |
704 | 702 | // return true; |
705 | 703 | } |
706 | 704 | if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) { |
— | — | @@ -2191,7 +2189,7 @@ |
2192 | 2190 | $this->blockedPage(); |
2193 | 2191 | return false; |
2194 | 2192 | |
2195 | | - case self::AS_EXIST_HOOK_ERROR_A: |
| 2193 | + case self::AS_EXIST_HOOK_ERROR: |
2196 | 2194 | return false; |
2197 | 2195 | |
2198 | 2196 | case self::AS_SPAM_ERROR: |
— | — | @@ -2201,12 +2199,6 @@ |
2202 | 2200 | case self::AS_FILTERING: |
2203 | 2201 | return false; |
2204 | 2202 | |
2205 | | - case self::AS_EXIST_HOOK_ERROR_B: |
2206 | | - return false; |
2207 | | - |
2208 | | - case self::AS_EXIST_HOOK_ERROR_C: |
2209 | | - return true; |
2210 | | - |
2211 | 2203 | // case DEFAULT: |
2212 | 2204 | // return true; |
2213 | 2205 | } |