- Fix handling of other users namespace roots
| | |
| | | foreach ($ns as $item) { |
| | | if ($item[0] === $mbox) { |
| | | $options['is_root'] = true; |
| | | break; |
| | | break 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // check if the folder is other user virtual-root |
| | | if (!$options['is_root'] && !empty($namespace) && !empty($namespace['other'])) { |
| | | $parts = explode($this->delimiter, $mailbox); |
| | | if (count($parts) == 2) { |
| | | $mbox = $parts[0] . $this->delimiter; |
| | | foreach ($namespace['other'] as $item) { |
| | | if ($item[0] === $mbox) { |
| | | $options['is_root'] = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | $options['name'] = $mailbox; |
| | | $options['options'] = $this->mailbox_options($mailbox, true); |
| | |
| | | |
| | | // Location (name) |
| | | if ($options['protected']) { |
| | | $foldername = Q(rcmail_localize_foldername($mbox_imap)); |
| | | $foldername = Q(str_replace($delimiter, ' » ', rcmail_localize_folderpath($mbox_imap))); |
| | | } |
| | | else if ($options['norename']) { |
| | | $foldername = Q($folder); |
| | |
| | | foreach ($ns as $item) { |
| | | if ($item[0] === $fname) { |
| | | $disabled = true; |
| | | break; |
| | | break 2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // check if the folder is an other users virtual-root folder, then disable subscription option on it |
| | | if (!$disabled && $folder['virtual'] && $folder['level'] == 1 |
| | | && !empty($namespace) && !empty($namespace['other']) |
| | | ) { |
| | | $parts = explode($delimiter, $folder['id']); |
| | | $fname = $parts[0] . $delimiter; |
| | | foreach ($namespace['other'] as $item) { |
| | | if ($item[0] === $fname) { |
| | | $disabled = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $table->add_row(array('id' => 'rcmrow'.$idx, 'class' => join(' ', $classes), |
| | | 'foldername' => $folder['id'])); |