summaryrefslogtreecommitdiff
path: root/plugins/kolab_tags
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kolab_tags')
-rw-r--r--plugins/kolab_tags/kolab_tags.js2
-rw-r--r--plugins/kolab_tags/lib/kolab_tags_backend.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/kolab_tags/kolab_tags.js b/plugins/kolab_tags/kolab_tags.js
index 14d28e7..0afd78e 100644
--- a/plugins/kolab_tags/kolab_tags.js
+++ b/plugins/kolab_tags/kolab_tags.js
@@ -293,7 +293,7 @@ function tag_form_dialog(id)
if (tag) {
name_input.val(tag.name);
- color_input.val(tag.color.replace(/^#/, ''));
+ color_input.val(tag.color ? tag.color.replace(/^#/, '') : '');
}
}
diff --git a/plugins/kolab_tags/lib/kolab_tags_backend.php b/plugins/kolab_tags/lib/kolab_tags_backend.php
index 519f962..de69bae 100644
--- a/plugins/kolab_tags/lib/kolab_tags_backend.php
+++ b/plugins/kolab_tags/lib/kolab_tags_backend.php
@@ -38,14 +38,14 @@ class kolab_tags_backend
*/
public function list_tags($filter = array())
{
- $config = kolab_storage_config::get_instance();
- $default = true;
- $filter[] = array('type', '=', self::O_TYPE);
- $cat_filter = array('category' => self::O_CATEGORY);
+ $config = kolab_storage_config::get_instance();
+ $default = true;
+ $filter[] = array('type', '=', self::O_TYPE);
+ $filter[] = array('category', '=', self::O_CATEGORY);
// for performance reasons assume there will be no more than 100 tags (per-folder)
- return $config->get_objects($filter, $default, $cat_filter, 100);
+ return $config->get_objects($filter, $default, 100);
}
/**