alecpl
2008-04-09 6f9876690af9115ecd9af8ceaecfbdd4b987ed61
#1484624: do ob_start/ob_end_clean when reading config files


1 files modified
10 ■■■■ changed files
program/include/main.inc 10 ●●●● patch | view | raw | blame | history
program/include/main.inc
@@ -52,6 +52,10 @@
  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 @@
  // 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 @@
  // 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,13 +119,11 @@
  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');
  }