summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-04-09 09:03:37 +0000
committeralecpl <alec@alec.pl>2008-04-09 09:03:37 +0000
commit6f9876690af9115ecd9af8ceaecfbdd4b987ed61 (patch)
tree47bab4132be1aef277527d97faf1c4a01a3948ce /program
parente2062e420f4490fb1a3b62016f02e6a94b04916d (diff)
#1484624: do ob_start/ob_end_clean when reading config files
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 1d35682ce..5c25f7fad 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -52,6 +52,10 @@ function rcmail_startup($task='mail')
global $sess_id, $sess_user_lang;
global $CONFIG, $INSTALL_PATH, $BROWSER, $OUTPUT, $_SESSION, $IMAP, $DB, $USER;
+ // start output buffering, we don't need any output yet,
+ // it'll be cleared after reading of config files, etc.
+ ob_start();
+
// check client
$BROWSER = rcube_browser();
@@ -80,6 +84,9 @@ function rcmail_startup($task='mail')
// use database for storing session data
include_once('include/session.inc');
+ // clear output buffer
+ ob_end_clean();
+
// init session
session_start();
$sess_id = session_id();
@@ -101,7 +108,6 @@ function rcmail_startup($task='mail')
// overwrite config with user preferences
$CONFIG = array_merge($CONFIG, (array)$USER->get_prefs());
-
// reset some session parameters when changing task
if ($_SESSION['task'] != $task)
unset($_SESSION['page']);
@@ -113,14 +119,12 @@ function rcmail_startup($task='mail')
if ($task=='mail')
rcmail_imap_init();
-
// set localization
if ($CONFIG['locale_string'])
setlocale(LC_ALL, $CONFIG['locale_string']);
else if ($sess_user_lang)
setlocale(LC_ALL, $sess_user_lang);
-
register_shutdown_function('rcmail_shutdown');
}