diff options
| author | Máté Bartus <mate.bartus@gmail.com> | 2016-03-08 22:19:54 +0100 |
|---|---|---|
| committer | Máté Bartus <mate.bartus@gmail.com> | 2016-03-08 22:19:54 +0100 |
| commit | 6c814ef641318fffff5815c881120a4e4e2f094d (patch) | |
| tree | 791bdcc0d5712f98891cdeae087fcafc485494f7 /phpBB/includes/functions.php | |
| parent | e6e87ab214a1b6829bf64729ddb9718f6784ce45 (diff) | |
| parent | a01e3a0ffa2d9fb4d609317aa5e2caed4c521a68 (diff) | |
| download | forums-6c814ef641318fffff5815c881120a4e4e2f094d.tar forums-6c814ef641318fffff5815c881120a4e4e2f094d.tar.gz forums-6c814ef641318fffff5815c881120a4e4e2f094d.tar.bz2 forums-6c814ef641318fffff5815c881120a4e4e2f094d.tar.xz forums-6c814ef641318fffff5815c881120a4e4e2f094d.zip | |
Merge branch '3.2.x'
* 3.2.x:
[ticket/14132] Use transaction for adding notifications to type table
[ticket/14519] Skip query if all unread notifications are retrieved
[ticket/14483] Do not send headers by default on access via controller
Diffstat (limited to 'phpBB/includes/functions.php')
| -rw-r--r-- | phpBB/includes/functions.php | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 5125a601d6..94a8e7a405 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4071,7 +4071,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false) /** * Generate page header */ -function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum') +function page_header($page_title = '', $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = true) { global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path; global $phpbb_dispatcher, $request, $phpbb_container, $phpbb_admin_path; @@ -4416,17 +4416,22 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'SITE_LOGO_IMG' => $user->img('site_logo'), )); - // An array of http headers that phpbb will set. The following event may override these. - $http_headers = array( - // application/xhtml+xml not used because of IE - 'Content-type' => 'text/html; charset=UTF-8', - 'Cache-Control' => 'private, no-cache="set-cookie"', - 'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT', - ); - if (!empty($user->data['is_bot'])) + $http_headers = array(); + + if ($send_headers) { - // Let reverse proxies know we detected a bot. - $http_headers['X-PHPBB-IS-BOT'] = 'yes'; + // An array of http headers that phpbb will set. The following event may override these. + $http_headers += array( + // application/xhtml+xml not used because of IE + 'Content-type' => 'text/html; charset=UTF-8', + 'Cache-Control' => 'private, no-cache="set-cookie"', + 'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT', + ); + if (!empty($user->data['is_bot'])) + { + // Let reverse proxies know we detected a bot. + $http_headers['X-PHPBB-IS-BOT'] = 'yes'; + } } /** |
