Fix so SPECIAL-USE assignments are forced only until user sets special folders (#4782)
The old behaviour where SPECIAL-USE has always a prio can be bringed back
by setting lock_special_folders=false and adding it to dont_override.
| | |
| | | - Protect download urls against CSRF using unique request tokens (#1490642) |
| | | - newmail_notifier: Refactor desktop notifications |
| | | - Fix so contactlist_fields option can be set via config file |
| | | - Fix so SPECIAL-USE assignments are forced only until user sets special folders (#4782) |
| | | |
| | | RELEASE 1.2-beta |
| | | ---------------- |
| | |
| | | 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']); |
| | |
| | | case 'folders': |
| | | $a_user_prefs = array( |
| | | 'show_real_foldernames' => isset($_POST['_show_real_foldernames']) ? true : false, |
| | | // stop using SPECIAL-USE (#4782) |
| | | 'lock_special_folders' => !in_array('lock_special_folders', (array) $CONFIG['dont_override']), |
| | | ); |
| | | |
| | | foreach (rcube_storage::$folder_types as $type) { |