diff options
author | Drae <paul@starstreak.net> | 2012-07-05 18:56:14 +0100 |
---|---|---|
committer | Drae <paul@starstreak.net> | 2012-07-18 14:31:21 +0100 |
commit | dc71c0629e60acccd39b59538f2e7f5b09b32509 (patch) | |
tree | b87e23a0e29124f25abecb06e2b1252e1d3655c3 /phpBB/includes/acp | |
parent | 922147f05a75d5a0e00b34f0102bc014583df984 (diff) | |
download | forums-dc71c0629e60acccd39b59538f2e7f5b09b32509.tar forums-dc71c0629e60acccd39b59538f2e7f5b09b32509.tar.gz forums-dc71c0629e60acccd39b59538f2e7f5b09b32509.tar.bz2 forums-dc71c0629e60acccd39b59538f2e7f5b09b32509.tar.xz forums-dc71c0629e60acccd39b59538f2e7f5b09b32509.zip |
[feature/pagination-as-list] Various fixes and improvements
Extracted common template code for prosilver as per subsilver2.
Various other fixups and oversight corrections, changed name
of the "new" template function and re-introduced existing
version. Altered on_page to compensate for removal of some
templating vars from pagination routine.
PHPBB3-10968
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 5 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_groups.php | 5 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_icons.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_inactive.php | 5 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_logs.php | 5 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 10 |
6 files changed, 19 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 4b621cb18d..62533b376f 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1222,13 +1222,14 @@ class acp_attachments } $db->sql_freeresult($result); - generate_pagination($this->u_action . "&$u_sort_param", $num_files, $attachments_per_page, $start); + $base_url = $this->u_action . "&$u_sort_param"; + generate_template_pagination($base_url, 'pagination', $num_files, $attachments_per_page, $start); $template->assign_vars(array( 'TOTAL_FILES' => $num_files, 'TOTAL_SIZE' => get_formatted_filesize($total_size), - 'S_ON_PAGE' => on_page($num_files, $attachments_per_page, $start), + 'S_ON_PAGE' => on_page($base_url, $num_files, $attachments_per_page, $start), 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, 'S_SORT_DIR' => $s_sort_dir) diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index ded28252dc..2407137012 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -682,14 +682,15 @@ class acp_groups $s_action_options .= '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>'; } - generate_pagination($this->u_action . "&action=$action&g=$group_id", $total_members, $config['topics_per_page'], $start); + $base_url = $this->u_action . "&action=$action&g=$group_id"; + generate_template_pagination($base_url, 'pagination', $total_members, $config['topics_per_page'], $start); $template->assign_vars(array( 'S_LIST' => true, 'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false, 'S_ACTION_OPTIONS' => $s_action_options, - 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start), + 'S_ON_PAGE' => 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'], 'U_ACTION' => $this->u_action . "&g=$group_id", diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index fdf0fbde2f..b6f7ce18c4 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -928,7 +928,7 @@ class acp_icons } $db->sql_freeresult($result); - generate_pagination($this->u_action, $item_count, $config['smilies_per_page'], $pagination_start); + generate_template_pagination($this->u_action, 'pagination', $item_count, $config['smilies_per_page'], $pagination_start); } /** diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index c7f9e5398e..a62490f052 100644 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -288,7 +288,8 @@ class acp_inactive $option_ary += array('remind' => 'REMIND'); } - generate_pagination($this->u_action . "&$u_sort_param&users_per_page=$per_page", $inactive_count, $per_page, $start); + $base_url = $this->u_action . "&$u_sort_param&users_per_page=$per_page"; + generate_template_pagination($base_url, 'pagination', $inactive_count, $per_page, $start); $template->assign_vars(array( 'S_INACTIVE_USERS' => true, @@ -297,7 +298,7 @@ class acp_inactive 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, 'S_SORT_DIR' => $s_sort_dir, - 'S_ON_PAGE' => on_page($inactive_count, $per_page, $start), + 'S_ON_PAGE' => on_page($base_url, $inactive_count, $per_page, $start), 'USERS_PER_PAGE' => $per_page, diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php index 43cf15cb4d..1ba4dfbc08 100644 --- a/phpBB/includes/acp/acp_logs.php +++ b/phpBB/includes/acp/acp_logs.php @@ -129,14 +129,15 @@ class acp_logs $log_count = 0; $start = view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $keywords); - generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start); + $base_url = $this->u_action . "&$u_sort_param$keywords_param"; + generate_template_pagination($base_url, 'pagination', $log_count, $config['topics_per_page'], $start); $template->assign_vars(array( 'L_TITLE' => $l_title, 'L_EXPLAIN' => $l_title_explain, 'U_ACTION' => $this->u_action . "&$u_sort_param$keywords_param&start=$start", - 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start), + 'S_ON_PAGE' => on_page($base_url, $log_count, $config['topics_per_page'], $start), 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index e98c015f8b..227d566155 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1120,11 +1120,12 @@ class acp_users $log_count = 0; $start = view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort); - generate_pagination($this->u_action . "&u=$user_id&$u_sort_param", $log_count, $config['topics_per_page'], $start); + $base_url = $this->u_action . "&u=$user_id&$u_sort_param"; + generate_template_pagination($base_url, 'pagination', $log_count, $config['topics_per_page'], $start); $template->assign_vars(array( 'S_FEEDBACK' => true, - 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start), + 'S_ON_PAGE' => on_page($base_url, $log_count, $config['topics_per_page'], $start), 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, @@ -2036,11 +2037,12 @@ class acp_users } $db->sql_freeresult($result); - generate_pagination($this->u_action . "&u=$user_id&sk=$sort_key&sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start); + $base_url = $this->u_action . "&u=$user_id&sk=$sort_key&sd=$sort_dir"; + generate_template_pagination($base_url, 'pagination', $num_attachments, $config['topics_per_page'], $start); $template->assign_vars(array( 'S_ATTACHMENTS' => true, - 'S_ON_PAGE' => on_page($num_attachments, $config['topics_per_page'], $start), + 'S_ON_PAGE' => on_page($base_url, $num_attachments, $config['topics_per_page'], $start), 'S_SORT_KEY' => $s_sort_key, 'S_SORT_DIR' => $s_sort_dir, )); |