Only lowercase event categories for comparison but not for saving (#2898)
This commit is contained in:
parent
7fb7ef6d0f
commit
43e9aa778a
1 changed files with 1 additions and 1 deletions
|
@ -800,7 +800,7 @@ class kolab_driver extends calendar_driver
|
||||||
|
|
||||||
// add new categories to user prefs
|
// add new categories to user prefs
|
||||||
$old_categories = $this->rc->config->get('calendar_categories', $this->default_categories);
|
$old_categories = $this->rc->config->get('calendar_categories', $this->default_categories);
|
||||||
if ($newcats = array_diff(array_map('strtolower', array_keys($categories)), array_map('strtolower', array_keys($old_categories)))) {
|
if ($newcats = array_udiff(array_keys($categories), array_keys($old_categories), function($a, $b){ return strcasecmp($a, $b); })) {
|
||||||
foreach ($newcats as $category)
|
foreach ($newcats as $category)
|
||||||
$old_categories[$category] = ''; // no color set yet
|
$old_categories[$category] = ''; // no color set yet
|
||||||
$this->rc->user->save_prefs(array('calendar_categories' => $old_categories));
|
$this->rc->user->save_prefs(array('calendar_categories' => $old_categories));
|
||||||
|
|
Loading…
Add table
Reference in a new issue