aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-09-06 00:21:21 +0000
committerrvelices <rv-github@modusoptimus.com>2008-09-06 00:21:21 +0000
commite9b9046d8bcfd705afb0ff1e44af7b0c67914429 (patch)
treea7c0c63cf2d06a95081ddde8cb4e7357dd4f7128 /picture.php
parent59129beb22716788f816da6ce3adeea342bf4261 (diff)
- fix issue when picture_url_style = file (sql query like)
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2504 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/picture.php b/picture.php
index 29e2fc69a..1661c7305 100644
--- a/picture.php
+++ b/picture.php
@@ -56,7 +56,9 @@ SELECT id, file
else
{// url given by file name
assert( !empty($page['image_file']) );
- $query .= 'file LIKE "' . $page['image_file'] . '.%" ESCAPE "|" LIMIT 1';
+ $query .= 'file LIKE "' .
+ str_replace(array('_','%'), array('/_','/%'), $page['image_file'] ).
+ '.%" ESCAPE "/" LIMIT 1';
}
if ( ! ( $row = mysql_fetch_array(pwg_query($query)) ) )
{// element does not exist