public static function updateShare(&$calendar, $info)
{
if (!$GLOBALS['registry']->getAuth() || $calendar->get('owner') != $GLOBALS['registry']->getAuth() && (!is_null($calendar->get('owner')) || !$GLOBALS['registry']->isAdmin())) {
throw new Kronolith_Exception(_("You are not allowed to change this calendar."));
}
$calendar->set('name', $info['name']);
$calendar->set('color', $info['color']);
$calendar->set('desc', $info['description']);
$calendar->set('owner', empty($info['system']) ? $GLOBALS['registry']->getAuth() : null);
try {
$calendar->save();
} catch (Horde_Share_Exception $e) {
throw new Kronolith_Exception(sprintf(_("Unable to save calendar \"%s\": %s"), $info['name'], $e->getMessage()));
}
$tagger = self::getTagger();
$tagger->replaceTags($calendar->getName(), $info['tags'], $calendar->get('owner'), Kronolith_Tagger::TYPE_CALENDAR);
}