mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/10758] Dependency inject parameters into cache_moderators.
Also add phpbb prefix since the signature is being changed anyway. PHPBB3-10758
This commit is contained in:
@@ -206,7 +206,7 @@ class acp_forums
|
||||
($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'))))
|
||||
{
|
||||
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
$copied_permissions = true;
|
||||
}
|
||||
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
|
||||
@@ -266,7 +266,7 @@ class acp_forums
|
||||
add_log('admin', 'LOG_FORUM_' . strtoupper($action), $row['forum_name'], $move_forum_name);
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
}
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
@@ -768,7 +768,7 @@ class acp_forums
|
||||
if (!empty($forum_perm_from) && $forum_perm_from != $forum_id)
|
||||
{
|
||||
copy_forum_permissions($forum_perm_from, $forum_id, true);
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
$auth->acl_clear_prefetch();
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
||||
|
@@ -24,7 +24,7 @@ class acp_main
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $request;
|
||||
global $config, $db, $cache, $user, $auth, $template, $request;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
// Show restore permissions notice
|
||||
@@ -129,7 +129,7 @@ class acp_main
|
||||
set_config('record_online_users', 1, true);
|
||||
set_config('record_online_date', time(), true);
|
||||
add_log('admin', 'LOG_RESET_ONLINE');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESET_ONLINE_SUCCESS');
|
||||
@@ -184,7 +184,7 @@ class acp_main
|
||||
update_last_username();
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_STATS');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESYNC_STATS_SUCCESS');
|
||||
@@ -251,7 +251,7 @@ class acp_main
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESYNC_POSTCOUNTS_SUCCESS');
|
||||
@@ -266,7 +266,7 @@ class acp_main
|
||||
|
||||
set_config('board_startdate', time() - 1);
|
||||
add_log('admin', 'LOG_RESET_DATE');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESET_DATE_SUCCESS');
|
||||
@@ -346,7 +346,7 @@ class acp_main
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POST_MARKING');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('RESYNC_POST_MARKING_SUCCESS');
|
||||
@@ -359,10 +359,10 @@ class acp_main
|
||||
|
||||
// Clear permissions
|
||||
$auth->acl_clear_prefetch();
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_CACHE');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('PURGE_CACHE_SUCCESS');
|
||||
@@ -413,7 +413,7 @@ class acp_main
|
||||
$db->sql_query($sql);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_SESSIONS');
|
||||
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
trigger_error('PURGE_SESSIONS_SUCCESS');
|
||||
|
@@ -656,7 +656,7 @@ class acp_permissions
|
||||
*/
|
||||
function set_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
|
||||
{
|
||||
global $user, $auth;
|
||||
global $db, $cache, $user, $auth;
|
||||
global $request;
|
||||
|
||||
$psubmit = request_var('psubmit', array(0 => array(0 => 0)));
|
||||
@@ -726,7 +726,7 @@ class acp_permissions
|
||||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
// Remove users who are now moderators or admins from everyones foes list
|
||||
@@ -745,7 +745,7 @@ class acp_permissions
|
||||
*/
|
||||
function set_all_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id)
|
||||
{
|
||||
global $user, $auth;
|
||||
global $db, $cache, $user, $auth;
|
||||
global $request;
|
||||
|
||||
// User or group to be set?
|
||||
@@ -794,7 +794,7 @@ class acp_permissions
|
||||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
// Remove users who are now moderators or admins from everyones foes list
|
||||
@@ -858,7 +858,7 @@ class acp_permissions
|
||||
*/
|
||||
function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id, &$forum_id)
|
||||
{
|
||||
global $user, $db, $auth;
|
||||
global $user, $db, $cache, $auth;
|
||||
|
||||
// User or group to be set?
|
||||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
@@ -874,7 +874,7 @@ class acp_permissions
|
||||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
|
||||
@@ -1172,7 +1172,7 @@ class acp_permissions
|
||||
*/
|
||||
function copy_forum_permissions()
|
||||
{
|
||||
global $auth, $cache, $template, $user;
|
||||
global $db, $auth, $cache, $template, $user;
|
||||
|
||||
$user->add_lang('acp/forums');
|
||||
|
||||
@@ -1187,7 +1187,7 @@ class acp_permissions
|
||||
{
|
||||
if (copy_forum_permissions($src, $dest))
|
||||
{
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
$auth->acl_clear_prefetch();
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
|
@@ -137,11 +137,13 @@ class acp_styles
|
||||
*/
|
||||
protected function action_cache()
|
||||
{
|
||||
global $db, $cache, $auth;
|
||||
|
||||
$this->cache->purge();
|
||||
|
||||
// Clear permissions
|
||||
$this->auth->acl_clear_prefetch();
|
||||
cache_moderators();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_CACHE');
|
||||
|
||||
|
Reference in New Issue
Block a user