From 6c20329a0b5f3322eb2e574e6e86259306f28119 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 9 Feb 2010 23:50:17 -0700 Subject: [PATCH] Make $app optional to Horde::getServiceLink(). --- framework/Core/lib/Horde.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index cab34ce3f..d1ae0cbb3 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -561,7 +561,8 @@ HTML; * * @return Horde_Url|boolean The HTML to create the link. */ - static public function getServiceLink($type, $app, $override = false) + static public function getServiceLink($type, $app = null, + $override = false) { if (!in_array($type, array('ajax', 'cache', 'download', 'go', 'prefsapi')) && !self::showService($type, $override)) { @@ -587,8 +588,11 @@ HTML; case 'options': case 'prefsapi': if (!in_array($GLOBALS['conf']['prefs']['driver'], array('', 'none'))) { - return self::url($webroot . ($type == 'options' ? '/services/prefs.php' : '/services/prefs/')) - ->add('app', $app); + $url = self::url($webroot . ($type == 'options' ? '/services/prefs.php' : '/services/prefs/')); + if (!is_null($app)) { + $url->add('app', $app); + } + return $url; } break; -- 2.11.0