aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMáté Bartus <mate.bartus@gmail.com>2016-03-08 22:18:42 +0100
committerMáté Bartus <mate.bartus@gmail.com>2016-03-08 22:18:42 +0100
commita01e3a0ffa2d9fb4d609317aa5e2caed4c521a68 (patch)
treeea7793775abbd1b0f5a052054bcfa3c5e1af7187 /phpBB/includes/functions.php
parent9d7b6260bd1ef0a0a07af7ec5cd2c1955f31a74c (diff)
parent7c45ed0733d525d466ba6d45a13b50e5fc553126 (diff)
downloadforums-a01e3a0ffa2d9fb4d609317aa5e2caed4c521a68.tar
forums-a01e3a0ffa2d9fb4d609317aa5e2caed4c521a68.tar.gz
forums-a01e3a0ffa2d9fb4d609317aa5e2caed4c521a68.tar.bz2
forums-a01e3a0ffa2d9fb4d609317aa5e2caed4c521a68.tar.xz
forums-a01e3a0ffa2d9fb4d609317aa5e2caed4c521a68.zip
Merge branch '3.1.x' into 3.2.x
* 3.1.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 Conflicts: phpBB/phpbb/notification/manager.php
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php27
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';
+ }
}
/**