}
/**
- * Renames a calendar.
- *
- * @param string $from The current name of the calendar.
- * @param string $to The new name of the calendar.
- *
- * @return mixed True or a PEAR_Error on failure.
- */
- public function rename($from, $to)
- {
- return true;
- }
-
- /**
* Searches a calendar.
*
* @param object $query An object with the criteria to search for.
if (is_callable('Kolab', 'triggerFreeBusyUpdate')) {
Kolab::triggerFreeBusyUpdate($this->_store->parseFolder($calendar));
}
- return true;
- }
-
- /**
- * Rename a calendar.
- *
- * @param string $from The current name of the calendar.
- * @param string $to The new name of the calendar.
- *
- * @return mixed True or a PEAR_Error on failure.
- */
- public function rename($from, $to)
- {
- // FIXME: We can't do much here. We'd need to be called after
- // renaming the share here. This needs to be checked again.
- // kolab/issue2249 ([horde/kronolith] Kronolith is unable to
- // trigger a free/busy update on a folder rename)
- return true;
}
/**
$this->_resource->set('name', $new_name);
$this->_resource->set('description', $this->_vars->get('description'));
$this->_resource->set('response_type', $this->_vars->get('responsetype'));
- if ($original_name != $new_name) {
- $result = Kronolith::getDriver()->rename($original_name, $new_name);
- if (is_a($result, 'PEAR_Error')) {
- return PEAR::raiseError(sprintf(_("Unable to rename \"%s\": %s"), $original_name, $result->getMessage()));
- }
- }
/* Update group memberships */
$driver = Kronolith::getDriver('Resource');
$this->_resource->set('name', $new_name);
$this->_resource->set('description', $this->_vars->get('description'));
$this->_resource->set('members', $this->_vars->get('members'));
- if ($original_name != $new_name) {
- $result = Kronolith::getDriver()->rename($original_name, $new_name);
- if (is_a($result, 'PEAR_Error')) {
- return PEAR::raiseError(sprintf(_("Unable to rename \"%s\": %s"), $original_name, $result->getMessage()));
- }
- }
$result = $this->_resource->save();
if (is_a($result, 'PEAR_Error')) {