aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/functions.inc.php3
-rw-r--r--include/functions_picture.inc.php9
-rw-r--r--include/functions_url.inc.php11
3 files changed, 17 insertions, 6 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index e80e3cb3a..81c5f6009 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -792,8 +792,9 @@ function get_thumbnail_url($element_info)
$path = get_thumbnail_location($element_info);
if ( !url_is_remote($path) )
{
- $path = get_root_url().$path;
+ $path = embellish_url(get_root_url().$path);
}
+
// plugins want another url ?
$path = trigger_event('get_thumbnail_url', $path, $element_info);
return $path;
diff --git a/include/functions_picture.inc.php b/include/functions_picture.inc.php
index 09b7c90ce..4a21c1bcc 100644
--- a/include/functions_picture.inc.php
+++ b/include/functions_picture.inc.php
@@ -3,8 +3,7 @@
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -47,7 +46,7 @@ function get_element_url($element_info)
$url = get_element_location($element_info);
if ( !url_is_remote($url) )
{
- $url = get_root_url().$url;
+ $url = embellish_url(get_root_url().$url);
}
// plugins want another url ?
return trigger_event('get_element_url', $url, $element_info);
@@ -121,7 +120,7 @@ function get_image_url($element_info)
$url = get_image_location($element_info);
if ( !url_is_remote($url) )
{
- $url = get_root_url().$url;
+ $url = embellish_url(get_root_url().$url);
}
return $url;
}
@@ -179,7 +178,7 @@ function get_high_url($element_info)
$url = get_high_location($element_info);
if (!empty($url) and !url_is_remote($url) )
{
- $url = get_root_url().$url;
+ $url = embellish_url(get_root_url().$url);
}
// plugins want another url ?
return trigger_event('get_high_url', $url, $element_info);
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php
index 1d2b59e47..3c0138136 100644
--- a/include/functions_url.inc.php
+++ b/include/functions_url.inc.php
@@ -701,4 +701,15 @@ function unset_make_full_url()
}
}
+/**
+ * Embellish the url argument
+ *
+ * @param $url
+ * @return $url embellished
+ */
+function embellish_url($url)
+{
+ return str_replace('/./', '/', $url);
+}
+
?> \ No newline at end of file