From: Michael M Slusarz Date: Fri, 9 Jul 2010 17:13:14 +0000 (-0600) Subject: Simplify X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2d9e92a12f14de23c0db49575296a890da533583;p=horde.git Simplify --- diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index 2496172b9..e3cc7720d 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -930,11 +930,10 @@ HTML; /* Store the webroot in a local variable. */ $webroot = $registry->get('webroot'); - $url = $protocol . '://' . $server_name; - if (preg_match('|^([\w+-]{1,20})://|', $webroot)) { - /* Don't prepend to webroot if it's already absolute. */ - $url = ''; - } + /* Don't prepend to webroot if it's already absolute. */ + $url = preg_match('|^([\w+-]{1,20})://|', $webroot) + ? '' + : $protocol . '://' . $server_name; if (substr($uri, 0, 1) != '/') { /* Simple case for http:// absolute webroots. */