Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 201 |
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-a2-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 status |
| 123 | define('NOTIFY_YES', 0); |
| 124 | define('NOTIFY_NO', 1); |
| 125 | |
| 126 | // Email Priority Settings |
| 127 | define('MAIL_LOW_PRIORITY', 4); |
| 128 | define('MAIL_NORMAL_PRIORITY', 3); |
| 129 | define('MAIL_HIGH_PRIORITY', 2); |
| 130 | |
| 131 | // Log types |
| 132 | define('LOG_ADMIN', 0); |
| 133 | define('LOG_MOD', 1); |
| 134 | define('LOG_CRITICAL', 2); |
| 135 | define('LOG_USERS', 3); |
| 136 | |
| 137 | // Private messaging - Do NOT change these values |
| 138 | define('PRIVMSGS_HOLD_BOX', -4); |
| 139 | define('PRIVMSGS_NO_BOX', -3); |
| 140 | define('PRIVMSGS_OUTBOX', -2); |
| 141 | define('PRIVMSGS_SENTBOX', -1); |
| 142 | define('PRIVMSGS_INBOX', 0); |
| 143 | |
| 144 | // Full Folder Actions |
| 145 | define('FULL_FOLDER_NONE', -3); |
| 146 | define('FULL_FOLDER_DELETE', -2); |
| 147 | define('FULL_FOLDER_HOLD', -1); |
| 148 | |
| 149 | // Confirm types |
| 150 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::REGISTRATION, to be removed in 5.0.0-a1 */ |
| 151 | define('CONFIRM_REG', 1); |
| 152 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::LOGIN, to be removed in 5.0.0-a1 */ |
| 153 | define('CONFIRM_LOGIN', 2); |
| 154 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::POST, to be removed in 5.0.0-a1 */ |
| 155 | define('CONFIRM_POST', 3); |
| 156 | /** @deprecated 4.0.0-a1 Replaced by \phpbb\captcha\plugins\confirm_type::REPORT, to be removed in 5.0.0-a1 */ |
| 157 | define('CONFIRM_REPORT', 4); |
| 158 | |
| 159 | // Categories - Attachments |
| 160 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
| 161 | define('ATTACHMENT_CATEGORY_NONE', 0); |
| 162 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
| 163 | define('ATTACHMENT_CATEGORY_IMAGE', 1); // Inline Images |
| 164 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
| 165 | define('ATTACHMENT_CATEGORY_THUMB', 4); // Not used within the database, only while displaying posts |
| 166 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
| 167 | define('ATTACHMENT_CATEGORY_AUDIO', 7); // Browser-playable audio files |
| 168 | /* @deprecated Replaced by \phpbb\attachment\attachment_category constants in 4.0.0-a1, to be removed in 4.1.0-a1 */ |
| 169 | define('ATTACHMENT_CATEGORY_VIDEO', 8); // Browser-playable video files |
| 170 | |
| 171 | // BBCode UID length |
| 172 | define('BBCODE_UID_LEN', 8); |
| 173 | |
| 174 | // Number of core BBCodes |
| 175 | define('NUM_CORE_BBCODES', 12); |
| 176 | define('NUM_PREDEFINED_BBCODES', 20); |
| 177 | |
| 178 | // BBCode IDs |
| 179 | define('BBCODE_ID_QUOTE', 0); |
| 180 | define('BBCODE_ID_B', 1); |
| 181 | define('BBCODE_ID_I', 2); |
| 182 | define('BBCODE_ID_URL', 3); |
| 183 | define('BBCODE_ID_IMG', 4); |
| 184 | define('BBCODE_ID_SIZE', 5); |
| 185 | define('BBCODE_ID_COLOR', 6); |
| 186 | define('BBCODE_ID_U', 7); |
| 187 | define('BBCODE_ID_CODE', 8); |
| 188 | define('BBCODE_ID_LIST', 9); |
| 189 | define('BBCODE_ID_EMAIL', 10); |
| 190 | define('BBCODE_ID_ATTACH', 12); |
| 191 | |
| 192 | // BBCode hard limit |
| 193 | define('BBCODE_LIMIT', 1511); |
| 194 | |
| 195 | // Smiley hard limit |
| 196 | define('SMILEY_LIMIT', 1000); |
| 197 | |
| 198 | // Magic url types |
| 199 | define('MAGIC_URL_EMAIL', 1); |
| 200 | define('MAGIC_URL_FULL', 2); |
| 201 | define('MAGIC_URL_LOCAL', 3); |
| 202 | define('MAGIC_URL_WWW', 4); |
| 203 | |
| 204 | // Profile Field Types |
| 205 | define('FIELD_INT', 1); |
| 206 | define('FIELD_STRING', 2); |
| 207 | define('FIELD_TEXT', 3); |
| 208 | define('FIELD_BOOL', 4); |
| 209 | define('FIELD_DROPDOWN', 5); |
| 210 | define('FIELD_DATE', 6); |
| 211 | |
| 212 | // referer validation |
| 213 | define('REFERER_VALIDATE_NONE', 0); |
| 214 | define('REFERER_VALIDATE_HOST', 1); |
| 215 | define('REFERER_VALIDATE_PATH', 2); |
| 216 | |
| 217 | // phpbb_chmod() permissions |
| 218 | @define('CHMOD_ALL', 7); // @deprecated 3.2.10 |
| 219 | @define('CHMOD_READ', 4); // @deprecated 3.2.10 |
| 220 | @define('CHMOD_WRITE', 2); // @deprecated 3.2.10 |
| 221 | @define('CHMOD_EXECUTE', 1); // @deprecated 3.2.10 |
| 222 | |
| 223 | // Captcha code length |
| 224 | define('CAPTCHA_MIN_CHARS', 4); |
| 225 | define('CAPTCHA_MAX_CHARS', 7); |
| 226 | |
| 227 | // Additional constants |
| 228 | define('VOTE_CONVERTED', 127); |
| 229 | |
| 230 | // BC global FTW |
| 231 | global $table_prefix; |
| 232 | |
| 233 | // Table names |
| 234 | define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups'); |
| 235 | define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options'); |
| 236 | define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data'); |
| 237 | define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles'); |
| 238 | define('ACL_USERS_TABLE', $table_prefix . 'acl_users'); |
| 239 | define('ATTACHMENTS_TABLE', $table_prefix . 'attachments'); |
| 240 | define('BACKUPS_TABLE', $table_prefix . 'backups'); |
| 241 | define('BANS_TABLE', $table_prefix . 'bans'); |
| 242 | define('BBCODES_TABLE', $table_prefix . 'bbcodes'); |
| 243 | define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks'); |
| 244 | define('BOTS_TABLE', $table_prefix . 'bots'); |
| 245 | if (!defined('CONFIG_TABLE')) |
| 246 | { |
| 247 | define('CONFIG_TABLE', $table_prefix . 'config'); |
| 248 | } |
| 249 | define('CONFIG_TEXT_TABLE', $table_prefix . 'config_text'); |
| 250 | define('CONFIRM_TABLE', $table_prefix . 'confirm'); |
| 251 | define('DISALLOW_TABLE', $table_prefix . 'disallow'); |
| 252 | define('DRAFTS_TABLE', $table_prefix . 'drafts'); |
| 253 | define('EXT_TABLE', $table_prefix . 'ext'); |
| 254 | define('EXTENSIONS_TABLE', $table_prefix . 'extensions'); |
| 255 | define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups'); |
| 256 | define('FORUMS_TABLE', $table_prefix . 'forums'); |
| 257 | define('FORUMS_ACCESS_TABLE', $table_prefix . 'forums_access'); |
| 258 | define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_track'); |
| 259 | define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch'); |
| 260 | define('GROUPS_TABLE', $table_prefix . 'groups'); |
| 261 | define('ICONS_TABLE', $table_prefix . 'icons'); |
| 262 | define('LANG_TABLE', $table_prefix . 'lang'); |
| 263 | define('LOG_TABLE', $table_prefix . 'log'); |
| 264 | define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts'); |
| 265 | define('MIGRATIONS_TABLE', $table_prefix . 'migrations'); |
| 266 | define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache'); |
| 267 | define('MODULES_TABLE', $table_prefix . 'modules'); |
| 268 | define('NOTIFICATION_TYPES_TABLE', $table_prefix . 'notification_types'); |
| 269 | define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications'); |
| 270 | define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options'); |
| 271 | define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes'); |
| 272 | define('POSTS_TABLE', $table_prefix . 'posts'); |
| 273 | define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs'); |
| 274 | define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder'); |
| 275 | define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules'); |
| 276 | define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to'); |
| 277 | define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields'); |
| 278 | define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data'); |
| 279 | define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang'); |
| 280 | define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang'); |
| 281 | define('RANKS_TABLE', $table_prefix . 'ranks'); |
| 282 | define('REPORTS_TABLE', $table_prefix . 'reports'); |
| 283 | define('REPORTS_REASONS_TABLE', $table_prefix . 'reports_reasons'); |
| 284 | define('SEARCH_RESULTS_TABLE', $table_prefix . 'search_results'); |
| 285 | define('SEARCH_WORDLIST_TABLE', $table_prefix . 'search_wordlist'); |
| 286 | define('SEARCH_WORDMATCH_TABLE', $table_prefix . 'search_wordmatch'); |
| 287 | define('SESSIONS_TABLE', $table_prefix . 'sessions'); |
| 288 | define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys'); |
| 289 | define('SITELIST_TABLE', $table_prefix . 'sitelist'); |
| 290 | define('SMILIES_TABLE', $table_prefix . 'smilies'); |
| 291 | define('SPHINX_TABLE', $table_prefix . 'sphinx'); |
| 292 | define('STORAGE_TABLE', $table_prefix . 'storage'); |
| 293 | define('STYLES_TABLE', $table_prefix . 'styles'); |
| 294 | define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template'); |
| 295 | define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data'); |
| 296 | define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme'); |
| 297 | define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset'); |
| 298 | define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data'); |
| 299 | define('TEAMPAGE_TABLE', $table_prefix . 'teampage'); |
| 300 | define('TOPICS_TABLE', $table_prefix . 'topics'); |
| 301 | define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted'); |
| 302 | define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track'); |
| 303 | define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch'); |
| 304 | define('USER_GROUP_TABLE', $table_prefix . 'user_group'); |
| 305 | define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications'); |
| 306 | define('USERS_TABLE', $table_prefix . 'users'); |
| 307 | define('WARNINGS_TABLE', $table_prefix . 'warnings'); |
| 308 | define('WORDS_TABLE', $table_prefix . 'words'); |
| 309 | define('ZEBRA_TABLE', $table_prefix . 'zebra'); |
| 310 | |
| 311 | // Additional tables |