From 473dc0b86d6e1790945d48d6d5161b04e14575b8 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 02 Apr 2016 03:11:21 -0400
Subject: [PATCH] Fix so SPECIAL-USE assignments are forced only until user sets special folders (#4782)
---
program/lib/Roundcube/rcube_imap.php | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index b3322fc..ea5e717 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -3295,6 +3295,12 @@
public function get_special_folders($forced = false)
{
$result = parent::get_special_folders();
+ $rcube = rcube::get_instance();
+
+ // Lock SPECIAL-USE after user preferences change (#4782)
+ if ($rcube->config->get('lock_special_folders')) {
+ return $result;
+ }
if (isset($this->icache['special-use'])) {
return array_merge($result, $this->icache['special-use']);
--
Gitblit v1.9.1