From 0126e657e8e4f19777ab929d5543245027b6b2ba Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 8 Aug 2010 10:46:51 -0400 Subject: [PATCH] Make sure that $url is a Horde_Url, and only try to add it if we make a successful API call. --- ansel/lib/Widget/Actions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansel/lib/Widget/Actions.php b/ansel/lib/Widget/Actions.php index bcaa42c9d..d49b55181 100644 --- a/ansel/lib/Widget/Actions.php +++ b/ansel/lib/Widget/Actions.php @@ -122,8 +122,9 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base try { $url = $registry->bookmarks->getAddUrl($api_params); + $url = new Horde_Url($url); + $html .= '
  • ' . $url->link(array('class' => 'widget')) . Horde::img(Horde_Themes::img('trean.png', 'trean')) . ' ' . _("Add to bookmarks") . '
  • '; } catch (Horde_Exception $e) {} - $html .= '
  • ' . $url->link(array('class' => 'widget')) . Horde::img(Horde_Themes::img('trean.png', 'trean')) . ' ' . _("Add to bookmarks") . '
  • '; } /* Download as ZIP link */ -- 2.11.0