mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/11849] Fix more function calls
PHPBB3-11849
This commit is contained in:
parent
edd183b53a
commit
cb8b2bab5f
6 changed files with 25 additions and 16 deletions
|
@ -672,6 +672,7 @@ class acp_groups
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->page_title = 'GROUP_MEMBERS';
|
$this->page_title = 'GROUP_MEMBERS';
|
||||||
|
$pagination = $phpbb_container->get('pagination');
|
||||||
|
|
||||||
// Grab the leaders - always, on every page...
|
// Grab the leaders - always, on every page...
|
||||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_colour, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_colour, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||||
|
@ -715,14 +716,14 @@ class acp_groups
|
||||||
}
|
}
|
||||||
|
|
||||||
$base_url = $this->u_action . "&action=$action&g=$group_id";
|
$base_url = $this->u_action . "&action=$action&g=$group_id";
|
||||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start);
|
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_members, $config['topics_per_page'], $start);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_LIST' => true,
|
'S_LIST' => true,
|
||||||
'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false,
|
'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false,
|
||||||
'S_ACTION_OPTIONS' => $s_action_options,
|
'S_ACTION_OPTIONS' => $s_action_options,
|
||||||
|
|
||||||
'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $total_members, $config['topics_per_page'], $start),
|
'S_ON_PAGE' => $pagination->on_page($base_url, $total_members, $config['topics_per_page'], $start),
|
||||||
'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'],
|
'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'],
|
||||||
|
|
||||||
'U_ACTION' => $this->u_action . "&g=$group_id",
|
'U_ACTION' => $this->u_action . "&g=$group_id",
|
||||||
|
|
|
@ -27,7 +27,7 @@ class acp_icons
|
||||||
{
|
{
|
||||||
global $db, $user, $auth, $template, $cache;
|
global $db, $user, $auth, $template, $cache;
|
||||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
global $request;
|
global $request, $phpbb_container;
|
||||||
|
|
||||||
$user->add_lang('acp/posting');
|
$user->add_lang('acp/posting');
|
||||||
|
|
||||||
|
@ -893,6 +893,7 @@ class acp_icons
|
||||||
);
|
);
|
||||||
|
|
||||||
$spacer = false;
|
$spacer = false;
|
||||||
|
$pagination = $phpbb_container->get('pagination');
|
||||||
$pagination_start = request_var('start', 0);
|
$pagination_start = request_var('start', 0);
|
||||||
|
|
||||||
$item_count = $this->item_count($table);
|
$item_count = $this->item_count($table);
|
||||||
|
@ -927,7 +928,7 @@ class acp_icons
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
phpbb_generate_template_pagination($template, $this->u_action, 'pagination', 'start', $item_count, $config['smilies_per_page'], $pagination_start);
|
$pagination->generate_template_pagination($this->u_action, 'pagination', 'start', $item_count, $config['smilies_per_page'], $pagination_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1096,6 +1096,7 @@ class acp_users
|
||||||
$deleteall = (isset($_POST['delall'])) ? true : false;
|
$deleteall = (isset($_POST['delall'])) ? true : false;
|
||||||
$marked = request_var('mark', array(0));
|
$marked = request_var('mark', array(0));
|
||||||
$message = utf8_normalize_nfc(request_var('message', '', true));
|
$message = utf8_normalize_nfc(request_var('message', '', true));
|
||||||
|
$pagination = $phpbb_container->get('pagination');
|
||||||
|
|
||||||
// Sort keys
|
// Sort keys
|
||||||
$sort_days = request_var('st', 0);
|
$sort_days = request_var('st', 0);
|
||||||
|
@ -1166,11 +1167,11 @@ class acp_users
|
||||||
$start = view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
|
$start = view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
|
||||||
|
|
||||||
$base_url = $this->u_action . "&u=$user_id&$u_sort_param";
|
$base_url = $this->u_action . "&u=$user_id&$u_sort_param";
|
||||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
|
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_FEEDBACK' => true,
|
'S_FEEDBACK' => true,
|
||||||
'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $log_count, $config['topics_per_page'], $start),
|
'S_ON_PAGE' => $pagination->on_page($base_url, $log_count, $config['topics_per_page'], $start),
|
||||||
|
|
||||||
'S_LIMIT_DAYS' => $s_limit_days,
|
'S_LIMIT_DAYS' => $s_limit_days,
|
||||||
'S_SORT_KEY' => $s_sort_key,
|
'S_SORT_KEY' => $s_sort_key,
|
||||||
|
@ -1998,6 +1999,7 @@ class acp_users
|
||||||
$start = request_var('start', 0);
|
$start = request_var('start', 0);
|
||||||
$deletemark = (isset($_POST['delmarked'])) ? true : false;
|
$deletemark = (isset($_POST['delmarked'])) ? true : false;
|
||||||
$marked = request_var('mark', array(0));
|
$marked = request_var('mark', array(0));
|
||||||
|
$pagination = $phpbb_container->get('pagination');
|
||||||
|
|
||||||
// Sort keys
|
// Sort keys
|
||||||
$sort_key = request_var('sk', 'a');
|
$sort_key = request_var('sk', 'a');
|
||||||
|
@ -2134,11 +2136,11 @@ class acp_users
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
$base_url = $this->u_action . "&u=$user_id&sk=$sort_key&sd=$sort_dir";
|
$base_url = $this->u_action . "&u=$user_id&sk=$sort_key&sd=$sort_dir";
|
||||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start);
|
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $num_attachments, $config['topics_per_page'], $start);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_ATTACHMENTS' => true,
|
'S_ATTACHMENTS' => true,
|
||||||
'S_ON_PAGE' => phpbb_on_page($template, $user, $base_url, $num_attachments, $config['topics_per_page'], $start),
|
'S_ON_PAGE' => $pagination->on_page($base_url, $num_attachments, $config['topics_per_page'], $start),
|
||||||
'S_SORT_KEY' => $s_sort_key,
|
'S_SORT_KEY' => $s_sort_key,
|
||||||
'S_SORT_DIR' => $s_sort_dir,
|
'S_SORT_DIR' => $s_sort_dir,
|
||||||
));
|
));
|
||||||
|
|
|
@ -73,6 +73,8 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pagination = $phpbb_container->get('pagination');
|
||||||
|
|
||||||
$selected_ids = '';
|
$selected_ids = '';
|
||||||
if (sizeof($post_id_list) && $action != 'merge_topics')
|
if (sizeof($post_id_list) && $action != 'merge_topics')
|
||||||
{
|
{
|
||||||
|
@ -102,7 +104,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||||
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||||
|
|
||||||
$base_url = $url . "&i=$id&action=$action&mode=$mode&sd=$sort_dir&sk=$sort_key&st=$sort_days" . (($merge_select) ? $selected_ids : '');
|
$base_url = $url . "&i=$id&action=$action&mode=$mode&sd=$sort_dir&sk=$sort_key&st=$sort_days" . (($merge_select) ? $selected_ids : '');
|
||||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $forum_topics, $topics_per_page, $start);
|
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $forum_topics, $topics_per_page, $start);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'ACTION' => $action,
|
'ACTION' => $action,
|
||||||
|
@ -133,7 +135,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||||
|
|
||||||
'S_MCP_ACTION' => $url . "&i=$id&forum_action=$action&mode=$mode&start=$start" . (($merge_select) ? $selected_ids : ''),
|
'S_MCP_ACTION' => $url . "&i=$id&forum_action=$action&mode=$mode&start=$start" . (($merge_select) ? $selected_ids : ''),
|
||||||
|
|
||||||
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $forum_topics, $topics_per_page, $start),
|
'PAGE_NUMBER' => $pagination->on_page($base_url, $forum_topics, $topics_per_page, $start),
|
||||||
'TOTAL_TOPICS' => $user->lang('VIEW_FORUM_TOPICS', (int) $forum_topics),
|
'TOTAL_TOPICS' => $user->lang('VIEW_FORUM_TOPICS', (int) $forum_topics),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class mcp_logs
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $auth, $db, $user, $template;
|
global $auth, $db, $user, $template;
|
||||||
global $config, $phpbb_root_path, $phpEx;
|
global $config, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||||
|
|
||||||
$user->add_lang('acp/common');
|
$user->add_lang('acp/common');
|
||||||
|
|
||||||
|
@ -62,6 +62,8 @@ class mcp_logs
|
||||||
$this->tpl_name = 'mcp_logs';
|
$this->tpl_name = 'mcp_logs';
|
||||||
$this->page_title = 'MCP_LOGS';
|
$this->page_title = 'MCP_LOGS';
|
||||||
|
|
||||||
|
$pagination = $phpbb_container->get('pagination');
|
||||||
|
|
||||||
$forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
|
$forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
|
||||||
$forum_list[] = 0;
|
$forum_list[] = 0;
|
||||||
|
|
||||||
|
@ -172,10 +174,10 @@ class mcp_logs
|
||||||
$start = view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
|
$start = view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
|
||||||
|
|
||||||
$base_url = $this->u_action . "&$u_sort_param$keywords_param";
|
$base_url = $this->u_action . "&$u_sort_param$keywords_param";
|
||||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
|
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $log_count, $config['topics_per_page'], $start),
|
'PAGE_NUMBER' => $pagination->on_page($base_url, $log_count, $config['topics_per_page'], $start),
|
||||||
'TOTAL' => $user->lang('TOTAL_LOGS', (int) $log_count),
|
'TOTAL' => $user->lang('TOTAL_LOGS', (int) $log_count),
|
||||||
|
|
||||||
'L_TITLE' => $user->lang['MCP_LOGS'],
|
'L_TITLE' => $user->lang['MCP_LOGS'],
|
||||||
|
|
|
@ -72,7 +72,7 @@ class mcp_notes
|
||||||
function mcp_notes_user_view($action)
|
function mcp_notes_user_view($action)
|
||||||
{
|
{
|
||||||
global $phpEx, $phpbb_root_path, $config;
|
global $phpEx, $phpbb_root_path, $config;
|
||||||
global $template, $db, $user, $auth;
|
global $template, $db, $user, $auth, $phpbb_container;
|
||||||
|
|
||||||
$user_id = request_var('u', 0);
|
$user_id = request_var('u', 0);
|
||||||
$username = request_var('username', '', true);
|
$username = request_var('username', '', true);
|
||||||
|
@ -80,6 +80,7 @@ class mcp_notes
|
||||||
$st = request_var('st', 0);
|
$st = request_var('st', 0);
|
||||||
$sk = request_var('sk', 'b');
|
$sk = request_var('sk', 'b');
|
||||||
$sd = request_var('sd', 'd');
|
$sd = request_var('sd', 'd');
|
||||||
|
$pagination = $phpbb_container->get('pagination');
|
||||||
|
|
||||||
add_form_key('mcp_notes');
|
add_form_key('mcp_notes');
|
||||||
|
|
||||||
|
@ -216,7 +217,7 @@ class mcp_notes
|
||||||
}
|
}
|
||||||
|
|
||||||
$base_url = $this->u_action . "&$u_sort_param$keywords_param";
|
$base_url = $this->u_action . "&$u_sort_param$keywords_param";
|
||||||
phpbb_generate_template_pagination($template, $base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
|
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $log_count, $config['topics_per_page'], $start);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'U_POST_ACTION' => $this->u_action,
|
'U_POST_ACTION' => $this->u_action,
|
||||||
|
@ -228,7 +229,7 @@ class mcp_notes
|
||||||
|
|
||||||
'L_TITLE' => $user->lang['MCP_NOTES_USER'],
|
'L_TITLE' => $user->lang['MCP_NOTES_USER'],
|
||||||
|
|
||||||
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $log_count, $config['topics_per_page'], $start),
|
'PAGE_NUMBER' => $pagination->on_page($base_url, $log_count, $config['topics_per_page'], $start),
|
||||||
'TOTAL_REPORTS' => $user->lang('LIST_REPORTS', (int) $log_count),
|
'TOTAL_REPORTS' => $user->lang('LIST_REPORTS', (int) $log_count),
|
||||||
|
|
||||||
'RANK_TITLE' => $rank_title,
|
'RANK_TITLE' => $rank_title,
|
||||||
|
|
Loading…
Add table
Reference in a new issue