diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2014-09-08 16:46:26 +0200 | 
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2014-09-08 16:46:26 +0200 | 
| commit | bcd4cebd489a7c71b97b608b921e8b89e676fcc4 (patch) | |
| tree | daa74407204b9454ef115b76b52af1f5c829a7a7 | |
| parent | cc96bcff99b1a68eaab848a82e2fa5afead20f5f (diff) | |
| parent | d470d628f58104aa0eab2d717496f500b788126b (diff) | |
| download | forums-bcd4cebd489a7c71b97b608b921e8b89e676fcc4.tar forums-bcd4cebd489a7c71b97b608b921e8b89e676fcc4.tar.gz forums-bcd4cebd489a7c71b97b608b921e8b89e676fcc4.tar.bz2 forums-bcd4cebd489a7c71b97b608b921e8b89e676fcc4.tar.xz forums-bcd4cebd489a7c71b97b608b921e8b89e676fcc4.zip | |
Merge pull request #2915 from rxu/ticket/13026
[ticket/13026] Add template vars array to core.viewonline_overwrite_location
| -rw-r--r-- | phpBB/viewonline.php | 38 | 
1 files changed, 21 insertions, 17 deletions
| diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index a03a81a15e..708d7c2349 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -357,22 +357,7 @@ 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->assign_block_vars('user_row', array( +	$template_row = array(  		'USERNAME' 			=> $row['username'],  		'USERNAME_COLOUR'	=> $row['user_colour'],  		'USERNAME_FULL'		=> $username_full, @@ -389,7 +374,26 @@ while ($row = $db->sql_fetchrow($result))  		'S_USER_HIDDEN'		=> $s_user_hidden,  		'S_GUEST'			=> ($row['user_id'] == ANONYMOUS) ? true : false,  		'S_USER_TYPE'		=> $row['user_type'], -	)); +	); + +	/** +	* 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 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 +	*/ +	$vars = array('on_page', 'row', 'location', 'location_url', 'forum_data', 'template_row'); +	extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars))); + +	$template->assign_block_vars('user_row', $template_row);  }  $db->sql_freeresult($result);  unset($prev_id, $prev_ip); | 
