From c908131da8b723339b4871225793e5768fa1c553 Mon Sep 17 00:00:00 2001 From: shish Date: Tue, 17 Jul 2007 02:02:57 +0000 Subject: [PATCH] get_base_href fixed to work in root web folder git-svn-id: file:///home/shish/svn/shimmie2/trunk@310 7f39781d-f577-437e-ae19-be835c7a54ca --- core/util.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index ff10b4e9..b0eb4775 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -206,7 +206,9 @@ function get_memory_limit() { } function get_base_href() { - return dirname($_SERVER['SCRIPT_NAME']); + $dir = dirname($_SERVER['SCRIPT_NAME']); + if($dir == "/") $dir = ""; + return $dir; }