summaryrefslogtreecommitdiff
path: root/roundcubemail/index.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-01-16 15:14:41 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-01-16 15:14:41 +0000
commit272c49b8ca54267634f94d7fdde7c2c2040df165 (patch)
tree6e51092afa198a7fbc01b061cca99ad59f112d9d /roundcubemail/index.php
parentcbd7d7b73b9571a4030961155f1fe0cbb0f1a3d3 (diff)
Merged devel-framework branch (r5746:5779) back into trunk
git-svn-id: https://svn.roundcube.net/trunk@5781 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/index.php')
-rw-r--r--roundcubemail/index.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/index.php b/roundcubemail/index.php
index a2d012cc3..9abd0b4c7 100644
--- a/roundcubemail/index.php
+++ b/roundcubemail/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();