Fixes #82
This commit is contained in:
@@ -69,7 +69,7 @@ class ident_switch extends rcube_plugin
|
|||||||
{
|
{
|
||||||
$defaultKey = $type . '_mbox_default' . self::MY_POSTFIX;
|
$defaultKey = $type . '_mbox_default' . self::MY_POSTFIX;
|
||||||
$otherKey = $type . '_mbox' . self::MY_POSTFIX;
|
$otherKey = $type . '_mbox' . self::MY_POSTFIX;
|
||||||
$val = $_SESSION[$otherKey] ? $_SESSION[$otherKey] : $_SESSION[$defaultKey];
|
$val = isset($_SESSION[$otherKey]) ? $_SESSION[$otherKey] : $_SESSION[$defaultKey];
|
||||||
$rc->config->set($type . '_mbox', $val);
|
$rc->config->set($type . '_mbox', $val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ class ident_switch extends rcube_plugin
|
|||||||
elseif (ctype_digit($iid_s))
|
elseif (ctype_digit($iid_s))
|
||||||
$iid = intval($iid_s);
|
$iid = intval($iid_s);
|
||||||
|
|
||||||
$accNames = array($_SESSION['global_alias'] ? $_SESSION['global_alias'] : $rc->user->data['username']);
|
$accNames = array(isset($_SESSION['global_alias']) ? $_SESSION['global_alias'] : $rc->user->data['username']);
|
||||||
$accValues = array(-1);
|
$accValues = array(-1);
|
||||||
$accSelected = -1;
|
$accSelected = -1;
|
||||||
|
|
||||||
@@ -665,7 +665,7 @@ class ident_switch extends rcube_plugin
|
|||||||
foreach (rcube_storage::$folder_types as $type)
|
foreach (rcube_storage::$folder_types as $type)
|
||||||
{
|
{
|
||||||
$otherKey = $type . '_mbox' . self::MY_POSTFIX;
|
$otherKey = $type . '_mbox' . self::MY_POSTFIX;
|
||||||
if ($_SESSION[$otherKey])
|
if (isset($_SESSION[$otherKey]))
|
||||||
$rc->session->remove($otherKey);
|
$rc->session->remove($otherKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -693,7 +693,7 @@ class ident_switch extends rcube_plugin
|
|||||||
{
|
{
|
||||||
if (strncasecmp($k, 'storage', 7) === 0 && substr_compare($k, self::MY_POSTFIX, -$my_postfix_len, $my_postfix_len) !== 0)
|
if (strncasecmp($k, 'storage', 7) === 0 && substr_compare($k, self::MY_POSTFIX, -$my_postfix_len, $my_postfix_len) !== 0)
|
||||||
{
|
{
|
||||||
if (!$_SESSION[$k . self::MY_POSTFIX])
|
if (!isset($_SESSION[$k . self::MY_POSTFIX]))
|
||||||
$_SESSION[$k . self::MY_POSTFIX] = $_SESSION[$k];
|
$_SESSION[$k . self::MY_POSTFIX] = $_SESSION[$k];
|
||||||
|
|
||||||
$rc->session->remove($k);
|
$rc->session->remove($k);
|
||||||
@@ -703,7 +703,7 @@ class ident_switch extends rcube_plugin
|
|||||||
$moreToSave = array('password', 'imap_delimiter');
|
$moreToSave = array('password', 'imap_delimiter');
|
||||||
foreach ($moreToSave as $k)
|
foreach ($moreToSave as $k)
|
||||||
{
|
{
|
||||||
if (!$_SESSION[$k . self::MY_POSTFIX])
|
if (!isset($_SESSION[$k . self::MY_POSTFIX]))
|
||||||
$_SESSION[$k . self::MY_POSTFIX] = $_SESSION[$k];
|
$_SESSION[$k . self::MY_POSTFIX] = $_SESSION[$k];
|
||||||
|
|
||||||
$rc->session->remove($k);
|
$rc->session->remove($k);
|
||||||
@@ -724,7 +724,7 @@ class ident_switch extends rcube_plugin
|
|||||||
if ($ssl && strncasecmp($host, $hostProtocol, strlen($hostProtocol)) !== 0)
|
if ($ssl && strncasecmp($host, $hostProtocol, strlen($hostProtocol)) !== 0)
|
||||||
$host = $hostProtocol . $host;
|
$host = $hostProtocol . $host;
|
||||||
|
|
||||||
$delimiter = $r['imap_delimiter'] ? $r['imap_delimiter'] : '.'; // Default delimiter here
|
$delimiter = isset($r['imap_delimiter']) ? $r['imap_delimiter'] : '.'; // Default delimiter here
|
||||||
|
|
||||||
$_SESSION['storage_host'] = $host;
|
$_SESSION['storage_host'] = $host;
|
||||||
$_SESSION['storage_ssl'] = $ssl;
|
$_SESSION['storage_ssl'] = $ssl;
|
||||||
@@ -736,7 +736,7 @@ class ident_switch extends rcube_plugin
|
|||||||
|
|
||||||
foreach (rcube_storage::$folder_types as $type)
|
foreach (rcube_storage::$folder_types as $type)
|
||||||
{
|
{
|
||||||
if ($r[$type . '_mbox']) {
|
if (isset($r[$type . '_mbox'])) {
|
||||||
$otherKey = $type . '_mbox' . self::MY_POSTFIX;
|
$otherKey = $type . '_mbox' . self::MY_POSTFIX;
|
||||||
$_SESSION[$otherKey] = $r[$type . '_mbox'];
|
$_SESSION[$otherKey] = $r[$type . '_mbox'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user