aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewonline.php
diff options
context:
space:
mode:
authorDrae <paul@starstreak.net>2012-07-05 18:56:14 +0100
committerDrae <paul@starstreak.net>2012-07-18 14:31:21 +0100
commitdc71c0629e60acccd39b59538f2e7f5b09b32509 (patch)
treeb87e23a0e29124f25abecb06e2b1252e1d3655c3 /phpBB/viewonline.php
parent922147f05a75d5a0e00b34f0102bc014583df984 (diff)
downloadforums-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/viewonline.php')
-rw-r--r--phpBB/viewonline.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index 546152f647..33f42a657e 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -342,8 +342,6 @@ while ($row = $db->sql_fetchrow($result))
$db->sql_freeresult($result);
unset($prev_id, $prev_ip);
-generate_pagination(append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir"), $counter, $config['topics_per_page'], $start);
-
$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
@@ -386,13 +384,16 @@ $db->sql_freeresult($result);
// Refreshing the page every 60 seconds...
meta_refresh(60, append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir&amp;start=$start"));
+$base_url = append_sid("{$phpbb_root_path}viewonline.$phpEx", "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir");
+generate_template_pagination($base_url, 'pagination', $counter, $config['topics_per_page'], $start);
+
// Send data to template
$template->assign_vars(array(
'TOTAL_REGISTERED_USERS_ONLINE' => $user->lang('REG_USERS_ONLINE', (int) $logged_visible_online, $user->lang('HIDDEN_USERS_ONLINE', (int) $logged_hidden_online)),
'TOTAL_GUEST_USERS_ONLINE' => $user->lang('GUEST_USERS_ONLINE', (int) $guest_counter),
'LEGEND' => $legend,
'PAGINATION' => $pagination,
- 'PAGE_NUMBER' => on_page($counter, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($base_url, $counter, $config['topics_per_page'], $start),
'U_SORT_USERNAME' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),
'U_SORT_UPDATED' => append_sid("{$phpbb_root_path}viewonline.$phpEx", 'sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a') . '&amp;sg=' . ((int) $show_guests)),