| | |
| | | |
| | | /** |
| | | * protected method for setting threaded messages flags: |
| | | * depth, has_children and unread_children |
| | | * depth, has_children, unread_children, flagged_children |
| | | * |
| | | * @param array $headers Reference to headers array indexed by message UID |
| | | * @param rcube_result_thread $threads Threads data object |
| | |
| | | |
| | | if (!empty($parents)) { |
| | | $headers[$uid]->parent_uid = end($parents); |
| | | if (empty($header->flags['SEEN'])) |
| | | if (empty($header->flags['SEEN'])) { |
| | | $headers[$parents[0]]->unread_children++; |
| | | } |
| | | if (!empty($header->flags['FLAGGED'])) { |
| | | $headers[$parents[0]]->flagged_children++; |
| | | } |
| | | } |
| | | array_push($parents, $uid); |
| | | |
| | |
| | | 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']); |
| | |
| | | $this->clear_cache('mailboxes', true); |
| | | } |
| | | |
| | | return $updated == count($folders) ? true : false; |
| | | return $updated == count($folders); |
| | | } |
| | | |
| | | /** |