diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-08-10 13:19:56 +0200 | 
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-08-10 13:19:56 +0200 | 
| commit | 707568c49639930632b64099b0182ebc8deb1194 (patch) | |
| tree | bd9da5fd7a7ee386bd5dea38be0b694456509703 | |
| parent | 7ae2ceb5cf42123c82dd0a8f6d3a6a8d56be2d9c (diff) | |
| parent | 917cd4dec7157845f82516ef440a51dc05d6799d (diff) | |
| download | forums-707568c49639930632b64099b0182ebc8deb1194.tar forums-707568c49639930632b64099b0182ebc8deb1194.tar.gz forums-707568c49639930632b64099b0182ebc8deb1194.tar.bz2 forums-707568c49639930632b64099b0182ebc8deb1194.tar.xz forums-707568c49639930632b64099b0182ebc8deb1194.zip  | |
Merge pull request #2846 from rxu/ticket/12943
[ticket/12943] Add core.phpbb_generate_debug_output core event
* rxu/ticket/12943:
  [ticket/12943] Add core.phpbb_generate_debug_output core event
| -rw-r--r-- | phpBB/includes/functions.php | 16 | ||||
| -rw-r--r-- | phpBB/includes/functions_acp.php | 2 | 
2 files changed, 15 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4318b20b97..bd0a5795b1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5095,9 +5095,10 @@ function phpbb_check_and_display_sql_report(\phpbb\request\request_interface $re  * @param \phpbb\config\config				$config		Config object  * @param \phpbb\auth\auth					$auth		Auth object  * @param \phpbb\user						$user		User object +* @param \phpbb\event\dispatcher_interface	$phpbb_dispatcher	Event dispatcher  * @return string  */ -function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\auth\auth $auth, \phpbb\user $user) +function phpbb_generate_debug_output(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\auth\auth $auth, \phpbb\user $user, \phpbb\event\dispatcher_interface $phpbb_dispatcher)  {  	$debug_info = array(); @@ -5136,6 +5137,17 @@ function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpb  		}  	} +	/** +	* Modify debug output information +	* +	* @event core.phpbb_generate_debug_output +	* @var	array	debug_info		Array of strings with debug information +	* +	* @since 3.1.0-RC3 +	*/ +	$vars = array('debug_info'); +	extract($phpbb_dispatcher->trigger_event('core.phpbb_generate_debug_output', compact($vars))); +  	return implode(' | ', $debug_info);  } @@ -5174,7 +5186,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =  	phpbb_check_and_display_sql_report($request, $auth, $db);  	$template->assign_vars(array( -		'DEBUG_OUTPUT'			=> phpbb_generate_debug_output($db, $config, $auth, $user), +		'DEBUG_OUTPUT'			=> phpbb_generate_debug_output($db, $config, $auth, $user, $phpbb_dispatcher),  		'TRANSLATION_INFO'		=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',  		'CREDIT_LINE'			=> $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited'), diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index abf726581d..dc3d745d53 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -149,7 +149,7 @@ function adm_page_footer($copyright_html = true)  	phpbb_check_and_display_sql_report($request, $auth, $db);  	$template->assign_vars(array( -		'DEBUG_OUTPUT'		=> phpbb_generate_debug_output($db, $config, $auth, $user), +		'DEBUG_OUTPUT'		=> phpbb_generate_debug_output($db, $config, $auth, $user, $phpbb_dispatcher),  		'TRANSLATION_INFO'	=> (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',  		'S_COPYRIGHT_HTML'	=> $copyright_html,  		'CREDIT_LINE'		=> $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Limited'),  | 
