- 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
===========================
- Fix namespace handling in special folders settings (#1488112)
- Disable time limit for CLI scripts (#1488109)
- Fix misleading display when chaning editor type (#1488104)
- Add loading indicator on contact delete

@ -840,16 +840,8 @@ class rcmail
if (!$imap_login)
return false;
$this->set_imap_prop();
// user already registered -> update user's record
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
$user->touch();
}
@ -857,13 +849,6 @@ class rcmail
else if ($config['auto_create_user']) {
if ($created = rcube_user::create($username, $host)) {
$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 {
raise_error(array(
@ -883,9 +868,19 @@ class rcmail
// login succeeded
if (is_object($user) && $user->ID) {
// Configure environment
$this->set_user($user);
$this->set_imap_prop();
$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
$_SESSION['user_id'] = $user->ID;
$_SESSION['username'] = $user->data['username'];
@ -1633,8 +1628,8 @@ class rcmail
if (!$prefix_len)
return;
$prefs = $user->get_prefs();
if (empty($prefs) || $prefs['namespace_fixed'])
$prefs = $this->config->all();
if (!empty($prefs['namespace_fixed']))
return;
// Build namespace prefix regexp

Loading…
Cancel
Save