1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 20:24:08 +02:00

[ticket/9801] Add viewonline_helper service to allow proper testing

The viewonline_helper service can and will be extended in the future which
will allow us to also test the viewonline page better.

PHPBB3-9801
This commit is contained in:
Marc Alexander
2014-06-24 18:49:31 +02:00
parent 204904441a
commit 277e9a7a85
4 changed files with 84 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
}
$pagination = $phpbb_container->get('pagination');
$viewonline_helper = $phpbb_container->get('viewonline_helper');
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_JOINED'], 'c' => $user->lang['SORT_LOCATION']);
$sort_key_sql = array('a' => 'u.username_clean', 'b' => 's.session_time', 'c' => 's.session_page');
@@ -213,11 +214,7 @@ while ($row = $db->sql_fetchrow($result))
continue;
}
preg_match('#^([./\\]*+[a-z0-9/_-]+)#i', $row['session_page'], $on_page);
if (!sizeof($on_page))
{
$on_page[1] = '';
}
$on_page = $viewonline_helper->get_user_page($row['session_page']);
switch ($on_page[1])
{