Add type-mail class to all folders without specified type
This commit is contained in:
parent
406722b756
commit
625e8f4f05
1 changed files with 11 additions and 8 deletions
|
@ -142,13 +142,16 @@ class kolab_folders extends rcube_plugin
|
||||||
$folder = $attrib['foldername']; // UTF7-IMAP
|
$folder = $attrib['foldername']; // UTF7-IMAP
|
||||||
$data = $folderdata[$folder];
|
$data = $folderdata[$folder];
|
||||||
|
|
||||||
if (!empty($data)
|
if (!empty($data))
|
||||||
&& ($type = $data[kolab_folders::CTYPE_KEY])
|
$type = $data[kolab_folders::CTYPE_KEY];
|
||||||
&& ($class_name = self::folder_class_name($type))
|
|
||||||
) {
|
if (!$type)
|
||||||
$attrib['class'] = trim($attrib['class'] . ' ' . $class_name);
|
$type = 'mail';
|
||||||
$table->set_row_attribs($attrib, $i);
|
|
||||||
}
|
$class_name = self::folder_class_name($type);
|
||||||
|
|
||||||
|
$attrib['class'] = trim($attrib['class'] . ' ' . $class_name);
|
||||||
|
$table->set_row_attribs($attrib, $i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
|
@ -239,7 +242,7 @@ class kolab_folders extends rcube_plugin
|
||||||
if (!strlen($old_mbox)) {
|
if (!strlen($old_mbox)) {
|
||||||
// By default don't subscribe to non-mail folders
|
// By default don't subscribe to non-mail folders
|
||||||
if ($subscribe)
|
if ($subscribe)
|
||||||
$subscribe = preg_match('/^mail/', $ctype);
|
$subscribe = (bool) preg_match('/^mail/', $ctype);
|
||||||
|
|
||||||
$result = $this->rc->imap->create_mailbox($mbox, $subscribe);
|
$result = $this->rc->imap->create_mailbox($mbox, $subscribe);
|
||||||
// Set folder type
|
// Set folder type
|
||||||
|
|
Loading…
Add table
Reference in a new issue