From 2b5082d95af902ef1a8ce8596490dd8aa6e55e36 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sun, 4 Jul 2010 11:20:29 -0400 Subject: [PATCH] Fix pref links for FB and Twitter blocks --- horde/lib/Block/fb_stream.php | 8 ++++---- horde/lib/Block/twitter_timeline.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/horde/lib/Block/fb_stream.php b/horde/lib/Block/fb_stream.php index d26c51834..365454c31 100644 --- a/horde/lib/Block/fb_stream.php +++ b/horde/lib/Block/fb_stream.php @@ -157,7 +157,7 @@ EOF; // If no prefs exist ------- if (empty($fbp['sid'])) { - return sprintf(_("You have not properly connected your Facebook account with Horde. You should check your Facebook settings in your %s."), Horde::link($endpoint) . _("preferences") . ''); + return sprintf(_("You have not properly connected your Facebook account with Horde. You should check your Facebook settings in your %s."), Horde::getServiceLink('options', 'horde')->add('group', 'facebook')->link() . _("preferences") . ''); } // Get stream @@ -165,7 +165,7 @@ EOF; $stream = $facebook->streams->get('', array(), '', '', $this->_params['count'], $this->_params['filter']); } catch (Horde_Service_Facebook_Exception $e) { $html .= sprintf(_("There was an error making the request: %s"), $e->getMessage()); - $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::link(Horde::url('services/prefs.php?app=horde&group=facebook')) . _("preferences") . ''); + $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::getServiceLink('options', 'horde')->add('group', 'facebook')->link() . _("preferences") . ''); return $html; } @@ -175,7 +175,7 @@ EOF; $notifications = $facebook->notifications->get(); } catch (Horde_Service_Facebook_Exception $e) { $html .= sprintf(_("There was an error making the request: %s"), $e->getMessage()); - $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::link(Horde::url('services/prefs.php?app=horde&group=facebook')) . _("preferences") . ''); + $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::getServiceLink('options', 'horde')->add('group', 'facebook')->link() . _("preferences") . ''); return $html; } } @@ -197,7 +197,7 @@ EOF; $status = $facebook->fql->run($fql); } catch (Horde_Service_Facebook_Exception $e) { $html .= sprintf(_("There was an error making the request: %s"), $e->getMessage()); - $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::link(Horde::url('services/prefs.php?app=horde&group=facebook')) . _("preferences") . ''); + $html .= sprintf(_("You can also check your Facebook settings in your %s."), Horde::getServiceLink('options', 'horde')->add('group', 'facebook')->link() . _("preferences") . ''); return $html; } $status = array_pop($status); diff --git a/horde/lib/Block/twitter_timeline.php b/horde/lib/Block/twitter_timeline.php index abf8c33cb..d38c3f2d2 100644 --- a/horde/lib/Block/twitter_timeline.php +++ b/horde/lib/Block/twitter_timeline.php @@ -182,7 +182,7 @@ EOT; { $token = unserialize($GLOBALS['prefs']->getValue('twitter')); if (empty($token['key']) && empty($token['secret'])) { - $pref_link = Horde::link(Horde::url('services/twitter.php', true)); + $pref_link = Horde::getServiceLink('options', 'horde')->add('group', 'twitter')->link(); throw new Horde_Exception(sprintf(_("You have not properly connected your Twitter account with Horde. You should check your Twitter settings in your %s."), $pref_link . _("preferences") . '')); } -- 2.11.0