diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-27 12:18:04 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-27 12:18:04 +0000 |
commit | 25725c98503c3a9ba8b5de4b91c2528b6c974a03 (patch) | |
tree | adf5470b0a4f90ef44b9be7a9761c4a6153072aa /phpBB/modules | |
parent | 297af28a40e5fa94de0cb2f57d807b39020f44f0 (diff) | |
download | forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.gz forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.bz2 forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.xz forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.zip |
replace constants with class constants.
ACL_YES, ACL_NO, ACL_NEVER, USER_NORMAL, USER_IGNORE, USER_INACTIVE, USER_FOUNDER
git-svn-id: file:///svn/phpbb/trunk@9233 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/modules')
-rw-r--r-- | phpBB/modules/acp/acp_attachments.php | 2 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_bots.php | 2 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_email.php | 4 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_groups.php | 10 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_inactive.php | 2 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_main.php | 6 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_permission_roles.php | 12 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_permissions.php | 94 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_prune.php | 2 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_users.php | 66 | ||||
-rw-r--r-- | phpBB/modules/acp/auth.php | 58 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_warn.php | 2 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_activate.php | 2 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_groups.php | 2 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_pm_compose.php | 2 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_profile.php | 4 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_register.php | 6 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_remind.php | 4 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_resend.php | 6 | ||||
-rw-r--r-- | phpBB/modules/ucp/ucp_zebra.php | 4 |
20 files changed, 145 insertions, 145 deletions
diff --git a/phpBB/modules/acp/acp_attachments.php b/phpBB/modules/acp/acp_attachments.php index 3a456b18ca..6b827a91fb 100644 --- a/phpBB/modules/acp/acp_attachments.php +++ b/phpBB/modules/acp/acp_attachments.php @@ -1201,7 +1201,7 @@ class acp_attachments if (!file_exists(PHPBB_ROOT_PATH . $upload_dir)) { @mkdir(PHPBB_ROOT_PATH . $upload_dir, 0777); - phpbb_chmod(PHPBB_ROOT_PATH . $upload_dir, CHMOD_READ | CHMOD_WRITE); + phpbb_chmod(PHPBB_ROOT_PATH . $upload_dir, phpbb::CHMOD_READ | phpbb::CHMOD_WRITE); } } diff --git a/phpBB/modules/acp/acp_bots.php b/phpBB/modules/acp/acp_bots.php index f067bcc32b..b1a0f3f7cd 100644 --- a/phpBB/modules/acp/acp_bots.php +++ b/phpBB/modules/acp/acp_bots.php @@ -222,7 +222,7 @@ class acp_bots $user_id = user_add(array( - 'user_type' => (int) USER_IGNORE, + 'user_type' => (int) phpbb::USER_IGNORE, 'group_id' => (int) $group_row['group_id'], 'username' => (string) $bot_row['bot_name'], 'user_regdate' => time(), diff --git a/phpBB/modules/acp/acp_email.php b/phpBB/modules/acp/acp_email.php index 25ce68c75a..c516c77f6c 100644 --- a/phpBB/modules/acp/acp_email.php +++ b/phpBB/modules/acp/acp_email.php @@ -87,7 +87,7 @@ class acp_email AND ug.user_pending = 0 AND u.user_id = ug.user_id AND u.user_allow_massemail = 1 - AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') + AND u.user_type IN (' . phpbb::USER_NORMAL . ', ' . phpbb::USER_FOUNDER . ') ORDER BY u.user_lang, u.user_notify_type'; } else @@ -95,7 +95,7 @@ class acp_email $sql = 'SELECT username, username_clean, user_email, user_jabber, user_notify_type, user_lang FROM ' . USERS_TABLE . ' WHERE user_allow_massemail = 1 - AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') + AND user_type IN (' . phpbb::USER_NORMAL . ', ' . phpbb::USER_FOUNDER . ') ORDER BY user_lang, user_notify_type'; } } diff --git a/phpBB/modules/acp/acp_groups.php b/phpBB/modules/acp/acp_groups.php index 5af7578665..f01ca2290c 100644 --- a/phpBB/modules/acp/acp_groups.php +++ b/phpBB/modules/acp/acp_groups.php @@ -67,7 +67,7 @@ class acp_groups } // Check if the user is allowed to manage this group if set to founder only. - if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage']) + if ($user->data['user_type'] != phpbb::USER_FOUNDER && $group_row['group_founder_manage']) { trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -310,7 +310,7 @@ class acp_groups 'founder_manage' => 0, ); - if ($user->data['user_type'] == USER_FOUNDER) + if ($user->data['user_type'] == phpbb::USER_FOUNDER) { $submit_ary['founder_manage'] = phpbb_request::is_set('group_founder_manage') ? 1 : 0; } @@ -426,7 +426,7 @@ class acp_groups $db->sql_freeresult($result); // Check the group if non-founder - if ($check_row && ($user->data['user_type'] == USER_FOUNDER || $check_row['group_founder_manage'] == 0)) + if ($check_row && ($user->data['user_type'] == phpbb::USER_FOUNDER || $check_row['group_founder_manage'] == 0)) { // From the mysql documentation: // Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14. @@ -549,7 +549,7 @@ class acp_groups 'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false, 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false, 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false, - 'S_USER_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false, + 'S_USER_FOUNDER' => ($user->data['user_type'] == phpbb::USER_FOUNDER) ? true : false, 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name, @@ -568,7 +568,7 @@ class acp_groups 'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'], 'S_RANK_OPTIONS' => $rank_options, - 'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == USER_FOUNDER) ? false : 0)), + 'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == phpbb::USER_FOUNDER) ? false : 0)), 'AVATAR' => $avatar_img, 'AVATAR_IMAGE' => $avatar_img, 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'], diff --git a/phpBB/modules/acp/acp_inactive.php b/phpBB/modules/acp/acp_inactive.php index 369dc38d78..d1feaf4901 100644 --- a/phpBB/modules/acp/acp_inactive.php +++ b/phpBB/modules/acp/acp_inactive.php @@ -82,7 +82,7 @@ class acp_inactive $sql = 'SELECT user_id, username, user_email, user_lang FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $mark) . ' - AND user_type = ' . USER_INACTIVE; + AND user_type = ' . phpbb::USER_INACTIVE; $result = $db->sql_query($sql); $inactive_users = array(); diff --git a/phpBB/modules/acp/acp_main.php b/phpBB/modules/acp/acp_main.php index c79625ee39..5e7e998f34 100644 --- a/phpBB/modules/acp/acp_main.php +++ b/phpBB/modules/acp/acp_main.php @@ -149,7 +149,7 @@ class acp_main $sql = 'SELECT COUNT(user_id) AS stat FROM ' . USERS_TABLE . ' - WHERE user_type IN (' . USER_NORMAL . ',' . USER_FOUNDER . ')'; + WHERE user_type IN (' . phpbb::USER_NORMAL . ',' . phpbb::USER_FOUNDER . ')'; $result = $db->sql_query($sql); set_config('num_users', (int) $db->sql_fetchfield('stat'), true); $db->sql_freeresult($result); @@ -323,7 +323,7 @@ class acp_main break; case 'purge_cache': - if ((int) $user->data['user_type'] !== USER_FOUNDER) + if ((int) $user->data['user_type'] !== phpbb::USER_FOUNDER) { trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -440,7 +440,7 @@ class acp_main 'U_INACTIVE_USERS' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=inactive&mode=list'), 'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false, - 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false, + 'S_FOUNDER' => ($user->data['user_type'] == phpbb::USER_FOUNDER) ? true : false, ) ); diff --git a/phpBB/modules/acp/acp_permission_roles.php b/phpBB/modules/acp/acp_permission_roles.php index 90ed532874..00bdcedcc6 100644 --- a/phpBB/modules/acp/acp_permission_roles.php +++ b/phpBB/modules/acp/acp_permission_roles.php @@ -262,7 +262,7 @@ class acp_permission_roles $auth_options = array(); while ($row = $db->sql_fetchrow($result)) { - $auth_options[$row['auth_option']] = ACL_NO; + $auth_options[$row['auth_option']] = phpbb::ACL_NO; } $db->sql_freeresult($result); } @@ -329,7 +329,7 @@ class acp_permission_roles { if (!isset($auth_options[$row['auth_option']])) { - $auth_options[$row['auth_option']] = ACL_NO; + $auth_options[$row['auth_option']] = phpbb::ACL_NO; } } $db->sql_freeresult($result); @@ -482,9 +482,9 @@ class acp_permission_roles foreach ($cat_array['permissions'] as $permission => $allowed) { $template->assign_block_vars('auth.mask', array( - 'S_YES' => ($allowed == ACL_YES) ? true : false, - 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false, - 'S_NO' => ($allowed == ACL_NO) ? true : false, + 'S_YES' => ($allowed == phpbb::ACL_YES) ? true : false, + 'S_NEVER' => ($allowed == phpbb::ACL_NEVER) ? true : false, + 'S_NO' => ($allowed == phpbb::ACL_NO) ? true : false, 'FIELD_NAME' => $permission, 'PERMISSION' => $user->lang['acl_' . $permission]['lang']) @@ -511,7 +511,7 @@ class acp_permission_roles $auth_settings = array(); while ($row = $db->sql_fetchrow($result)) { - $auth_settings[$row['auth_option']] = ACL_NO; + $auth_settings[$row['auth_option']] = phpbb::ACL_NO; } $db->sql_freeresult($result); diff --git a/phpBB/modules/acp/acp_permissions.php b/phpBB/modules/acp/acp_permissions.php index 51785a386c..9b3d966ebd 100644 --- a/phpBB/modules/acp/acp_permissions.php +++ b/phpBB/modules/acp/acp_permissions.php @@ -368,7 +368,7 @@ class acp_permissions $template->assign_vars(array( 'S_SELECT_GROUP' => true, - 'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == USER_FOUNDER) ? false : 0))) + 'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == phpbb::USER_FOUNDER) ? false : 0))) ); break; @@ -414,7 +414,7 @@ class acp_permissions 'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false, 'S_DEFINED_USER_OPTIONS' => $items['user_ids_options'], 'S_DEFINED_GROUP_OPTIONS' => $items['group_ids_options'], - 'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], (($user->data['user_type'] == USER_FOUNDER) ? false : 0)), + 'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], (($user->data['user_type'] == phpbb::USER_FOUNDER) ? false : 0)), 'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=add_user&field=username&select_single=true'), )); @@ -481,7 +481,7 @@ class acp_permissions 'S_SETTING_PERMISSIONS' => true) ); - $hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NO); + $hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, phpbb::ACL_NO); $auth_admin->display_mask('set', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false)); } else @@ -490,7 +490,7 @@ class acp_permissions 'S_VIEWING_PERMISSIONS' => true) ); - $hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NEVER); + $hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, phpbb::ACL_NEVER); $auth_admin->display_mask('view', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false)); } } @@ -782,7 +782,7 @@ class acp_permissions // We need to add any ACL_NO setting from auth_settings to compare correctly foreach ($auth_settings as $option => $setting) { - if ($setting == ACL_NO) + if ($setting == phpbb::ACL_NO) { $test_auth_settings[$option] = $setting; } @@ -949,13 +949,13 @@ class acp_permissions while ($row = $db->sql_fetchrow($result)) { $groups[$row['group_id']] = array( - 'auth_setting' => ACL_NO, + 'auth_setting' => phpbb::ACL_NO, 'group_name' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'] ); } $db->sql_freeresult($result); - $total = ACL_NO; + $total = phpbb::ACL_NO; $add_key = (($forum_id) ? '_LOCAL' : ''); if (sizeof($groups)) @@ -973,18 +973,18 @@ class acp_permissions { switch ($row['auth_setting']) { - case ACL_NO: + case phpbb::ACL_NO: $information = $user->lang['TRACE_GROUP_NO' . $add_key]; break; - case ACL_YES: - $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_YES_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_GROUP_YES_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_GROUP_YES_TOTAL_NO' . $add_key]); - $total = ($total == ACL_NO) ? ACL_YES : $total; + case phpbb::ACL_YES: + $information = ($total == phpbb::ACL_YES) ? $user->lang['TRACE_GROUP_YES_TOTAL_YES' . $add_key] : (($total == phpbb::ACL_NEVER) ? $user->lang['TRACE_GROUP_YES_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_GROUP_YES_TOTAL_NO' . $add_key]); + $total = ($total == phpbb::ACL_NO) ? phpbb::ACL_YES : $total; break; - case ACL_NEVER: - $information = ($total == ACL_YES) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_GROUP_NEVER_TOTAL_NO' . $add_key]); - $total = ACL_NEVER; + case phpbb::ACL_NEVER: + $information = ($total == phpbb::ACL_YES) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_YES' . $add_key] : (($total == phpbb::ACL_NEVER) ? $user->lang['TRACE_GROUP_NEVER_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_GROUP_NEVER_TOTAL_NO' . $add_key]); + $total = phpbb::ACL_NEVER; break; } @@ -992,35 +992,35 @@ class acp_permissions 'WHO' => $row['group_name'], 'INFORMATION' => $information, - 'S_SETTING_NO' => ($row['auth_setting'] == ACL_NO) ? true : false, - 'S_SETTING_YES' => ($row['auth_setting'] == ACL_YES) ? true : false, - 'S_SETTING_NEVER' => ($row['auth_setting'] == ACL_NEVER) ? true : false, - 'S_TOTAL_NO' => ($total == ACL_NO) ? true : false, - 'S_TOTAL_YES' => ($total == ACL_YES) ? true : false, - 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false) + 'S_SETTING_NO' => ($row['auth_setting'] == phpbb::ACL_NO) ? true : false, + 'S_SETTING_YES' => ($row['auth_setting'] == phpbb::ACL_YES) ? true : false, + 'S_SETTING_NEVER' => ($row['auth_setting'] == phpbb::ACL_NEVER) ? true : false, + 'S_TOTAL_NO' => ($total == phpbb::ACL_NO) ? true : false, + 'S_TOTAL_YES' => ($total == phpbb::ACL_YES) ? true : false, + 'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false) ); } } // Get user specific permission... globally or for this forum $hold_ary = $auth->acl_user_raw_data($user_id, $permission, $forum_id); - $auth_setting = (!sizeof($hold_ary)) ? ACL_NO : $hold_ary[$user_id][$forum_id][$permission]; + $auth_setting = (!sizeof($hold_ary)) ? phpbb::ACL_NO : $hold_ary[$user_id][$forum_id][$permission]; switch ($auth_setting) { - case ACL_NO: - $information = ($total == ACL_NO) ? $user->lang['TRACE_USER_NO_TOTAL_NO' . $add_key] : $user->lang['TRACE_USER_KEPT' . $add_key]; - $total = ($total == ACL_NO) ? ACL_NEVER : $total; + case phpbb::ACL_NO: + $information = ($total == phpbb::ACL_NO) ? $user->lang['TRACE_USER_NO_TOTAL_NO' . $add_key] : $user->lang['TRACE_USER_KEPT' . $add_key]; + $total = ($total == phpbb::ACL_NO) ? phpbb::ACL_NEVER : $total; break; - case ACL_YES: - $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_YES_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_USER_YES_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_USER_YES_TOTAL_NO' . $add_key]); - $total = ($total == ACL_NO) ? ACL_YES : $total; + case phpbb::ACL_YES: + $information = ($total == phpbb::ACL_YES) ? $user->lang['TRACE_USER_YES_TOTAL_YES' . $add_key] : (($total == phpbb::ACL_NEVER) ? $user->lang['TRACE_USER_YES_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_USER_YES_TOTAL_NO' . $add_key]); + $total = ($total == phpbb::ACL_NO) ? phpbb::ACL_YES : $total; break; - case ACL_NEVER: - $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_NEVER_TOTAL_YES' . $add_key] : (($total == ACL_NEVER) ? $user->lang['TRACE_USER_NEVER_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_USER_NEVER_TOTAL_NO' . $add_key]); - $total = ACL_NEVER; + case phpbb::ACL_NEVER: + $information = ($total == phpbb::ACL_YES) ? $user->lang['TRACE_USER_NEVER_TOTAL_YES' . $add_key] : (($total == phpbb::ACL_NEVER) ? $user->lang['TRACE_USER_NEVER_TOTAL_NEVER' . $add_key] : $user->lang['TRACE_USER_NEVER_TOTAL_NO' . $add_key]); + $total = phpbb::ACL_NEVER; break; } @@ -1028,12 +1028,12 @@ class acp_permissions 'WHO' => $userdata['username'], 'INFORMATION' => $information, - 'S_SETTING_NO' => ($auth_setting == ACL_NO) ? true : false, - 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false, - 'S_SETTING_NEVER' => ($auth_setting == ACL_NEVER) ? true : false, + 'S_SETTING_NO' => ($auth_setting == phpbb::ACL_NO) ? true : false, + 'S_SETTING_YES' => ($auth_setting == phpbb::ACL_YES) ? true : false, + 'S_SETTING_NEVER' => ($auth_setting == phpbb::ACL_NEVER) ? true : false, 'S_TOTAL_NO' => false, - 'S_TOTAL_YES' => ($total == ACL_YES) ? true : false, - 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false) + 'S_TOTAL_YES' => ($total == phpbb::ACL_YES) ? true : false, + 'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false) ); if ($forum_id != 0 && isset($auth->acl_options['global'][$permission])) @@ -1051,8 +1051,8 @@ class acp_permissions if ($auth_setting) { - $information = ($total == ACL_YES) ? $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_YES'] : $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_NEVER']; - $total = ACL_YES; + $information = ($total == phpbb::ACL_YES) ? $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_YES'] : $user->lang['TRACE_USER_GLOBAL_YES_TOTAL_NEVER']; + $total = phpbb::ACL_YES; } else { @@ -1070,35 +1070,35 @@ class acp_permissions 'S_SETTING_YES' => $auth_setting, 'S_SETTING_NEVER' => !$auth_setting, 'S_TOTAL_NO' => false, - 'S_TOTAL_YES' => ($total == ACL_YES) ? true : false, - 'S_TOTAL_NEVER' => ($total == ACL_NEVER) ? true : false) + 'S_TOTAL_YES' => ($total == phpbb::ACL_YES) ? true : false, + 'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false) ); } } // Take founder status into account, overwriting the default values - if ($userdata['user_type'] == USER_FOUNDER && strpos($permission, 'a_') === 0) + if ($userdata['user_type'] == phpbb::USER_FOUNDER && strpos($permission, 'a_') === 0) { $template->assign_block_vars('trace', array( 'WHO' => $userdata['username'], 'INFORMATION' => $user->lang['TRACE_USER_FOUNDER'], - 'S_SETTING_NO' => ($auth_setting == ACL_NO) ? true : false, - 'S_SETTING_YES' => ($auth_setting == ACL_YES) ? true : false, - 'S_SETTING_NEVER' => ($auth_setting == ACL_NEVER) ? true : false, + 'S_SETTING_NO' => ($auth_setting == phpbb::ACL_NO) ? true : false, + 'S_SETTING_YES' => ($auth_setting == phpbb::ACL_YES) ? true : false, + 'S_SETTING_NEVER' => ($auth_setting == phpbb::ACL_NEVER) ? true : false, 'S_TOTAL_NO' => false, 'S_TOTAL_YES' => true, 'S_TOTAL_NEVER' => false) ); - $total = ACL_YES; + $total = phpbb::ACL_YES; } // Total value... $template->assign_vars(array( - 'S_RESULT_NO' => ($total == ACL_NO) ? true : false, - 'S_RESULT_YES' => ($total == ACL_YES) ? true : false, - 'S_RESULT_NEVER' => ($total == ACL_NEVER) ? true : false, + 'S_RESULT_NO' => ($total == phpbb::ACL_NO) ? true : false, + 'S_RESULT_YES' => ($total == phpbb::ACL_YES) ? true : false, + 'S_RESULT_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false, )); } diff --git a/phpBB/modules/acp/acp_prune.php b/phpBB/modules/acp/acp_prune.php index 42c3c139f4..91d9a371c0 100644 --- a/phpBB/modules/acp/acp_prune.php +++ b/phpBB/modules/acp/acp_prune.php @@ -436,7 +436,7 @@ class acp_prune $sql = 'SELECT user_id, username FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS . ' - AND user_type <> ' . USER_FOUNDER . " + AND user_type <> ' . phpbb::USER_FOUNDER . " $where_sql"; $result = $db->sql_query($sql); diff --git a/phpBB/modules/acp/acp_users.php b/phpBB/modules/acp/acp_users.php index 721c31f3cf..ab48f3b186 100644 --- a/phpBB/modules/acp/acp_users.php +++ b/phpBB/modules/acp/acp_users.php @@ -152,7 +152,7 @@ class acp_users ); // Prevent normal users/admins change/view founders if they are not a founder by themselves - if ($user->data['user_type'] != USER_FOUNDER && $user_row['user_type'] == USER_FOUNDER) + if ($user->data['user_type'] != phpbb::USER_FOUNDER && $user_row['user_type'] == phpbb::USER_FOUNDER) { trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -172,7 +172,7 @@ class acp_users if ($submit) { // You can't delete the founder - if ($delete && $user_row['user_type'] != USER_FOUNDER) + if ($delete && $user_row['user_type'] != phpbb::USER_FOUNDER) { if (!$auth->acl_get('a_userdel')) { @@ -223,7 +223,7 @@ class acp_users trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if ($user_row['user_type'] == USER_FOUNDER) + if ($user_row['user_type'] == phpbb::USER_FOUNDER) { trigger_error($user->lang['CANNOT_BAN_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } @@ -290,12 +290,12 @@ class acp_users trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if ($user_row['user_type'] == USER_FOUNDER) + if ($user_row['user_type'] == phpbb::USER_FOUNDER) { trigger_error($user->lang['CANNOT_FORCE_REACT_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if ($user_row['user_type'] == USER_IGNORE) + if ($user_row['user_type'] == phpbb::USER_IGNORE) { trigger_error($user->lang['CANNOT_FORCE_REACT_BOT'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } @@ -310,9 +310,9 @@ class acp_users $key_len = 54 - (strlen($server_url)); $key_len = ($key_len > 6) ? $key_len : 6; $user_actkey = substr($user_actkey, 0, $key_len); - $email_template = ($user_row['user_type'] == USER_NORMAL) ? 'user_reactivate_account' : 'user_resend_inactive'; + $email_template = ($user_row['user_type'] == phpbb::USER_NORMAL) ? 'user_reactivate_account' : 'user_resend_inactive'; - if ($user_row['user_type'] == USER_NORMAL) + if ($user_row['user_type'] == phpbb::USER_NORMAL) { user_active_flip('deactivate', $user_id, INACTIVE_REMIND); @@ -372,20 +372,20 @@ class acp_users trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if ($user_row['user_type'] == USER_FOUNDER) + if ($user_row['user_type'] == phpbb::USER_FOUNDER) { trigger_error($user->lang['CANNOT_DEACTIVATE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if ($user_row['user_type'] == USER_IGNORE) + if ($user_row['user_type'] == phpbb::USER_IGNORE) { trigger_error($user->lang['CANNOT_DEACTIVATE_BOT'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } user_active_flip('flip', $user_id); - $message = ($user_row['user_type'] == USER_INACTIVE) ? 'USER_ADMIN_ACTIVATED' : 'USER_ADMIN_DEACTIVED'; - $log = ($user_row['user_type'] == USER_INACTIVE) ? 'LOG_USER_ACTIVE' : 'LOG_USER_INACTIVE'; + $message = ($user_row['user_type'] == phpbb::USER_INACTIVE) ? 'USER_ADMIN_ACTIVATED' : 'USER_ADMIN_DEACTIVED'; + $log = ($user_row['user_type'] == phpbb::USER_INACTIVE) ? 'LOG_USER_ACTIVE' : 'LOG_USER_INACTIVE'; add_log('admin', $log, $user_row['username']); add_log('user', $user_id, $log . '_USER'); @@ -654,7 +654,7 @@ class acp_users // Handle registration info updates $data = array( 'username' => utf8_normalize_nfc(request_var('user', $user_row['username'], true)), - 'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0), + 'user_founder' => request_var('user_founder', ($user_row['user_type'] == phpbb::USER_FOUNDER) ? 1 : 0), 'email' => strtolower(request_var('user_email', $user_row['user_email'])), 'email_confirm' => strtolower(request_var('email_confirm', '')), 'new_password' => request_var('new_password', '', true), @@ -718,33 +718,33 @@ class acp_users { $sql_ary = array(); - if ($user_row['user_type'] != USER_FOUNDER || $user->data['user_type'] == USER_FOUNDER) + if ($user_row['user_type'] != phpbb::USER_FOUNDER || $user->data['user_type'] == phpbb::USER_FOUNDER) { // Only allow founders updating the founder status... - if ($user->data['user_type'] == USER_FOUNDER) + if ($user->data['user_type'] == phpbb::USER_FOUNDER) { // Setting a normal member to be a founder - if ($data['user_founder'] && $user_row['user_type'] != USER_FOUNDER) + if ($data['user_founder'] && $user_row['user_type'] != phpbb::USER_FOUNDER) { // Make sure the user is not setting an Inactive or ignored user to be a founder - if ($user_row['user_type'] == USER_IGNORE) + if ($user_row['user_type'] == phpbb::USER_IGNORE) { trigger_error($user->lang['CANNOT_SET_FOUNDER_IGNORED'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if ($user_row['user_type'] == USER_INACTIVE) + if ($user_row['user_type'] == phpbb::USER_INACTIVE) { trigger_error($user->lang['CANNOT_SET_FOUNDER_INACTIVE'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - $sql_ary['user_type'] = USER_FOUNDER; + $sql_ary['user_type'] = phpbb::USER_FOUNDER; } - else if (!$data['user_founder'] && $user_row['user_type'] == USER_FOUNDER) + else if (!$data['user_founder'] && $user_row['user_type'] == phpbb::USER_FOUNDER) { // Check if at least one founder is present $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' - WHERE user_type = ' . USER_FOUNDER . ' + WHERE user_type = ' . phpbb::USER_FOUNDER . ' AND user_id <> ' . $user_id; $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); @@ -752,7 +752,7 @@ class acp_users if ($row) { - $sql_ary['user_type'] = USER_NORMAL; + $sql_ary['user_type'] = phpbb::USER_NORMAL; } else { @@ -825,19 +825,19 @@ class acp_users { $quick_tool_ary = array(); - if ($user_row['user_type'] != USER_FOUNDER) + if ($user_row['user_type'] != phpbb::USER_FOUNDER) { $quick_tool_ary += array('banuser' => 'BAN_USER', 'banemail' => 'BAN_EMAIL', 'banip' => 'BAN_IP'); } - if ($user_row['user_type'] != USER_FOUNDER && $user_row['user_type'] != USER_IGNORE) + if ($user_row['user_type'] != phpbb::USER_FOUNDER && $user_row['user_type'] != phpbb::USER_IGNORE) { - $quick_tool_ary += array('active' => (($user_row['user_type'] == USER_INACTIVE) ? 'ACTIVATE' : 'DEACTIVATE')); + $quick_tool_ary += array('active' => (($user_row['user_type'] == phpbb::USER_INACTIVE) ? 'ACTIVATE' : 'DEACTIVATE')); } $quick_tool_ary += array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH'); - if ($config['email_enable'] && ($user_row['user_type'] == USER_NORMAL || $user_row['user_type'] == USER_INACTIVE)) + if ($config['email_enable'] && ($user_row['user_type'] == phpbb::USER_NORMAL || $user_row['user_type'] == phpbb::USER_INACTIVE)) { $quick_tool_ary['reactivate'] = 'FORCE'; } @@ -866,7 +866,7 @@ class acp_users $last_visit = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit']; $inactive_reason = ''; - if ($user_row['user_type'] == USER_INACTIVE) + if ($user_row['user_type'] == phpbb::USER_INACTIVE) { $inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN']; @@ -903,14 +903,14 @@ class acp_users 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']), 'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']), - 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false, + 'S_FOUNDER' => ($user->data['user_type'] == phpbb::USER_FOUNDER) ? true : false, 'S_OVERVIEW' => true, 'S_USER_IP' => ($user_row['user_ip']) ? true : false, - 'S_USER_FOUNDER' => ($user_row['user_type'] == USER_FOUNDER) ? true : false, + 'S_USER_FOUNDER' => ($user_row['user_type'] == phpbb::USER_FOUNDER) ? true : false, 'S_ACTION_OPTIONS' => $s_action_options, 'S_OWN_ACCOUNT' => ($user_id == $user->data['user_id']) ? true : false, - 'S_USER_INACTIVE' => ($user_row['user_type'] == USER_INACTIVE) ? true : false, + 'S_USER_INACTIVE' => ($user_row['user_type'] == phpbb::USER_INACTIVE) ? true : false, 'U_SHOW_IP' => $this->u_action . "&u=$user_id&ip=" . (($ip == 'ip') ? 'hostname' : 'ip'), 'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}", @@ -1801,7 +1801,7 @@ class acp_users $founder_manage = (int) $db->sql_fetchfield('group_founder_manage'); $db->sql_freeresult($result); - if ($user->data['user_type'] != USER_FOUNDER && $founder_manage) + if ($user->data['user_type'] != phpbb::USER_FOUNDER && $founder_manage) { trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } @@ -1921,7 +1921,7 @@ class acp_users } // Do not display those groups not allowed to be managed - if ($user->data['user_type'] != USER_FOUNDER && $row['group_founder_manage']) + if ($user->data['user_type'] != phpbb::USER_FOUNDER && $row['group_founder_manage']) { continue; } @@ -1992,7 +1992,7 @@ class acp_users while ($row = $db->sql_fetchrow($result)) { - $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', ACL_NEVER); + $hold_ary = $auth_admin->get_mask('view', $user_id, false, false, $row['auth_option'], 'global', phpbb::ACL_NEVER); $auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', false, false); } $db->sql_freeresult($result); @@ -2010,7 +2010,7 @@ class acp_users while ($row = $db->sql_fetchrow($result)) { - $hold_ary = $auth_admin->get_mask('view', $user_id, false, $forum_id, $row['auth_option'], 'local', ACL_NEVER); + $hold_ary = $auth_admin->get_mask('view', $user_id, false, $forum_id, $row['auth_option'], 'local', phpbb::ACL_NEVER); $auth_admin->display_mask('view', $row['auth_option'], $hold_ary, 'user', true, false); } $db->sql_freeresult($result); diff --git a/phpBB/modules/acp/auth.php b/phpBB/modules/acp/auth.php index 0fd78981a9..ee4e45a08d 100644 --- a/phpBB/modules/acp/auth.php +++ b/phpBB/modules/acp/auth.php @@ -58,7 +58,7 @@ class auth_admin extends auth $cache->put('_acl_options', $this->acl_options); } } - + /** * Get permission mask * This function only supports getting permissions of one type (for example a_) @@ -69,9 +69,9 @@ class auth_admin extends auth * @param mixed $forum_id forum_ids to search for. Defining a forum id also means getting local settings * @param string $auth_option the auth_option defines the permission setting to look for (a_ for example) * @param local|global $scope the scope defines the permission scope. If local, a forum_id is additionally required - * @param ACL_NEVER|ACL_NO|ACL_YES $acl_fill defines the mode those permissions not set are getting filled with + * @param phpbb::ACL_NEVER|phpbb::ACL_NO|phpbb::ACL_YES $acl_fill defines the mode those permissions not set are getting filled with */ - public function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = ACL_NEVER) + public function get_mask($mode, $user_id = false, $group_id = false, $forum_id = false, $auth_option = false, $scope = false, $acl_fill = phpbb::ACL_NEVER) { global $db, $user; @@ -140,7 +140,7 @@ class auth_admin extends auth $auth2 = &$auth; } - + $hold_ary[$userdata['user_id']] = array(); foreach ($forum_ids as $f_id) { @@ -345,7 +345,7 @@ class auth_admin extends auth // Build js roles array (role data assignments) $s_role_js_array = ''; - + if (sizeof($roles)) { $s_role_js_array = array(); @@ -797,7 +797,7 @@ class auth_admin extends auth reset($auth); $flag = key($auth); $flag = substr($flag, 0, strpos($flag, '_') + 1); - + // This ID (the any-flag) is set if one or more permissions are true... $any_option_id = (int) $this->acl_options['id'][$flag]; @@ -846,9 +846,9 @@ class auth_admin extends auth // Ok, include the any-flag if one or more auth options are set to yes... foreach ($auth as $auth_option => $setting) { - if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER)) + if ($setting == phpbb::ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == phpbb::ACL_NEVER)) { - $auth[$flag] = ACL_YES; + $auth[$flag] = phpbb::ACL_YES; } } @@ -876,7 +876,7 @@ class auth_admin extends auth { $auth_option_id = (int) $this->acl_options['id'][$auth_option]; - if ($setting != ACL_NO) + if ($setting != phpbb::ACL_NO) { foreach ($ug_id as $id) { @@ -911,7 +911,7 @@ class auth_admin extends auth reset($auth); $flag = key($auth); $flag = substr($flag, 0, strpos($flag, '_') + 1); - + // Remove any-flag from auth ary if (isset($auth[$flag])) { @@ -921,9 +921,9 @@ class auth_admin extends auth // Re-set any flag... foreach ($auth as $auth_option => $setting) { - if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NEVER)) + if ($setting == phpbb::ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == phpbb::ACL_NEVER)) { - $auth[$flag] = ACL_YES; + $auth[$flag] = phpbb::ACL_YES; } } @@ -932,7 +932,7 @@ class auth_admin extends auth { $auth_option_id = (int) $this->acl_options['id'][$auth_option]; - if ($setting != ACL_NO) + if ($setting != phpbb::ACL_NO) { $sql_ary[] = array( 'role_id' => (int) $role_id, @@ -948,7 +948,7 @@ class auth_admin extends auth $sql_ary[] = array( 'role_id' => (int) $role_id, 'auth_option_id' => (int) $this->acl_options['id'][$flag], - 'auth_setting' => ACL_NEVER + 'auth_setting' => phpbb::ACL_NEVER ); } @@ -1004,7 +1004,7 @@ class auth_admin extends auth while ($row = $db->sql_fetchrow($result)) { $option_id_ary[] = $row['auth_option_id']; - $auth_id_ary[$row['auth_option']] = ACL_NO; + $auth_id_ary[$row['auth_option']] = phpbb::ACL_NO; } $db->sql_freeresult($result); @@ -1062,7 +1062,7 @@ class auth_admin extends auth { $where_sql[] = $db->sql_in_set('auth_option_id', array_map('intval', $option_id_ary)); } - + $sql = "DELETE FROM $table WHERE " . implode(' AND ', $where_sql); $db->sql_query($sql); @@ -1085,7 +1085,7 @@ class auth_admin extends auth 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false, 'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false, 'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false, - + 'CAT_NAME' => $user->lang['permission_cat'][$cat]) ); @@ -1110,8 +1110,8 @@ class auth_admin extends auth if ($s_view) { $template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array( - 'S_YES' => ($allowed == ACL_YES) ? true : false, - 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false, + 'S_YES' => ($allowed == phpbb::ACL_YES) ? true : false, + 'S_NEVER' => ($allowed == phpbb::ACL_NEVER) ? true : false, 'UG_ID' => $ug_id, 'FORUM_ID' => $forum_id, @@ -1127,9 +1127,9 @@ class auth_admin extends auth else { $template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array( - 'S_YES' => ($allowed == ACL_YES) ? true : false, - 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false, - 'S_NO' => ($allowed == ACL_NO) ? true : false, + 'S_YES' => ($allowed == phpbb::ACL_YES) ? true : false, + 'S_NEVER' => ($allowed == phpbb::ACL_NEVER) ? true : false, + 'S_NO' => ($allowed == phpbb::ACL_NO) ? true : false, 'UG_ID' => $ug_id, 'FORUM_ID' => $forum_id, @@ -1174,9 +1174,9 @@ class auth_admin extends auth 'lang' => '{ acl_' . $permission . ' }' ); } - + $cat = $user->lang['acl_' . $permission]['cat']; - + // Build our categories array if (!isset($categories[$cat])) { @@ -1199,9 +1199,9 @@ class auth_admin extends auth ); } - $content_array[$forum_id][$cat]['S_YES'] |= ($auth_setting == ACL_YES) ? true : false; - $content_array[$forum_id][$cat]['S_NEVER'] |= ($auth_setting == ACL_NEVER) ? true : false; - $content_array[$forum_id][$cat]['S_NO'] |= ($auth_setting == ACL_NO) ? true : false; + $content_array[$forum_id][$cat]['S_YES'] |= ($auth_setting == phpbb::ACL_YES) ? true : false; + $content_array[$forum_id][$cat]['S_NEVER'] |= ($auth_setting == phpbb::ACL_NEVER) ? true : false; + $content_array[$forum_id][$cat]['S_NO'] |= ($auth_setting == phpbb::ACL_NO) ? true : false; $content_array[$forum_id][$cat]['permissions'][$permission] = $auth_setting; } @@ -1233,12 +1233,12 @@ class auth_admin extends auth { if (strpos($opt, 'a_') === 0) { - $hold_ary[0][$this->acl_options['id'][$opt]] = ACL_NEVER; + $hold_ary[0][$this->acl_options['id'][$opt]] = phpbb::ACL_NEVER; } } // Force a_switchperm to be allowed - $hold_ary[0][$this->acl_options['id']['a_switchperm']] = ACL_YES; + $hold_ary[0][$this->acl_options['id']['a_switchperm']] = phpbb::ACL_YES; $user_permissions = $this->build_bitstring($hold_ary); diff --git a/phpBB/modules/mcp/mcp_warn.php b/phpBB/modules/mcp/mcp_warn.php index 40753def41..959b90079c 100644 --- a/phpBB/modules/mcp/mcp_warn.php +++ b/phpBB/modules/mcp/mcp_warn.php @@ -212,7 +212,7 @@ class mcp_warn } // There is no point issuing a warning to ignored users (ie anonymous and bots) - if ($user_row['user_type'] == USER_IGNORE) + if ($user_row['user_type'] == phpbb::USER_IGNORE) { trigger_error('CANNOT_WARN_ANONYMOUS'); } diff --git a/phpBB/modules/ucp/ucp_activate.php b/phpBB/modules/ucp/ucp_activate.php index 594e346310..bc4618f5fd 100644 --- a/phpBB/modules/ucp/ucp_activate.php +++ b/phpBB/modules/ucp/ucp_activate.php @@ -44,7 +44,7 @@ class ucp_activate trigger_error('NO_USER'); } - if ($user_row['user_type'] <> USER_INACTIVE && !$user_row['user_newpasswd']) + if ($user_row['user_type'] <> phpbb::USER_INACTIVE && !$user_row['user_newpasswd']) { meta_refresh(3, append_sid('index')); trigger_error('ALREADY_ACTIVATED'); diff --git a/phpBB/modules/ucp/ucp_groups.php b/phpBB/modules/ucp/ucp_groups.php index 0c4a5dca31..67e6fdb9ea 100644 --- a/phpBB/modules/ucp/ucp_groups.php +++ b/phpBB/modules/ucp/ucp_groups.php @@ -429,7 +429,7 @@ class ucp_groups } // Check if the user is allowed to manage this group if set to founder only. - if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage']) + if ($user->data['user_type'] != phpbb::USER_FOUNDER && $group_row['group_founder_manage']) { trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . $return_page, E_USER_WARNING); } diff --git a/phpBB/modules/ucp/ucp_pm_compose.php b/phpBB/modules/ucp/ucp_pm_compose.php index ac9a4076cb..d81f5287eb 100644 --- a/phpBB/modules/ucp/ucp_pm_compose.php +++ b/phpBB/modules/ucp/ucp_pm_compose.php @@ -1147,7 +1147,7 @@ function handle_message_list_actions(&$address_list, &$error, $remove_u, $remove if (sizeof($usernames)) { $user_id_ary = array(); - user_get_id_name($user_id_ary, $usernames, array(USER_NORMAL, USER_FOUNDER, USER_INACTIVE)); + user_get_id_name($user_id_ary, $usernames, array(phpbb::USER_NORMAL, phpbb::USER_FOUNDER, phpbb::USER_INACTIVE)); // If there are users not existing, we will at least print a notice... if (!sizeof($user_id_ary)) diff --git a/phpBB/modules/ucp/ucp_profile.php b/phpBB/modules/ucp/ucp_profile.php index 626fb8023d..cdae16b6f4 100644 --- a/phpBB/modules/ucp/ucp_profile.php +++ b/phpBB/modules/ucp/ucp_profile.php @@ -133,7 +133,7 @@ class ucp_profile $message = 'PROFILE_UPDATED'; - if ($config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN)) + if ($config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != phpbb::USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN)) { $message = ($config['require_activation'] == USER_ACTIVATION_SELF) ? 'ACCOUNT_EMAIL_CHANGED' : 'ACCOUNT_EMAIL_CHANGED_ADMIN'; @@ -172,7 +172,7 @@ class ucp_profile $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array(); // Also include founders - $where_sql = ' WHERE user_type = ' . USER_FOUNDER; + $where_sql = ' WHERE user_type = ' . phpbb::USER_FOUNDER; if (sizeof($admin_ary)) { diff --git a/phpBB/modules/ucp/ucp_register.php b/phpBB/modules/ucp/ucp_register.php index b9ba1246ea..55f75bd9fb 100644 --- a/phpBB/modules/ucp/ucp_register.php +++ b/phpBB/modules/ucp/ucp_register.php @@ -277,13 +277,13 @@ class ucp_register $key_len = ($key_len < 6) ? 6 : $key_len; $user_actkey = substr($user_actkey, 0, $key_len); - $user_type = USER_INACTIVE; + $user_type = phpbb::USER_INACTIVE; $user_inactive_reason = INACTIVE_REGISTER; $user_inactive_time = time(); } else { - $user_type = USER_NORMAL; + $user_type = phpbb::USER_NORMAL; $user_actkey = ''; $user_inactive_reason = 0; $user_inactive_time = 0; @@ -375,7 +375,7 @@ class ucp_register $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array(); // Also include founders - $where_sql = ' WHERE user_type = ' . USER_FOUNDER; + $where_sql = ' WHERE user_type = ' . phpbb::USER_FOUNDER; if (sizeof($admin_ary)) { diff --git a/phpBB/modules/ucp/ucp_remind.php b/phpBB/modules/ucp/ucp_remind.php index db4b3c8fcc..550051ae18 100644 --- a/phpBB/modules/ucp/ucp_remind.php +++ b/phpBB/modules/ucp/ucp_remind.php @@ -48,12 +48,12 @@ class ucp_remind trigger_error('NO_EMAIL_USER'); } - if ($user_row['user_type'] == USER_IGNORE) + if ($user_row['user_type'] == phpbb::USER_IGNORE) { trigger_error('NO_USER'); } - if ($user_row['user_type'] == USER_INACTIVE) + if ($user_row['user_type'] == phpbb::USER_INACTIVE) { if ($user_row['user_inactive_reason'] == INACTIVE_MANUAL) { diff --git a/phpBB/modules/ucp/ucp_resend.php b/phpBB/modules/ucp/ucp_resend.php index fef6decf4a..38b333a5a4 100644 --- a/phpBB/modules/ucp/ucp_resend.php +++ b/phpBB/modules/ucp/ucp_resend.php @@ -55,17 +55,17 @@ class ucp_resend trigger_error('NO_EMAIL_USER'); } - if ($user_row['user_type'] == USER_IGNORE) + if ($user_row['user_type'] == phpbb::USER_IGNORE) { trigger_error('NO_USER'); } - if (!$user_row['user_actkey'] && $user_row['user_type'] != USER_INACTIVE) + if (!$user_row['user_actkey'] && $user_row['user_type'] != phpbb::USER_INACTIVE) { trigger_error('ACCOUNT_ALREADY_ACTIVATED'); } - if (!$user_row['user_actkey'] || ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_MANUAL)) + if (!$user_row['user_actkey'] || ($user_row['user_type'] == phpbb::USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_MANUAL)) { trigger_error('ACCOUNT_DEACTIVATED'); } diff --git a/phpBB/modules/ucp/ucp_zebra.php b/phpBB/modules/ucp/ucp_zebra.php index 6ba168a53c..a928e9985a 100644 --- a/phpBB/modules/ucp/ucp_zebra.php +++ b/phpBB/modules/ucp/ucp_zebra.php @@ -114,13 +114,13 @@ class ucp_zebra $sql = 'SELECT user_id, user_type FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('username_clean', $data['add']) . ' - AND user_type <> ' . USER_INACTIVE; + AND user_type <> ' . phpbb::USER_INACTIVE; $result = $db->sql_query($sql); $user_id_ary = array(); while ($row = $db->sql_fetchrow($result)) { - if ($row['user_id'] != ANONYMOUS && $row['user_type'] != USER_IGNORE) + if ($row['user_id'] != ANONYMOUS && $row['user_type'] != phpbb::USER_IGNORE) { $user_id_ary[] = $row['user_id']; } |