Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -16,30 +16,30 @@ |
17 | 17 | * usually the same, but they are now allowed to be different. |
18 | 18 | */ |
19 | 19 | class EditPage { |
20 | | - const AS_SUCCESS_UPDATE = 200; |
| 20 | + const AS_SUCCESS_UPDATE = 200; |
21 | 21 | const AS_SUCCESS_NEW_ARTICLE = 201; |
22 | | - const AS_HOOK_ERROR = 210; |
23 | | - const AS_FILTERING = 211; |
| 22 | + const AS_HOOK_ERROR = 210; |
| 23 | + const AS_FILTERING = 211; |
24 | 24 | const AS_HOOK_ERROR_EXPECTED = 212; |
25 | 25 | const AS_BLOCKED_PAGE_FOR_USER = 215; |
26 | | - const AS_CONTENT_TOO_BIG = 216; |
27 | | - const AS_USER_CANNOT_EDIT = 217; |
| 26 | + const AS_CONTENT_TOO_BIG = 216; |
| 27 | + const AS_USER_CANNOT_EDIT = 217; |
28 | 28 | const AS_READ_ONLY_PAGE_ANON = 218; |
29 | 29 | const AS_READ_ONLY_PAGE_LOGGED = 219; |
30 | | - const AS_READ_ONLY_PAGE = 220; |
31 | | - const AS_RATE_LIMITED = 221; |
| 30 | + const AS_READ_ONLY_PAGE = 220; |
| 31 | + const AS_RATE_LIMITED = 221; |
32 | 32 | const AS_ARTICLE_WAS_DELETED = 222; |
33 | 33 | const AS_NO_CREATE_PERMISSION = 223; |
34 | | - const AS_BLANK_ARTICLE = 224; |
35 | | - const AS_CONFLICT_DETECTED = 225; |
36 | | - const AS_SUMMARY_NEEDED = 226; |
37 | | - const AS_TEXTBOX_EMPTY = 228; |
38 | | - const AS_MAX_ARTICLE_SIZE_EXCEDED = 229; |
39 | | - const AS_OK = 230; |
40 | | - const AS_END = 231; |
41 | | - const AS_SPAM_ERROR = 232; |
42 | | - const AS_IMAGE_REDIRECT_ANON = 233; |
43 | | - const AS_IMAGE_REDIRECT_LOGGED = 234; |
| 34 | + const AS_BLANK_ARTICLE = 224; |
| 35 | + const AS_CONFLICT_DETECTED = 225; |
| 36 | + const AS_SUMMARY_NEEDED = 226; |
| 37 | + const AS_TEXTBOX_EMPTY = 228; |
| 38 | + const AS_MAX_ARTICLE_SIZE_EXCEEDED = 229; |
| 39 | + const AS_OK = 230; |
| 40 | + const AS_END = 231; |
| 41 | + const AS_SPAM_ERROR = 232; |
| 42 | + const AS_IMAGE_REDIRECT_ANON = 233; |
| 43 | + const AS_IMAGE_REDIRECT_LOGGED = 234; |
44 | 44 | |
45 | 45 | var $mArticle; |
46 | 46 | var $mTitle; |
— | — | @@ -88,7 +88,6 @@ |
89 | 89 | * @param $article |
90 | 90 | */ |
91 | 91 | function EditPage( $article ) { |
92 | | - global $wgTitle; |
93 | 92 | $this->mArticle =& $article; |
94 | 93 | $this->mTitle = $article->getTitle(); |
95 | 94 | |
— | — | @@ -336,7 +335,7 @@ |
337 | 336 | * the newly-edited page. |
338 | 337 | */ |
339 | 338 | function edit() { |
340 | | - global $wgOut, $wgUser, $wgRequest, $wgTitle; |
| 339 | + global $wgOut, $wgUser, $wgRequest; |
341 | 340 | |
342 | 341 | if ( !wfRunHooks( 'AlternateEdit', array( &$this ) ) ) |
343 | 342 | return; |
— | — | @@ -690,7 +689,7 @@ |
691 | 690 | */ |
692 | 691 | function internalAttemptSave( &$result, $bot = false ) { |
693 | 692 | global $wgSpamRegex, $wgFilterCallback, $wgUser, $wgOut, $wgParser; |
694 | | - global $wgMaxArticleSize, $wgTitle; |
| 693 | + global $wgMaxArticleSize; |
695 | 694 | |
696 | 695 | $fname = 'EditPage::attemptSave'; |
697 | 696 | wfProfileIn( $fname ); |
— | — | @@ -703,7 +702,7 @@ |
704 | 703 | } |
705 | 704 | |
706 | 705 | # Check image redirect |
707 | | - if ( $wgTitle->getNamespace() == NS_IMAGE && |
| 706 | + if ( $this->mTitle->getNamespace() == NS_IMAGE && |
708 | 707 | Title::newFromRedirect( $this->textbox1 ) instanceof Title && |
709 | 708 | !$wgUser->isAllowed( 'upload' ) ) { |
710 | 709 | if( $wgUser->isAnon() ) { |
— | — | @@ -742,7 +741,7 @@ |
743 | 742 | wfProfileOut( $fname ); |
744 | 743 | return self::AS_HOOK_ERROR_EXPECTED; |
745 | 744 | } |
746 | | - if ( $wgUser->isBlockedFrom( $wgTitle, false ) ) { |
| 745 | + if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) { |
747 | 746 | # Check block state against master, thus 'false'. |
748 | 747 | wfProfileOut( "$fname-checks" ); |
749 | 748 | wfProfileOut( $fname ); |