From: Michael M Slusarz Date: Wed, 10 Feb 2010 06:50:17 +0000 (-0700) Subject: Make $app optional to Horde::getServiceLink(). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6c20329a0b5f3322eb2e574e6e86259306f28119;p=horde.git Make $app optional to Horde::getServiceLink(). --- 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;