Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation; either version 2 of the License, or |
6 | * (at your option) any later version. |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | * |
13 | * You should have received a copy of the GNU General Public License along |
14 | * with this program; if not, write to the Free Software Foundation, Inc., |
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
16 | * http://www.gnu.org/copyleft/gpl.html |
17 | * |
18 | * @file |
19 | */ |
20 | |
21 | namespace MediaWiki\EditPage; |
22 | |
23 | /** |
24 | * Serves as a common repository of constants for EditPage edit status results |
25 | * |
26 | * Each of these is a possible status value |
27 | * |
28 | * @internal |
29 | */ |
30 | interface IEditObject { |
31 | /** Status: Article successfully updated */ |
32 | public const AS_SUCCESS_UPDATE = 200; |
33 | |
34 | /** Status: Article successfully created */ |
35 | public const AS_SUCCESS_NEW_ARTICLE = 201; |
36 | |
37 | /** Status: Article update aborted by a hook function */ |
38 | public const AS_HOOK_ERROR = 210; |
39 | |
40 | /** Status: A hook function returned an error */ |
41 | public const AS_HOOK_ERROR_EXPECTED = 212; |
42 | |
43 | /** Status: User is blocked from editing this page */ |
44 | public const AS_BLOCKED_PAGE_FOR_USER = 215; |
45 | |
46 | /** Status: Content too big (> $wgMaxArticleSize) */ |
47 | public const AS_CONTENT_TOO_BIG = 216; |
48 | |
49 | /** Status: revision x was deleted while editing (?action=edit&oldid=x) */ |
50 | public const AS_REVISION_WAS_DELETED = 217; |
51 | |
52 | /** Status: this anonymous user is not allowed to edit this page */ |
53 | public const AS_READ_ONLY_PAGE_ANON = 218; |
54 | |
55 | /** Status: this logged in user is not allowed to edit this page */ |
56 | public const AS_READ_ONLY_PAGE_LOGGED = 219; |
57 | |
58 | /** Status: wiki is in readonly mode (ReadOnlyMode::isReadOnly() == true) */ |
59 | public const AS_READ_ONLY_PAGE = 220; |
60 | |
61 | /** Status: rate limiter for action 'edit' was tripped */ |
62 | public const AS_RATE_LIMITED = 221; |
63 | |
64 | /** Status: article was deleted while editing and wpRecreate == false or form was not posted */ |
65 | public const AS_ARTICLE_WAS_DELETED = 222; |
66 | |
67 | /** Status: user tried to create this page, but is not allowed to do that */ |
68 | public const AS_NO_CREATE_PERMISSION = 223; |
69 | |
70 | /** Status: user tried to create a blank page and wpIgnoreBlankArticle == false */ |
71 | public const AS_BLANK_ARTICLE = 224; |
72 | |
73 | /** Status: (non-resolvable) edit conflict */ |
74 | public const AS_CONFLICT_DETECTED = 225; |
75 | |
76 | /** |
77 | * Status: no edit summary given and the user has forceeditsummary set and the user is not |
78 | * editing in his own userspace or talkspace and wpIgnoreBlankSummary == false |
79 | */ |
80 | public const AS_SUMMARY_NEEDED = 226; |
81 | |
82 | /** Status: user tried to create a new section without content */ |
83 | public const AS_TEXTBOX_EMPTY = 228; |
84 | |
85 | /** Status: article is too big (> $wgMaxArticleSize), after merging in the new section */ |
86 | public const AS_MAX_ARTICLE_SIZE_EXCEEDED = 229; |
87 | |
88 | /** Status: WikiPage::doEdit() was unsuccessful */ |
89 | public const AS_END = 231; |
90 | |
91 | /** Status: summary contained spam according to one of the regexes in $wgSummarySpamRegex */ |
92 | public const AS_SPAM_ERROR = 232; |
93 | |
94 | /** Status: anonymous user is not allowed to upload (User::isAllowed('upload') == false) */ |
95 | public const AS_IMAGE_REDIRECT_ANON = 233; |
96 | |
97 | /** Status: logged in user is not allowed to upload (User::isAllowed('upload') == false) */ |
98 | public const AS_IMAGE_REDIRECT_LOGGED = 234; |
99 | |
100 | /** |
101 | * Status: user tried to modify the content model, but is not allowed to do that |
102 | * ( User::isAllowed('editcontentmodel') == false ) |
103 | */ |
104 | public const AS_NO_CHANGE_CONTENT_MODEL = 235; |
105 | |
106 | /** Status: user tried to create self-redirect and wpIgnoreSelfRedirect is false */ |
107 | public const AS_SELF_REDIRECT = 236; |
108 | |
109 | /** Status: an error relating to change tagging. Look at the message key for more details */ |
110 | public const AS_CHANGE_TAG_ERROR = 237; |
111 | |
112 | /** Status: can't parse content */ |
113 | public const AS_PARSE_ERROR = 240; |
114 | |
115 | /** Status: edit rejected because browser doesn't support Unicode. */ |
116 | public const AS_UNICODE_NOT_SUPPORTED = 242; |
117 | |
118 | /** Status: edit rejected because server was unable to acquire a temporary account name for this user */ |
119 | public const AS_UNABLE_TO_ACQUIRE_TEMP_ACCOUNT = 243; |
120 | |
121 | /** Status: user tried to create a redirect to a nonexistent page and wpIgnoreBrokenRedirects is false */ |
122 | public const AS_BROKEN_REDIRECT = 244; |
123 | } |