diff options
Diffstat (limited to 'phpBB/modules/acp')
-rw-r--r-- | phpBB/modules/acp/acp_attachments.php | 8 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_forums.php | 16 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_groups.php | 14 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_inactive.php | 2 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_logs.php | 4 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_permissions.php | 22 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_prune.php | 4 | ||||
-rw-r--r-- | phpBB/modules/acp/acp_users.php | 12 |
8 files changed, 41 insertions, 41 deletions
diff --git a/phpBB/modules/acp/acp_attachments.php b/phpBB/modules/acp/acp_attachments.php index a0e42d2ef3..6596b396e3 100644 --- a/phpBB/modules/acp/acp_attachments.php +++ b/phpBB/modules/acp/acp_attachments.php @@ -785,7 +785,7 @@ class acp_attachments continue; } - if (!$auth->acl_get('f_list', $row['forum_id'])) + if (!phpbb::$acl->acl_get('f_list', $row['forum_id'])) { // if the user does not have permissions to list this forum skip continue; @@ -962,11 +962,11 @@ class acp_attachments $template->assign_block_vars('upload', array( 'FILE_INFO' => sprintf(phpbb::$user->lang['UPLOADING_FILE_TO'], $row['real_filename'], $post_row['post_id']), - 'S_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? true : false, - 'L_DENIED' => (!$auth->acl_get('f_attach', $post_row['forum_id'])) ? sprintf(phpbb::$user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '') + 'S_DENIED' => (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) ? true : false, + 'L_DENIED' => (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) ? sprintf(phpbb::$user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '') ); - if (!$auth->acl_get('f_attach', $post_row['forum_id'])) + if (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) { continue; } diff --git a/phpBB/modules/acp/acp_forums.php b/phpBB/modules/acp/acp_forums.php index d2a99196c7..5117d5bbd1 100644 --- a/phpBB/modules/acp/acp_forums.php +++ b/phpBB/modules/acp/acp_forums.php @@ -58,7 +58,7 @@ class acp_forums case 'delete': - if (!$auth->acl_get('a_forumdel')) + if (!phpbb::$acl->acl_get('a_forumdel')) { trigger_error(phpbb::$user->lang['NO_PERMISSION_FORUM_DELETE'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); } @@ -67,7 +67,7 @@ class acp_forums case 'add': - if (!$auth->acl_get('a_forumadd')) + if (!phpbb::$acl->acl_get('a_forumadd')) { trigger_error(phpbb::$user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING); } @@ -93,7 +93,7 @@ class acp_forums break; } - $auth->acl_clear_prefetch(); + phpbb::$acl->acl_clear_prefetch(); phpbb::$acm->destroy_sql(FORUMS_TABLE); trigger_error(phpbb::$user->lang['FORUM_DELETED'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id)); @@ -181,7 +181,7 @@ class acp_forums // Copy permissions? if ($forum_perm_from && !empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] && - (($action != 'edit') || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth')))) + (($action != 'edit') || empty($forum_id) || (phpbb::$acl->acl_get('a_fauth') && phpbb::$acl->acl_get('a_authusers') && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_get('a_mauth')))) { // if we edit a forum delete current permissions first if ($action == 'edit') @@ -243,7 +243,7 @@ class acp_forums cache_moderators(); } - $auth->acl_clear_prefetch(); + phpbb::$acl->acl_clear_prefetch(); phpbb::$acm->destroy_sql(FORUMS_TABLE); $acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id']; @@ -251,13 +251,13 @@ class acp_forums $message = ($action == 'add') ? phpbb::$user->lang['FORUM_CREATED'] : phpbb::$user->lang['FORUM_UPDATED']; // Redirect to permissions - if ($auth->acl_get('a_fauth')) + if (phpbb::$acl->acl_get('a_fauth')) { $message .= '<br /><br />' . sprintf(phpbb::$user->lang['REDIRECT_ACL'], '<a href="' . append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions' . $acl_url) . '">', '</a>'); } // redirect directly to permission settings screen if authed - if ($action == 'add' && !$forum_perm_from && $auth->acl_get('a_fauth')) + if ($action == 'add' && !$forum_perm_from && phpbb::$acl->acl_get('a_fauth')) { meta_refresh(4, append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions' . $acl_url)); } @@ -681,7 +681,7 @@ class acp_forums 'S_PRUNE_STICKY' => ($forum_data['forum_flags'] & FORUM_FLAG_PRUNE_STICKY) ? true : false, 'S_DISPLAY_ACTIVE_TOPICS' => ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) ? true : false, 'S_ENABLE_POST_REVIEW' => ($forum_data['forum_flags'] & FORUM_FLAG_POST_REVIEW) ? true : false, - 'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))) ? true : false, + 'S_CAN_COPY_PERMISSIONS' => ($action != 'edit' || empty($forum_id) || (phpbb::$acl->acl_get('a_fauth') && phpbb::$acl->acl_get('a_authusers') && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_get('a_mauth'))) ? true : false, )); return; diff --git a/phpBB/modules/acp/acp_groups.php b/phpBB/modules/acp/acp_groups.php index 784bdab7c9..d1ececfdfd 100644 --- a/phpBB/modules/acp/acp_groups.php +++ b/phpBB/modules/acp/acp_groups.php @@ -195,7 +195,7 @@ class acp_groups switch ($action) { case 'delete': - if (!$auth->acl_get('a_groupdel')) + if (!phpbb::$acl->acl_get('a_groupdel')) { trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -267,7 +267,7 @@ class acp_groups trigger_error(phpbb::$user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING); } - if ($action == 'add' && !$auth->acl_get('a_groupadd')) + if ($action == 'add' && !phpbb::$acl->acl_get('a_groupadd')) { trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -416,7 +416,7 @@ class acp_groups // If the user has the a_authgroups permission and at least one additional permission ability set the permissions are fully transferred. // We do not limit on one auth category because this can lead to incomplete permissions being tricky to fix for the admin, roles being assigned or added non-default permissions. // Since the user only has the option to copy permissions from non leader managed groups this seems to be a good compromise. - if ($group_perm_from && $action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) + if ($group_perm_from && $action == 'add' && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) { $sql = 'SELECT group_founder_manage FROM ' . GROUPS_TABLE . ' @@ -455,7 +455,7 @@ class acp_groups // Now insert the data $db->sql_multi_insert(ACL_GROUPS_TABLE, $groups_sql_ary); - $auth->acl_clear_prefetch(); + phpbb::$acl->acl_clear_prefetch(); } } @@ -543,7 +543,7 @@ class acp_groups $template->assign_vars(array( 'S_EDIT' => true, 'S_ADD_GROUP' => ($action == 'add') ? true : false, - 'S_GROUP_PERM' => ($action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false, + 'S_GROUP_PERM' => ($action == 'add' && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false, 'S_INCLUDE_SWATCH' => true, 'S_CAN_UPLOAD' => $can_upload, 'S_ERROR' => (sizeof($error)) ? true : false, @@ -701,7 +701,7 @@ class acp_groups $template->assign_vars(array( 'U_ACTION' => $this->u_action, - 'S_GROUP_ADD' => ($auth->acl_get('a_groupadd')) ? true : false) + 'S_GROUP_ADD' => (phpbb::$acl->acl_get('a_groupadd')) ? true : false) ); // Get us all the groups @@ -757,7 +757,7 @@ class acp_groups $template->assign_block_vars('groups', array( 'U_LIST' => "{$this->u_action}&action=list&g=$group_id", 'U_EDIT' => "{$this->u_action}&action=edit&g=$group_id", - 'U_DELETE' => ($auth->acl_get('a_groupdel')) ? "{$this->u_action}&action=delete&g=$group_id" : '', + 'U_DELETE' => (phpbb::$acl->acl_get('a_groupdel')) ? "{$this->u_action}&action=delete&g=$group_id" : '', 'S_GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL) ? true : false, diff --git a/phpBB/modules/acp/acp_inactive.php b/phpBB/modules/acp/acp_inactive.php index fe34b40ee8..68363a587b 100644 --- a/phpBB/modules/acp/acp_inactive.php +++ b/phpBB/modules/acp/acp_inactive.php @@ -123,7 +123,7 @@ class acp_inactive { if (confirm_box(true)) { - if (!$auth->acl_get('a_userdel')) + if (!phpbb::$acl->acl_get('a_userdel')) { trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } diff --git a/phpBB/modules/acp/acp_logs.php b/phpBB/modules/acp/acp_logs.php index dd10046097..9b8e77706e 100644 --- a/phpBB/modules/acp/acp_logs.php +++ b/phpBB/modules/acp/acp_logs.php @@ -44,7 +44,7 @@ class acp_logs $this->log_type = constant('LOG_' . strtoupper($mode)); // Delete entries if requested and able - if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) + if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs')) { if (confirm_box(true)) { @@ -133,7 +133,7 @@ class acp_logs 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, 'S_SORT_DIR' => $s_sort_dir, - 'S_CLEARLOGS' => $auth->acl_get('a_clearlogs'), + 'S_CLEARLOGS' => phpbb::$acl->acl_get('a_clearlogs'), ) ); diff --git a/phpBB/modules/acp/acp_permissions.php b/phpBB/modules/acp/acp_permissions.php index 9617e41436..f411105433 100644 --- a/phpBB/modules/acp/acp_permissions.php +++ b/phpBB/modules/acp/acp_permissions.php @@ -45,7 +45,7 @@ class acp_permissions $this->tpl_name = 'permission_trace'; - if ($user_id && isset($auth_admin->acl_options['id'][$permission]) && $auth->acl_get('a_viewauth')) + if ($user_id && isset($auth_admin->acl_options['id'][$permission]) && phpbb::$acl->acl_get('a_viewauth')) { $this->page_title = sprintf(phpbb::$user->lang['TRACE_PERMISSION'], phpbb::$user->lang['acl_' . $permission]['lang']); $this->permission_trace($user_id, $forum_id, $permission); @@ -429,8 +429,8 @@ class acp_permissions 'S_SELECT_VICTIM' => true, 'S_ALLOW_ALL_SELECT' => (sizeof($forum_id) > 5) ? false : true, - 'S_CAN_SELECT_USER' => ($auth->acl_get('a_authusers')) ? true : false, - 'S_CAN_SELECT_GROUP' => ($auth->acl_get('a_authgroups')) ? true : false, + 'S_CAN_SELECT_USER' => (phpbb::$acl->acl_get('a_authusers')) ? true : false, + 'S_CAN_SELECT_GROUP' => (phpbb::$acl->acl_get('a_authgroups')) ? true : false, 'S_HIDDEN_FIELDS' => $s_hidden_fields) ); @@ -543,7 +543,7 @@ class acp_permissions $s_dropdown_options = ''; foreach ($options as $setting) { - if (!$auth->acl_get('a_' . str_replace('_', '', $setting) . 'auth')) + if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $setting) . 'auth')) { continue; } @@ -611,7 +611,7 @@ class acp_permissions $ug_type = (sizeof($user_id)) ? 'user' : 'group'; // Check the permission setting again - if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's')) + if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !phpbb::$acl->acl_get('a_auth' . $ug_type . 's')) { trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -692,7 +692,7 @@ class acp_permissions $ug_type = (sizeof($user_id)) ? 'user' : 'group'; // Check the permission setting again - if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's')) + if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !phpbb::$acl->acl_get('a_auth' . $ug_type . 's')) { trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -791,7 +791,7 @@ class acp_permissions $ug_type = (sizeof($user_id)) ? 'user' : 'group'; // Check the permission setting again - if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's')) + if (!phpbb::$acl->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !phpbb::$acl->acl_get('a_auth' . $ug_type . 's')) { trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -941,7 +941,7 @@ class acp_permissions if (sizeof($groups)) { // Get group auth settings - $hold_ary = $auth->acl_group_raw_data(array_keys($groups), $permission, $forum_id); + $hold_ary = phpbb::$acl->acl_group_raw_data(array_keys($groups), $permission, $forum_id); foreach ($hold_ary as $group_id => $forum_ary) { @@ -983,7 +983,7 @@ class acp_permissions } // Get user specific permission... globally or for this forum - $hold_ary = $auth->acl_user_raw_data($user_id, $permission, $forum_id); + $hold_ary = phpbb::$acl->acl_user_raw_data($user_id, $permission, $forum_id); $auth_setting = (!sizeof($hold_ary)) ? phpbb::ACL_NO : $hold_ary[$user_id][$forum_id][$permission]; switch ($auth_setting) @@ -1016,7 +1016,7 @@ class acp_permissions 'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false) ); - if ($forum_id != 0 && isset($auth->acl_options['global'][$permission])) + if ($forum_id != 0 && isset(phpbb::$acl->acl_options['global'][$permission])) { if ($user_id != phpbb::$user->data['user_id']) { @@ -1026,7 +1026,7 @@ class acp_permissions } else { - $auth_setting = $auth->acl_get($permission); + $auth_setting = phpbb::$acl->acl_get($permission); } if ($auth_setting) diff --git a/phpBB/modules/acp/acp_prune.php b/phpBB/modules/acp/acp_prune.php index 2974d8c9c2..689d160cd9 100644 --- a/phpBB/modules/acp/acp_prune.php +++ b/phpBB/modules/acp/acp_prune.php @@ -108,7 +108,7 @@ class acp_prune do { - if (!$auth->acl_get('f_list', $row['forum_id'])) + if (!phpbb::$acl->acl_get('f_list', $row['forum_id'])) { continue; } @@ -293,7 +293,7 @@ class acp_prune $template->assign_block_vars('users', array( 'USERNAME' => $usernames[$user_id], 'U_PROFILE' => append_sid('memberlist', 'mode=viewprofile&u=' . $user_id), - 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=users&mode=overview&u=' . $user_id, true, phpbb::$user->session_id) : '', + 'U_USER_ADMIN' => (phpbb::$acl->acl_get('a_user')) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=users&mode=overview&u=' . $user_id, true, phpbb::$user->session_id) : '', )); } diff --git a/phpBB/modules/acp/acp_users.php b/phpBB/modules/acp/acp_users.php index b45edfb1a3..c08a5675d3 100644 --- a/phpBB/modules/acp/acp_users.php +++ b/phpBB/modules/acp/acp_users.php @@ -174,7 +174,7 @@ class acp_users // You can't delete the founder if ($delete && $user_row['user_type'] != phpbb::USER_FOUNDER) { - if (!$auth->acl_get('a_userdel')) + if (!phpbb::$acl->acl_get('a_userdel')) { trigger_error(phpbb::$user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } @@ -806,7 +806,7 @@ class acp_users } // Let the users permissions being updated - $auth->acl_clear_prefetch($user_id); + phpbb::$acl->acl_clear_prefetch($user_id); add_log('admin', 'LOG_USER_USER_UPDATE', $data['username']); @@ -914,9 +914,9 @@ class acp_users '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']}", - 'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid('mcp', 'i=queue', true, phpbb::$user->session_id) : '', + 'U_MCP_QUEUE' => (phpbb::$acl->acl_getf_global('m_approve')) ? append_sid('mcp', 'i=queue', true, phpbb::$user->session_id) : '', - 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && phpbb::$user->data['user_id'] != $user_row['user_id']) ? append_sid('ucp', "mode=switch_perm&u={$user_row['user_id']}") : '', + 'U_SWITCH_PERMISSIONS' => (phpbb::$acl->acl_get('a_switchperm') && phpbb::$user->data['user_id'] != $user_row['user_id']) ? append_sid('ucp', "mode=switch_perm&u={$user_row['user_id']}") : '', 'POSTS_IN_QUEUE' => $user_row['posts_in_queue'], 'USER' => $user_row['username'], @@ -948,7 +948,7 @@ class acp_users $sort_dir = request_var('sd', 'd'); // Delete entries if requested and able - if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) + if (($deletemark || $deleteall) && phpbb::$acl->acl_get('a_clearlogs')) { if (!check_form_key($form_name)) { @@ -1017,7 +1017,7 @@ class acp_users 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, 'S_SORT_DIR' => $s_sort_dir, - 'S_CLEARLOGS' => $auth->acl_get('a_clearlogs')) + 'S_CLEARLOGS' => phpbb::$acl->acl_get('a_clearlogs')) ); foreach ($log_data as $row) |