Fix delete link generation.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 3 Apr 2010 21:34:13 +0000 (17:34 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 3 Apr 2010 21:35:44 +0000 (17:35 -0400)
Need to pass datetime and url parameters to getDeleteUrl() as well. Deleting the
'current' recurrence fails without the datetime parameter, and returning to the
previous view after deletion fails without the url parameter.

kronolith/lib/Event.php

index 0f303be..98a30dd 100644 (file)
@@ -2465,7 +2465,9 @@ abstract class Kronolith_Event
                     . '</a>';
             }
             if ($this->hasPermission(Horde_Perms::DELETE)) {
-                $link .= $this->getDeleteUrl()
+                $link .= $this->getDeleteUrl(
+                    array('datetime' => $datetime->strftime('%Y%m%d%H%M%S'),
+                          'url' => $from_url))
                     ->link(array('title' => sprintf(_("Delete %s"), $event_title),
                                  'class' => 'iconDelete'))
                     . Horde::fullSrcImg('delete-' . $icon_color . '.png',