diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php
index d5d7bac6..07c85f17 100644
--- a/plugins/kolab_addressbook/kolab_addressbook.php
+++ b/plugins/kolab_addressbook/kolab_addressbook.php
@@ -256,7 +256,7 @@ class kolab_addressbook extends rcube_plugin
// copy group items...
if (preg_match('!
\n*$!Ums', $content, $m)) {
$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
if (!empty($child_html)) {
@@ -334,7 +334,7 @@ class kolab_addressbook extends rcube_plugin
$out = html::tag('li', array(
'id' => 'rcmli' . rcube_utils::html_identifier($id, true),
- 'class' => join(' ', $classes),
+ 'class' => join(' ', $classes),
'noclose' => true,
),
html::div(!empty($source['subscribed']) ? 'subscribed' : null, $inner)
diff --git a/plugins/kolab_notes/kolab_notes_ui.php b/plugins/kolab_notes/kolab_notes_ui.php
index 855f3352..63660169 100644
--- a/plugins/kolab_notes/kolab_notes_ui.php
+++ b/plugins/kolab_notes/kolab_notes_ui.php
@@ -33,7 +33,7 @@ class kolab_notes_ui
$this->plugin->include_stylesheet($this->plugin->local_skin_path() . '/notes.css');
$this->ready = true;
- }
+ }
/**
* Register handler methods for the template engine
@@ -83,7 +83,7 @@ class kolab_notes_ui
$select = new html_select($attrib);
}
- $tree = $is_select ? true : null;
+ $tree = !$is_select ? true : null;
$lists = $this->plugin->get_lists($tree);
$jsenv = array();
diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index 55457621..a61922f4 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -129,7 +129,7 @@ class kolab_storage_folder extends kolab_storage_folder_api
$ns = $this->get_namespace();
$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]));
if ($ns == 'other') {
list($user, $suffix) = explode($nsdata[0][1], $subpath, 2);