From bdd8949ee8b336ef33a7c83ae2c00ac0134dad0f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 18 Nov 2009 11:31:54 +0000 Subject: [PATCH] Fix for double-add of URL --- inc/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index ef7e638836..5557b88024 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3855,8 +3855,11 @@ function encodeUrl ($url, $outputMode = '0') { } // END - if } // END - if - // Add {?URL?} - $url = '{?URL?}/' . $url; + // Add {?URL?} ? + if ((substr($url, 0, strlen(getConfig('URL'))) != getConfig('URL')) && (substr($url, 0, 7) == '{?URL?}')) { + // Add it + $url = '{?URL?}/' . $url; + } // END - if // Return the URL return $url; -- 2.39.5