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