summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-01 19:27:07 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-01 19:27:07 +0200
commitdc0b500e78aae13349b848303302a213ed3a1e65 (patch)
tree29ab0e108edad0456cbbdc3fddfd08fbf8ab7e72 /program/include/rcmail.php
parent0ee63280982734599f83fdc84ccc309fbf3db2c2 (diff)
Removed redundant default_folders config option (#1489737)
Implemented IMAP SPECIAL-USE extension support [RFC6154] (#1487830)
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 0fe5dbcf3..9e57a8e19 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -644,10 +644,8 @@ class rcmail extends rcube
// fix some old settings according to namespace prefix
$this->fix_namespace_settings($user);
- // create default folders on login
- if ($this->config->get('create_default_folders')) {
- $storage->create_default_folders();
- }
+ // set/create special folders
+ $this->set_special_folders();
// clear all mailboxes related cache(s)
$storage->clear_cache('mailboxes', true);
@@ -927,14 +925,6 @@ class rcmail extends rcube
}
}
- if (!empty($prefs['default_folders'])) {
- foreach ($prefs['default_folders'] as $idx => $name) {
- if ($name != 'INBOX' && !preg_match($regexp, $name)) {
- $prefs['default_folders'][$idx] = $prefix.$name;
- }
- }
- }
-
if (!empty($prefs['search_mods'])) {
$folders = array();
foreach ($prefs['search_mods'] as $idx => $value) {
@@ -1646,14 +1636,13 @@ class rcmail extends rcube
public function localize_folderpath($path)
{
$protect_folders = $this->config->get('protect_default_folders');
- $default_folders = (array) $this->config->get('default_folders');
$delimiter = $this->storage->get_hierarchy_delimiter();
$path = explode($delimiter, $path);
$result = array();
foreach ($path as $idx => $dir) {
$directory = implode($delimiter, array_slice($path, 0, $idx+1));
- if ($protect_folders && in_array($directory, $default_folders)) {
+ if ($protect_folders && $this->storage->is_special_folder($directory)) {
unset($result);
$result[] = $this->localize_foldername($directory);
}