diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-09-09 23:37:30 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-09-09 23:37:30 +0200 |
commit | 6c0a3bb2476ee601e55944bfd6b3ba33d4f85354 (patch) | |
tree | ce55f4eeb4342a8bf008b425b47995280dfb43ce | |
parent | 65026ed1faa3f92c671082fc17901030de71d107 (diff) | |
parent | 0fc5a27889a553d7e967a13521e187ea13401be7 (diff) | |
download | forums-6c0a3bb2476ee601e55944bfd6b3ba33d4f85354.tar forums-6c0a3bb2476ee601e55944bfd6b3ba33d4f85354.tar.gz forums-6c0a3bb2476ee601e55944bfd6b3ba33d4f85354.tar.bz2 forums-6c0a3bb2476ee601e55944bfd6b3ba33d4f85354.tar.xz forums-6c0a3bb2476ee601e55944bfd6b3ba33d4f85354.zip |
Merge pull request #2934 from VSEphpbb/ticket/13051
[ticket/13051] Fix viewonline event (recently broken) and add a new core event
-rw-r--r-- | phpBB/viewonline.php | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index 708d7c2349..9589fb54e2 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -357,6 +357,21 @@ while ($row = $db->sql_fetchrow($result)) break; } + /** + * Overwrite the location's name and URL, which are displayed in the list + * + * @event core.viewonline_overwrite_location + * @var array on_page File name and query string + * @var array row Array with the users sql row + * @var string location Page name to displayed in the list + * @var string location_url Page url to displayed in the list + * @var array forum_data Array with forum data + * @since 3.1.0-a1 + * @change 3.1.0-a2 Added var forum_data + */ + $vars = array('on_page', 'row', 'location', 'location_url', 'forum_data'); + extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars))); + $template_row = array( 'USERNAME' => $row['username'], 'USERNAME_COLOUR' => $row['user_colour'], @@ -377,21 +392,17 @@ while ($row = $db->sql_fetchrow($result)) ); /** - * Overwrite the location's name and URL, which are displayed in the list + * Modify viewonline template data before it is displayed in the list * - * @event core.viewonline_overwrite_location + * @event core.viewonline_modify_user_row * @var array on_page File name and query string * @var array row Array with the users sql row - * @var string location Page name to be displayed in the list - * @var string location_url Page url to be displayed in the list * @var array forum_data Array with forum data * @var array template_row Array with template variables for the user row - * @since 3.1.0-a1 - * @change 3.1.0-a2 Added var forum_data - * @change 3.1.0-RC4 Added var template_row + * @since 3.1.0-RC4 */ - $vars = array('on_page', 'row', 'location', 'location_url', 'forum_data', 'template_row'); - extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars))); + $vars = array('on_page', 'row', 'forum_data', 'template_row'); + extract($phpbb_dispatcher->trigger_event('core.viewonline_modify_user_row', compact($vars))); $template->assign_block_vars('user_row', $template_row); } |