Skip to content

Commit

Permalink
fix bug 431: src of image are incorrect:
Browse files Browse the repository at this point in the history
ex: ././galleries/img.jpg instead of ./galleries/img.jpg


git-svn-id: http://piwigo.org/svn/trunk@1374 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Jun 21, 2006
1 parent 9aa29cc commit 84536f0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions include/functions_url.inc.php
Expand Up @@ -27,16 +27,28 @@

/**
* returns a prefix for each url link on displayed page
* and return an empty string for current path
* @return string
*/
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;
}

/**
Expand Down

0 comments on commit 84536f0

Please sign in to comment.