Disable calendar color storage in folder annotations until KEP:12 is approved
This commit is contained in:
parent
eb39be7f60
commit
3726c8833c
2 changed files with 5 additions and 3 deletions
|
@ -155,11 +155,12 @@ class kolab_calendar
|
||||||
{
|
{
|
||||||
// color is defined in folder METADATA
|
// color is defined in folder METADATA
|
||||||
// FIXME: Kolab_Folder::getKolabAttribute() only reads value.shared; value.priv should be considered first
|
// FIXME: Kolab_Folder::getKolabAttribute() only reads value.shared; value.priv should be considered first
|
||||||
|
/* DISABLED until KEP #12 is approved
|
||||||
if ($color = $this->storage->_folder->getKolabAttribute('color')) {
|
if ($color = $this->storage->_folder->getKolabAttribute('color')) {
|
||||||
return $color;
|
return $color;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// Store temporarily calendar color in user prefs (will be changed)
|
// calendar color is stored in user prefs (temporary solution)
|
||||||
$prefs = $this->cal->rc->config->get('kolab_calendars', array());
|
$prefs = $this->cal->rc->config->get('kolab_calendars', array());
|
||||||
|
|
||||||
if (!empty($prefs[$this->id]) && !empty($prefs[$this->id]['color']))
|
if (!empty($prefs[$this->id]) && !empty($prefs[$this->id]['color']))
|
||||||
|
|
|
@ -318,13 +318,14 @@ class kolab_driver extends calendar_driver
|
||||||
|
|
||||||
// save color in METADATA
|
// save color in METADATA
|
||||||
// TODO: also save 'showalarams' and other properties here
|
// TODO: also save 'showalarams' and other properties here
|
||||||
|
/* DISABLED until KEP #12 is approved
|
||||||
if ($result && $prop['color']) {
|
if ($result && $prop['color']) {
|
||||||
if (!($meta_saved = $this->rc->imap->set_metadata($folder, array('/shared/vendor/kolab/color' => $prop['color'])))) // try in shared namespace
|
if (!($meta_saved = $this->rc->imap->set_metadata($folder, array('/shared/vendor/kolab/color' => $prop['color'])))) // try in shared namespace
|
||||||
$meta_saved = $this->rc->imap->set_metadata($folder, array('/private/vendor/kolab/color' => $prop['color'])); // try in private namespace
|
$meta_saved = $this->rc->imap->set_metadata($folder, array('/private/vendor/kolab/color' => $prop['color'])); // try in private namespace
|
||||||
if ($meta_saved)
|
if ($meta_saved)
|
||||||
unset($prop['color']); // unsetting will prevent fallback to local user prefs
|
unset($prop['color']); // unsetting will prevent fallback to local user prefs
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return $result ? $folder : false;
|
return $result ? $folder : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue