mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/12831] simplified code, upd event block
https://tracker.phpbb.com/browse/PHPBB3-12831 PHPBB3-12831
This commit is contained in:
parent
8989f6f878
commit
7e4c3fde01
2 changed files with 6 additions and 12 deletions
|
@ -5054,19 +5054,16 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||||
* session item, e.g. forum for
|
* session item, e.g. forum for
|
||||||
* session_forum_id
|
* session_forum_id
|
||||||
* @var int item_id Restrict online users to item id
|
* @var int item_id Restrict online users to item id
|
||||||
* @var array http_headers HTTP headers that should be set by phpbb
|
* @var array http_headers HTTP headers that should be set by phpbb
|
||||||
*
|
*
|
||||||
* @since 3.1.0-b3
|
* @since 3.1.0-b3
|
||||||
*/
|
*/
|
||||||
$vars = array('page_title', 'display_online_list', 'item_id', 'item', 'http_headers');
|
$vars = array('page_title', 'display_online_list', 'item_id', 'item', 'http_headers');
|
||||||
extract($phpbb_dispatcher->trigger_event('core.page_header_after', compact($vars)));
|
extract($phpbb_dispatcher->trigger_event('core.page_header_after', compact($vars)));
|
||||||
|
|
||||||
if (is_array($http_headers))
|
foreach ($http_headers as $hname => $hval)
|
||||||
{
|
{
|
||||||
foreach ($http_headers as $hname => $hval)
|
header((string) $hname.': '.(string) $hval);
|
||||||
{
|
|
||||||
header((string) $hname.': '.(string) $hval);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -121,19 +121,16 @@ function adm_page_header($page_title)
|
||||||
*
|
*
|
||||||
* @event core.adm_page_header_after
|
* @event core.adm_page_header_after
|
||||||
* @var string page_title Page title
|
* @var string page_title Page title
|
||||||
* @var array http_headers HTTP headers that should be set by phpbb
|
* @var array http_headers HTTP headers that should be set by phpbb
|
||||||
*
|
*
|
||||||
* @since 3.1.0-RC3
|
* @since 3.1.0-RC3
|
||||||
*/
|
*/
|
||||||
$vars = array('page_title', 'http_headers');
|
$vars = array('page_title', 'http_headers');
|
||||||
extract($phpbb_dispatcher->trigger_event('core.adm_page_header_after', compact($vars)));
|
extract($phpbb_dispatcher->trigger_event('core.adm_page_header_after', compact($vars)));
|
||||||
|
|
||||||
if (is_array($http_headers))
|
foreach ($http_headers as $hname => $hval)
|
||||||
{
|
{
|
||||||
foreach ($http_headers as $hname => $hval)
|
header((string) $hname.': '.(string) $hval);
|
||||||
{
|
|
||||||
header((string) $hname.': '.(string) $hval);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue