aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_url.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2006-06-21 19:36:22 +0000
committernikrou <nikrou@piwigo.org>2006-06-21 19:36:22 +0000
commitc90c29e92766219ee723e17e980c31d58b916bbf (patch)
tree6eb84c02514e949f9bca7e39a4cb1846657ff09c /include/functions_url.inc.php
parent40ad0dd93547aa7f353313ed64c9e847704a7642 (diff)
fix bug 431: src of image are incorrect:
ex: ././galleries/img.jpg instead of ./galleries/img.jpg svn merge -r1373:1374 from trunk into branch 1.6 git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1375 68402e56-0260-453c-a942-63ccdbb3a9ee
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;
}
/**