--- gallery-orig/lib/url.php Mon May 9 17:07:41 2005 +++ gallery/lib/url.php Thu Jul 28 21:40:06 2005 @@ -126,7 +126,30 @@ } } } - return htmlspecialchars($url); + $retVal = ''; + if( isset($GALLERY_EMBEDDED_INSIDE)) { + switch ($GALLERY_EMBEDDED_INSIDE_TYPE) { + case 'mambo': + if(function_exists('sefRelToAbs')) { + // Since there's no way to convert the gallery url's just the embedded mambo links, + // and since gallery uses the notation /index..... instead of just index.php, we'll + // strip off the leading slash. + $url = preg_replace('/^'.preg_quote($gallery->session->mambo->mosRoot,'/').'\//', '', $url); + //error_log("Trying to convert: ".$url); + $retVal = sefRelToAbs($url); + } + else { + $retVal = htmlspecialchars($url); + } + break; + default: + $retVal = htmlspecialchars($url); + } + } + else { + $retVal = htmlspecialchars($url); + } + return $retVal; } function makeGalleryHeaderUrl($target, $args=array()) {