- Fix namespace handling in special folders settings (#1488112)

release-0.7
alecpl 13 years ago
parent 03079a5a51
commit f537504ed0

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Fix namespace handling in special folders settings (#1488112)
- Disable time limit for CLI scripts (#1488109) - Disable time limit for CLI scripts (#1488109)
- Fix misleading display when chaning editor type (#1488104) - Fix misleading display when chaning editor type (#1488104)
- Add loading indicator on contact delete - Add loading indicator on contact delete

@ -840,16 +840,8 @@ class rcmail
if (!$imap_login) if (!$imap_login)
return false; return false;
$this->set_imap_prop();
// user already registered -> update user's record // user already registered -> update user's record
if (is_object($user)) { if (is_object($user)) {
// fix some old settings according to namespace prefix
$this->fix_namespace_settings($user);
// create default folders on first login
if (!$user->data['last_login'] && $config['create_default_folders'])
$this->imap->create_default_folders();
// update last login timestamp // update last login timestamp
$user->touch(); $user->touch();
} }
@ -857,13 +849,6 @@ class rcmail
else if ($config['auto_create_user']) { else if ($config['auto_create_user']) {
if ($created = rcube_user::create($username, $host)) { if ($created = rcube_user::create($username, $host)) {
$user = $created; $user = $created;
// fix default settings according to namespace prefix
$this->fix_namespace_settings($user);
// create default folders on first login
if ($config['create_default_folders'])
$this->imap->create_default_folders();
} }
else { else {
raise_error(array( raise_error(array(
@ -883,9 +868,19 @@ class rcmail
// login succeeded // login succeeded
if (is_object($user) && $user->ID) { if (is_object($user) && $user->ID) {
// Configure environment
$this->set_user($user); $this->set_user($user);
$this->set_imap_prop();
$this->session_configure(); $this->session_configure();
// fix some old settings according to namespace prefix
$this->fix_namespace_settings($user);
// create default folders on first login
if ($config['create_default_folders'] && (!empty($created) || empty($user->data['last_login']))) {
$this->imap->create_default_folders();
}
// set session vars // set session vars
$_SESSION['user_id'] = $user->ID; $_SESSION['user_id'] = $user->ID;
$_SESSION['username'] = $user->data['username']; $_SESSION['username'] = $user->data['username'];
@ -1633,8 +1628,8 @@ class rcmail
if (!$prefix_len) if (!$prefix_len)
return; return;
$prefs = $user->get_prefs(); $prefs = $this->config->all();
if (empty($prefs) || $prefs['namespace_fixed']) if (!empty($prefs['namespace_fixed']))
return; return;
// Build namespace prefix regexp // Build namespace prefix regexp

Loading…
Cancel
Save