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/phpbb/controller/helper.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/phpbb/controller/helper.php')
| -rw-r--r-- | phpBB/phpbb/controller/helper.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index e98de0e771..9dbc3737f7 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -80,12 +80,13 @@ class helper * @param bool $display_online_list Do we display online users list * @param int $item_id Restrict online users to item id * @param string $item Restrict online users to a certain session item, e.g. forum for session_forum_id + * @param bool $send_headers Whether headers should be sent by page_header(). Defaults to false for controllers. * * @return Response object containing rendered page */ - public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false, $item_id = 0, $item = 'forum') + public function render($template_file, $page_title = '', $status_code = 200, $display_online_list = false, $item_id = 0, $item = 'forum', $send_headers = false) { - page_header($page_title, $display_online_list, $item_id, $item); + page_header($page_title, $display_online_list, $item_id, $item, $send_headers); $this->template->set_filenames(array( 'body' => $template_file, @@ -93,7 +94,9 @@ class helper page_footer(true, false, false); - return new Response($this->template->assign_display('body'), $status_code); + $headers = !empty($this->user->data['is_bot']) ? array('X-PHPBB-IS-BOT' => 'yes') : array(); + + return new Response($this->template->assign_display('body'), $status_code, $headers); } /** |
