Fix regression on addressbook and notes lists (T7463)

This commit is contained in:
Aleksander Machniak 2023-06-02 12:20:06 +02:00
parent f4a9b1759b
commit a8a78d3f66
3 changed files with 5 additions and 5 deletions

View file

@ -256,7 +256,7 @@ class kolab_addressbook extends rcube_plugin
// copy group items... // copy group items...
if (preg_match('!<ul[^>]*>(.*)</ul>\n*$!Ums', $content, $m)) { if (preg_match('!<ul[^>]*>(.*)</ul>\n*$!Ums', $content, $m)) {
$child_html = $m[1] . $child_html; $child_html = $m[1] . $child_html;
$content = substr($content, 0, -strlen($m[0]) - 1); $content = substr($content, 0, -strlen($m[0]));
} }
// ... and re-create the subtree // ... and re-create the subtree
if (!empty($child_html)) { if (!empty($child_html)) {

View file

@ -33,7 +33,7 @@ class kolab_notes_ui
$this->plugin->include_stylesheet($this->plugin->local_skin_path() . '/notes.css'); $this->plugin->include_stylesheet($this->plugin->local_skin_path() . '/notes.css');
$this->ready = true; $this->ready = true;
} }
/** /**
* Register handler methods for the template engine * Register handler methods for the template engine
@ -83,7 +83,7 @@ class kolab_notes_ui
$select = new html_select($attrib); $select = new html_select($attrib);
} }
$tree = $is_select ? true : null; $tree = !$is_select ? true : null;
$lists = $this->plugin->get_lists($tree); $lists = $this->plugin->get_lists($tree);
$jsenv = array(); $jsenv = array();

View file

@ -129,7 +129,7 @@ class kolab_storage_folder extends kolab_storage_folder_api
$ns = $this->get_namespace(); $ns = $this->get_namespace();
$nsdata = $this->imap->get_namespace($ns); $nsdata = $this->imap->get_namespace($ns);
if (is_array($nsdata[0]) && strlen($nsdata[0][0]) && strpos($this->name, $nsdata[0][0]) === 0) { if (!empty($nsdata[0][0]) && strpos($this->name, $nsdata[0][0]) === 0) {
$subpath = substr($this->name, strlen($nsdata[0][0])); $subpath = substr($this->name, strlen($nsdata[0][0]));
if ($ns == 'other') { if ($ns == 'other') {
list($user, $suffix) = explode($nsdata[0][1], $subpath, 2); list($user, $suffix) = explode($nsdata[0][1], $subpath, 2);