diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2005-12-04 20:25:51 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-12-04 20:25:51 +0000 |
commit | 2fd418fc2141aa3d5a38b47fc129f8cbb2e9d770 (patch) | |
tree | 7b61bae7e2978cc861a61a151c4b9f8266cd33dd /phpBB/includes/functions.php | |
parent | d6785155ad46c8cadac331a140b229b99cb3562a (diff) | |
download | forums-2fd418fc2141aa3d5a38b47fc129f8cbb2e9d770.tar forums-2fd418fc2141aa3d5a38b47fc129f8cbb2e9d770.tar.gz forums-2fd418fc2141aa3d5a38b47fc129f8cbb2e9d770.tar.bz2 forums-2fd418fc2141aa3d5a38b47fc129f8cbb2e9d770.tar.xz forums-2fd418fc2141aa3d5a38b47fc129f8cbb2e9d770.zip |
- some bugfixes
- checking if page_header has been called already
- call correct page footer function
- rewrote avatar gallery
- seperated compilation of template and template functions (new file: functions_template.php)
- added assign_display function to template
- added group management (acp)
- removed admin_groups
git-svn-id: file:///svn/phpbb/trunk@5319 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f25e41443e..6e40431f62 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1476,7 +1476,7 @@ function build_hidden_fields($field_ary) function msg_handler($errno, $msg_text, $errfile, $errline) { global $cache, $db, $auth, $template, $config, $user; - global $phpEx, $phpbb_root_path, $starttime, $display_header, $msg_title; + global $phpEx, $phpbb_root_path, $starttime, $msg_title; switch ($errno) { @@ -1528,23 +1528,21 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $user->setup(); } + $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; + $msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); + if (!defined('HEADER_INC')) { if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']) { - // adm_page_header('', '', false); - adm_page_header(''); + adm_page_header($msg_title); } else { - page_header(''); + page_header($msg_title); } } - $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; - $msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); - $display_header = (!isset($display_header)) ? false : (bool) $display_header; - $template->set_filenames(array( 'body' => 'message_body.html') ); @@ -1556,7 +1554,15 @@ function msg_handler($errno, $msg_text, $errfile, $errline) // We do not want the cron script to be called on error messages define('IN_CRON', true); - page_footer(); + + if (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin']) + { + adm_page_footer(); + } + else + { + page_footer(); + } exit; break; @@ -1570,6 +1576,11 @@ function page_header($page_title = '') { global $db, $config, $template, $SID, $user, $auth, $phpEx, $phpbb_root_path; + if (defined('HEADER_INC')) + { + return; + } + define('HEADER_INC', true); // gzip_compression |