Remove unused rename() method.
authorJan Schneider <jan@horde.org>
Wed, 10 Feb 2010 16:31:25 +0000 (17:31 +0100)
committerJan Schneider <jan@horde.org>
Wed, 10 Feb 2010 16:31:45 +0000 (17:31 +0100)
kronolith/lib/Driver.php
kronolith/lib/Driver/Kolab.php
kronolith/lib/Forms/EditResource.php
kronolith/lib/Forms/EditResourceGroup.php

index 67a2938..c962426 100644 (file)
@@ -122,19 +122,6 @@ class Kronolith_Driver
     }
 
     /**
-     * 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.
index 0185672..011a6e4 100644 (file)
@@ -448,24 +448,6 @@ class Kronolith_Driver_Kolab extends Kronolith_Driver
         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;
     }
 
     /**
index cdbeb7c..d46b93a 100644 (file)
@@ -61,12 +61,6 @@ class Kronolith_EditResourceForm extends Horde_Form {
         $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');
index fe7959d..92402dc 100644 (file)
@@ -53,12 +53,6 @@ class Kronolith_EditResourceGroupForm extends Horde_Form {
         $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')) {