summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-16 15:14:41 +0000
committerthomascube <thomas@roundcube.net>2012-01-16 15:14:41 +0000
commitc321a955a7b0f6d6b13ffaebf040a6c7091037ae (patch)
tree60c257d29a726d9bdda7fb75a198342aaef315fa /index.php
parent8764b6ecf0c8d1b0646915a8139cdf6bbac2ca14 (diff)
Merged devel-framework branch (r5746:5779) back into trunk
Diffstat (limited to 'index.php')
-rw-r--r--index.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/index.php b/index.php
index a2d012cc3..9abd0b4c7 100644
--- a/index.php
+++ b/index.php
@@ -48,7 +48,7 @@ if ($err_str = $RCMAIL->config->get_error()) {
}
// check DB connections and exit on failure
-if ($err_str = $DB->is_error()) {
+if ($err_str = $RCMAIL->db->is_error()) {
raise_error(array(
'code' => 603,
'type' => 'db',
@@ -128,9 +128,9 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
$OUTPUT->redirect($redir);
}
else {
- $error_code = (isset($RCMAIL->imap) && is_object($RCMAIL->imap)) ? $RCMAIL->imap->get_error_code() : 1;
+ $error_code = is_object($RCMAIL->storage) ? $RCMAIL->storage->get_error_code() : 1;
- $OUTPUT->show_message($error_code < -1 ? 'imaperror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning');
+ $OUTPUT->show_message($error_code < -1 ? 'storageerror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning');
$RCMAIL->plugins->exec_hook('login_failed', array(
'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user']));
$RCMAIL->kill_session();
@@ -139,7 +139,11 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
// end session (after optional referer check)
else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_check_referer())) {
- $userdata = array('user' => $_SESSION['username'], 'host' => $_SESSION['imap_host'], 'lang' => $RCMAIL->user->language);
+ $userdata = array(
+ 'user' => $_SESSION['username'],
+ 'host' => $_SESSION['storage_host'],
+ 'lang' => $RCMAIL->user->language,
+ );
$OUTPUT->show_message('loggedout');
$RCMAIL->logout_actions();
$RCMAIL->kill_session();