Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -20,29 +20,128 @@ |
21 | 21 | * headaches, which may be fatal. |
22 | 22 | */ |
23 | 23 | class EditPage { |
| 24 | + |
| 25 | + /** |
| 26 | + * Status: Article successfully updated |
| 27 | + */ |
24 | 28 | const AS_SUCCESS_UPDATE = 200; |
| 29 | + |
| 30 | + /** |
| 31 | + * Status: Article successfully created |
| 32 | + */ |
25 | 33 | const AS_SUCCESS_NEW_ARTICLE = 201; |
| 34 | + |
| 35 | + /** |
| 36 | + * Status: Article update aborted by a hook function |
| 37 | + */ |
26 | 38 | const AS_HOOK_ERROR = 210; |
| 39 | + |
| 40 | + /** |
| 41 | + * Status: TODO: What is this? |
| 42 | + */ |
27 | 43 | const AS_FILTERING = 211; |
| 44 | + |
| 45 | + /** |
| 46 | + * Status: A hook function returned an error |
| 47 | + */ |
28 | 48 | const AS_HOOK_ERROR_EXPECTED = 212; |
| 49 | + |
| 50 | + /** |
| 51 | + * Status: User is blocked from editting this page |
| 52 | + */ |
29 | 53 | const AS_BLOCKED_PAGE_FOR_USER = 215; |
| 54 | + |
| 55 | + /** |
| 56 | + * Status: Content too big (> $wgMaxArticleSize) |
| 57 | + */ |
30 | 58 | const AS_CONTENT_TOO_BIG = 216; |
| 59 | + |
| 60 | + /** |
| 61 | + * Status: User cannot edit? (not used) |
| 62 | + */ |
31 | 63 | const AS_USER_CANNOT_EDIT = 217; |
| 64 | + |
| 65 | + /** |
| 66 | + * Status: this anonymous user is not allowed to edit this page |
| 67 | + */ |
32 | 68 | const AS_READ_ONLY_PAGE_ANON = 218; |
| 69 | + |
| 70 | + /** |
| 71 | + * Status: this logged in user is not allowed to edit this page |
| 72 | + */ |
33 | 73 | const AS_READ_ONLY_PAGE_LOGGED = 219; |
| 74 | + |
| 75 | + /** |
| 76 | + * Status: wiki is in readonly mode (wfReadOnly() == true) |
| 77 | + */ |
34 | 78 | const AS_READ_ONLY_PAGE = 220; |
| 79 | + |
| 80 | + /** |
| 81 | + * Status: rate limiter for action 'edit' was tripped |
| 82 | + */ |
35 | 83 | const AS_RATE_LIMITED = 221; |
| 84 | + |
| 85 | + /** |
| 86 | + * Status: article was deleted while editting and param wpRecreate == false or form |
| 87 | + * was not posted |
| 88 | + */ |
36 | 89 | const AS_ARTICLE_WAS_DELETED = 222; |
| 90 | + |
| 91 | + /** |
| 92 | + * Status: user tried to create this page, but is not allowed to do that |
| 93 | + * ( Title->usercan('create') == false ) |
| 94 | + */ |
37 | 95 | const AS_NO_CREATE_PERMISSION = 223; |
| 96 | + |
| 97 | + /** |
| 98 | + * Status: user tried to create a blank page |
| 99 | + */ |
38 | 100 | const AS_BLANK_ARTICLE = 224; |
| 101 | + |
| 102 | + /** |
| 103 | + * Status: (non-resolvable) edit conflict |
| 104 | + */ |
39 | 105 | const AS_CONFLICT_DETECTED = 225; |
| 106 | + |
| 107 | + /** |
| 108 | + * Status: no edit summary given and the user has forceeditsummary set and the user is not |
| 109 | + * editting in his own userspace or talkspace and wpIgnoreBlankSummary == false |
| 110 | + */ |
40 | 111 | const AS_SUMMARY_NEEDED = 226; |
| 112 | + |
| 113 | + /** |
| 114 | + * Status: user tried to create a new section without content |
| 115 | + */ |
41 | 116 | const AS_TEXTBOX_EMPTY = 228; |
| 117 | + |
| 118 | + /** |
| 119 | + * Status: article is too big (> $wgMaxArticleSize), after merging in the new section |
| 120 | + */ |
42 | 121 | const AS_MAX_ARTICLE_SIZE_EXCEEDED = 229; |
| 122 | + |
| 123 | + /** |
| 124 | + * not used |
| 125 | + */ |
43 | 126 | const AS_OK = 230; |
| 127 | + |
| 128 | + /** |
| 129 | + * Status: WikiPage::doEdit() was unsuccessfull |
| 130 | + */ |
44 | 131 | const AS_END = 231; |
| 132 | + |
| 133 | + /** |
| 134 | + * Status: summary contained spam according to one of the regexes in $wgSummarySpamRegex |
| 135 | + */ |
45 | 136 | const AS_SPAM_ERROR = 232; |
| 137 | + |
| 138 | + /** |
| 139 | + * Status: anonymous user is not allowed to upload (User::isAllowed('upload') == false) |
| 140 | + */ |
46 | 141 | const AS_IMAGE_REDIRECT_ANON = 233; |
| 142 | + |
| 143 | + /** |
| 144 | + * Status: logged in user is not allowed to upload (User::isAllowed('upload') == false) |
| 145 | + */ |
47 | 146 | const AS_IMAGE_REDIRECT_LOGGED = 234; |
48 | 147 | |
49 | 148 | /** |