Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 204 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * |
4 | * This file is part of the phpBB Forum Software package. |
5 | * |
6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
7 | * @license GNU General Public License, version 2 (GPL-2.0) |
8 | * |
9 | * For full copyright and license information, please see |
10 | * the docs/CREDITS.txt file. |
11 | * |
12 | */ |
13 | |
14 | /** |
15 | * @ignore |
16 | */ |
17 | if (!defined('IN_PHPBB')) |
18 | { |
19 | exit; |
20 | } |
21 | |
22 | /** |
23 | * valid external constants: |
24 | * PHPBB_MSG_HANDLER |
25 | * PHPBB_DB_NEW_LINK |
26 | * PHPBB_ROOT_PATH |
27 | * PHPBB_ADMIN_PATH |
28 | */ |
29 | |
30 | // phpBB Version |
31 | @define('PHPBB_VERSION', '4.0.0-a1-dev'); |
32 | |
33 | // QA-related |
34 | // define('PHPBB_QA', 1); |
35 | |
36 | // User related |
37 | define('ANONYMOUS', 1); |
38 | |
39 | define('USER_ACTIVATION_NONE', 0); |
40 | define('USER_ACTIVATION_SELF', 1); |
41 | define('USER_ACTIVATION_ADMIN', 2); |
42 | define('USER_ACTIVATION_DISABLE', 3); |
43 | |
44 | define('AVATAR_UPLOAD', 1); |
45 | define('AVATAR_GALLERY', 3); |
46 | |
47 | define('USER_NORMAL', 0); |
48 | define('USER_INACTIVE', 1); |
49 | define('USER_IGNORE', 2); |
50 | define('USER_FOUNDER', 3); |
51 | |
52 | define('INACTIVE_REGISTER', 1); // Newly registered account |
53 | define('INACTIVE_PROFILE', 2); // Profile details changed |
54 | define('INACTIVE_MANUAL', 3); // Account deactivated by administrator |
55 | define('INACTIVE_REMIND', 4); // Forced user account reactivation |
56 | |
57 | // ACL |
58 | define('ACL_NEVER', 0); |
59 | define('ACL_YES', 1); |
60 | define('ACL_NO', -1); |
61 | |
62 | // Login error codes |
63 | define('LOGIN_BREAK', 2); |
64 | define('LOGIN_SUCCESS', 3); |
65 | define('LOGIN_SUCCESS_CREATE_PROFILE', 20); |
66 | define('LOGIN_SUCCESS_LINK_PROFILE', 21); |
67 | define('LOGIN_ERROR_USERNAME', 10); |
68 | define('LOGIN_ERROR_PASSWORD', 11); |
69 | define('LOGIN_ERROR_ACTIVE', 12); |
70 | define('LOGIN_ERROR_ATTEMPTS', 13); |
71 | define('LOGIN_ERROR_EXTERNAL_AUTH', 14); |
72 | define('LOGIN_ERROR_PASSWORD_CONVERT', 15); |
73 | |
74 | // Maximum login attempts |
75 | // The value is arbitrary, but it has to fit into the user_login_attempts field. |
76 | define('LOGIN_ATTEMPTS_MAX', 100); |
77 | |
78 | // Group settings |
79 | define('GROUP_OPEN', 0); |
80 | define('GROUP_CLOSED', 1); |
81 | define('GROUP_HIDDEN', 2); |
82 | define('GROUP_SPECIAL', 3); |
83 | define('GROUP_FREE', 4); |
84 | |
85 | // Forum/Topic states |
86 | define('FORUM_CAT', 0); |
87 | define('FORUM_POST', 1); |
88 | define('FORUM_LINK', 2); |
89 | define('ITEM_UNLOCKED', 0); |
90 | define('ITEM_LOCKED', 1); |
91 | define('ITEM_MOVED', 2); |
92 | |
93 | define('ITEM_UNAPPROVED', 0); // => has not yet been approved |
94 | define('ITEM_APPROVED', 1); // => has been approved, and has not been soft deleted |
95 | define('ITEM_DELETED', 2); // => has been soft deleted |
96 | define('ITEM_REAPPROVE', 3); // => has been edited and needs to be re-approved |
97 | |
98 | // Forum Flags |
99 | define('FORUM_FLAG_LINK_TRACK', 1); |
100 | define('FORUM_FLAG_PRUNE_POLL', 2); |
101 | define('FORUM_FLAG_PRUNE_ANNOUNCE', 4); |
102 | define('FORUM_FLAG_PRUNE_STICKY', 8); |
103 | define('FORUM_FLAG_ACTIVE_TOPICS', 16); |
104 | define('FORUM_FLAG_POST_REVIEW', 32); |
105 | define('FORUM_FLAG_QUICK_REPLY', 64); |
106 | |
107 | // Forum Options... sequential order. Modifications should begin at number 10 (number 29 is maximum) |
108 | define('FORUM_OPTION_FEED_NEWS', 1); |
109 | define('FORUM_OPTION_FEED_EXCLUDE', 2); |
110 | |
111 | // Optional text flags |
112 | define('OPTION_FLAG_BBCODE', 1); |
113 | define('OPTION_FLAG_SMILIES', 2); |
114 | define('OPTION_FLAG_LINKS', 4); |
115 | |
116 | // Topic types |
117 | define('POST_NORMAL', 0); |
118 | define('POST_STICKY', 1); |
119 | define('POST_ANNOUNCE', 2); |
120 | define('POST_GLOBAL', 3); |
121 | |
122 | // Notify methods |
123 | define('NOTIFY_EMAIL', 0); |
124 | define('NOTIFY_IM', 1); |
125 | define('NOTIFY_BOTH', 2); |
126 | |
127 | // Notify status |
128 | define('NOTIFY_YES', 0); |
129 | define('NOTIFY_NO', 1); |
130 | |
131 | // Email Priority Settings |
132 | define('MAIL_LOW_PRIORITY', 4); |
133 | define('MAIL_NORMAL_PRIORITY', 3); |
134 | define('MAIL_HIGH_PRIORITY', 2); |
135 | |
136 | // Log types |
137 | define('LOG_ADMIN', 0); |
138 | define('LOG_MOD', 1); |
139 | define('LOG_CRITICAL', 2); |
140 | define('LOG_USERS', 3); |
141 | |
142 | // Private messaging - Do NOT change these values |
143 | define('PRIVMSGS_HOLD_BOX', -4); |
144 | define('PRIVMSGS_NO_BOX', -3); |
145 | define('PRIVMSGS_OUTBOX', -2); |
146 | define('PRIVMSGS_SENTBOX', -1); |
147 | define('PRIVMSGS_INBOX', 0); |
148 | |
149 | // Full Folder Actions |
150 | define('FULL_FOLDER_NONE', -3); |
151 | define('FULL_FOLDER_DELETE', -2); |
152 | define('FULL_FOLDER_HOLD', -1); |
153 | |
154 | // Confirm types |
155 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::REGISTRATION, to be removed in 5.0.0-a1 */ |
156 | define('CONFIRM_REG', 1); |
157 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::LOGIN, to be removed in 5.0.0-a1 */ |
158 | define('CONFIRM_LOGIN', 2); |
159 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::POST, to be removed in 5.0.0-a1 */ |
160 | define('CONFIRM_POST', 3); |
161 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::REPORT, to be removed in 5.0.0-a1 */ |
162 | define('CONFIRM_REPORT', 4); |
163 | |
164 | // Categories - Attachments |
165 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
166 | define('ATTACHMENT_CATEGORY_NONE', 0); |
167 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
168 | define('ATTACHMENT_CATEGORY_IMAGE', 1); // Inline Images |
169 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
170 | define('ATTACHMENT_CATEGORY_THUMB', 4); // Not used within the database, only while displaying posts |
171 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
172 | define('ATTACHMENT_CATEGORY_AUDIO', 7); // Browser-playable audio files |
173 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
174 | define('ATTACHMENT_CATEGORY_VIDEO', 8); // Browser-playable video files |
175 | |
176 | // BBCode UID length |
177 | define('BBCODE_UID_LEN', 8); |
178 | |
179 | // Number of core BBCodes |
180 | define('NUM_CORE_BBCODES', 12); |
181 | define('NUM_PREDEFINED_BBCODES', 20); |
182 | |
183 | // BBCode IDs |
184 | define('BBCODE_ID_QUOTE', 0); |
185 | define('BBCODE_ID_B', 1); |
186 | define('BBCODE_ID_I', 2); |
187 | define('BBCODE_ID_URL', 3); |
188 | define('BBCODE_ID_IMG', 4); |
189 | define('BBCODE_ID_SIZE', 5); |
190 | define('BBCODE_ID_COLOR', 6); |
191 | define('BBCODE_ID_U', 7); |
192 | define('BBCODE_ID_CODE', 8); |
193 | define('BBCODE_ID_LIST', 9); |
194 | define('BBCODE_ID_EMAIL', 10); |
195 | define('BBCODE_ID_ATTACH', 12); |
196 | |
197 | // BBCode hard limit |
198 | define('BBCODE_LIMIT', 1511); |
199 | |
200 | // Smiley hard limit |
201 | define('SMILEY_LIMIT', 1000); |
202 | |
203 | // Magic url types |
204 | define('MAGIC_URL_EMAIL', 1); |
205 | define('MAGIC_URL_FULL', 2); |
206 | define('MAGIC_URL_LOCAL', 3); |
207 | define('MAGIC_URL_WWW', 4); |
208 | |
209 | // Profile Field Types |
210 | define('FIELD_INT', 1); |
211 | define('FIELD_STRING', 2); |
212 | define('FIELD_TEXT', 3); |
213 | define('FIELD_BOOL', 4); |
214 | define('FIELD_DROPDOWN', 5); |
215 | define('FIELD_DATE', 6); |
216 | |
217 | // referer validation |
218 | define('REFERER_VALIDATE_NONE', 0); |
219 | define('REFERER_VALIDATE_HOST', 1); |
220 | define('REFERER_VALIDATE_PATH', 2); |
221 | |
222 | // phpbb_chmod() permissions |
223 | @define('CHMOD_ALL', 7); // @deprecated 3.2.10 |
224 | @define('CHMOD_READ', 4); // @deprecated 3.2.10 |
225 | @define('CHMOD_WRITE', 2); // @deprecated 3.2.10 |
226 | @define('CHMOD_EXECUTE', 1); // @deprecated 3.2.10 |
227 | |
228 | // Captcha code length |
229 | define('CAPTCHA_MIN_CHARS', 4); |
230 | define('CAPTCHA_MAX_CHARS', 7); |
231 | |
232 | // Additional constants |
233 | define('VOTE_CONVERTED', 127); |
234 | |
235 | // BC global FTW |
236 | global $table_prefix; |
237 | |
238 | // Table names |
239 | define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups'); |
240 | define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options'); |
241 | define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data'); |
242 | define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles'); |
243 | define('ACL_USERS_TABLE', $table_prefix . 'acl_users'); |
244 | define('ATTACHMENTS_TABLE', $table_prefix . 'attachments'); |
245 | define('BACKUPS_TABLE', $table_prefix . 'backups'); |
246 | define('BANS_TABLE', $table_prefix . 'bans'); |
247 | define('BBCODES_TABLE', $table_prefix . 'bbcodes'); |
248 | define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks'); |
249 | define('BOTS_TABLE', $table_prefix . 'bots'); |
250 | if (!defined('CONFIG_TABLE')) |
251 | { |
252 | define('CONFIG_TABLE', $table_prefix . 'config'); |
253 | } |
254 | define('CONFIG_TEXT_TABLE', $table_prefix . 'config_text'); |
255 | define('CONFIRM_TABLE', $table_prefix . 'confirm'); |
256 | define('DISALLOW_TABLE', $table_prefix . 'disallow'); |
257 | define('DRAFTS_TABLE', $table_prefix . 'drafts'); |
258 | define('EXT_TABLE', $table_prefix . 'ext'); |
259 | define('EXTENSIONS_TABLE', $table_prefix . 'extensions'); |
260 | define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups'); |
261 | define('FORUMS_TABLE', $table_prefix . 'forums'); |
262 | define('FORUMS_ACCESS_TABLE', $table_prefix . 'forums_access'); |
263 | define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_track'); |
264 | define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch'); |
265 | define('GROUPS_TABLE', $table_prefix . 'groups'); |
266 | define('ICONS_TABLE', $table_prefix . 'icons'); |
267 | define('LANG_TABLE', $table_prefix . 'lang'); |
268 | define('LOG_TABLE', $table_prefix . 'log'); |
269 | define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts'); |
270 | define('MIGRATIONS_TABLE', $table_prefix . 'migrations'); |
271 | define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache'); |
272 | define('MODULES_TABLE', $table_prefix . 'modules'); |
273 | define('NOTIFICATION_TYPES_TABLE', $table_prefix . 'notification_types'); |
274 | define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications'); |
275 | define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options'); |
276 | define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes'); |
277 | define('POSTS_TABLE', $table_prefix . 'posts'); |
278 | define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs'); |
279 | define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder'); |
280 | define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules'); |
281 | define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to'); |
282 | define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields'); |
283 | define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data'); |
284 | define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang'); |
285 | define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang'); |
286 | define('RANKS_TABLE', $table_prefix . 'ranks'); |
287 | define('REPORTS_TABLE', $table_prefix . 'reports'); |
288 | define('REPORTS_REASONS_TABLE', $table_prefix . 'reports_reasons'); |
289 | define('SEARCH_RESULTS_TABLE', $table_prefix . 'search_results'); |
290 | define('SEARCH_WORDLIST_TABLE', $table_prefix . 'search_wordlist'); |
291 | define('SEARCH_WORDMATCH_TABLE', $table_prefix . 'search_wordmatch'); |
292 | define('SESSIONS_TABLE', $table_prefix . 'sessions'); |
293 | define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys'); |
294 | define('SITELIST_TABLE', $table_prefix . 'sitelist'); |
295 | define('SMILIES_TABLE', $table_prefix . 'smilies'); |
296 | define('SPHINX_TABLE', $table_prefix . 'sphinx'); |
297 | define('STORAGE_TABLE', $table_prefix . 'storage'); |
298 | define('STYLES_TABLE', $table_prefix . 'styles'); |
299 | define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template'); |
300 | define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data'); |
301 | define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme'); |
302 | define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset'); |
303 | define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data'); |
304 | define('TEAMPAGE_TABLE', $table_prefix . 'teampage'); |
305 | define('TOPICS_TABLE', $table_prefix . 'topics'); |
306 | define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted'); |
307 | define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track'); |
308 | define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch'); |
309 | define('USER_GROUP_TABLE', $table_prefix . 'user_group'); |
310 | define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications'); |
311 | define('USERS_TABLE', $table_prefix . 'users'); |
312 | define('WARNINGS_TABLE', $table_prefix . 'warnings'); |
313 | define('WORDS_TABLE', $table_prefix . 'words'); |
314 | define('ZEBRA_TABLE', $table_prefix . 'zebra'); |
315 | |
316 | // Additional tables |