From 48aff91f7edf261aa45c567f10ee69daea539ae0 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Fri, 29 Aug 2008 08:30:55 -0400 Subject: [PATCH] Moved code block to a more appropriate position + codestyle --- index.php | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 839a75f..46c4229 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /* +-------------------------------------------------------------------------+ | RoundCube Webmail IMAP Client | - | Version 0.2-20080620 | + | Version 0.2-20080829 | | | | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland | | | @@ -52,6 +52,15 @@ } } + +// check if config files had errors +if ($err_str = $RCMAIL->config->get_error()) { + raise_error(array( + 'code' => 601, + 'type' => 'php', + 'message' => $err_str), false, true); +} + // check DB connections and exit on failure if ($err_str = $DB->is_error()) { raise_error(array( @@ -79,7 +88,7 @@ get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'), $host)) { // create new session ID unset($_SESSION['temp']); - sess_regenerate_id(); + rcube_sess_regenerate_id(); // send auth cookie if necessary $RCMAIL->authenticate_session(); @@ -157,7 +166,13 @@ // handle keep-alive signal -if ($RCMAIL->action=='keep-alive') { +if ($RCMAIL->action == 'keep-alive') { + $OUTPUT->reset(); + $OUTPUT->send(); +} +// save preference value +else if ($RCMAIL->action == 'save-pref') { + $RCMAIL->user->save_prefs(array(get_input_value('_name', RCUBE_INPUT_POST) => get_input_value('_value', RCUBE_INPUT_POST))); $OUTPUT->reset(); $OUTPUT->send(); } -- Gitblit v1.9.1