aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_url.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_url.inc.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php
index 63316d4d5..9eb424651 100644
--- a/include/functions_url.inc.php
+++ b/include/functions_url.inc.php
@@ -27,6 +27,7 @@
/**
* returns a prefix for each url link on displayed page
+ * and return an empty string for current path
* @return string
*/
function get_root_url()
@@ -34,9 +35,20 @@ function get_root_url()
global $page;
if ( isset($page['root_path']) )
{
- return $page['root_path'];
+ $root_url = $page['root_path'];
+ }
+ else
+ {
+ $root_url = PHPWG_ROOT_PATH;
+ }
+ if ( dirname($root_url)!='.' )
+ {
+ return $root_url;
+ }
+ else
+ {
+ return '';
}
- return PHPWG_ROOT_PATH;
}
/**