Commit e87a2a8b authored by Daniel Morlock's avatar Daniel Morlock

Don't show the same categories twice.

parent 3ac21b0c
......@@ -396,9 +396,13 @@ class calendar_ui
$attrib['name'] = 'categories';
$select = new html_select($attrib);
$select->add('---', '');
$keys = array();
foreach ($this->cal->get_drivers() as $driver) {
foreach (array_keys((array)$driver->list_categories()) as $cat) {
$select->add($cat, $cat);
foreach((array)$driver->list_categories() as $key => $color) {
if ($color && !in_array($key, $keys)) {
$select->add($key, $key);
array_push($keys, $key);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment