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
This commit is contained in:
nikrou 2006-06-21 19:36:22 +00:00
parent 40ad0dd935
commit c90c29e927

View file

@ -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;
}
/**