diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-09-09 01:16:32 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-09-09 01:16:32 +0000 |
commit | 26474d349f6f03b3f74beb91ef680f0c634e05d5 (patch) | |
tree | 0a72774c7651facbb21ecf41764a939535ce6cfa /picture.php | |
parent | fceb26e23175ff93988091a05c80443a39b9d865 (diff) |
- fix issue when picture_url_style = file (sql query like)
- sql call SET NAMES "xxx" (if required) in upgrade.php, upgrade_feed.php and after 65-database.php
git-svn-id: http://piwigo.org/svn/trunk@2512 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r-- | picture.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/picture.php b/picture.php index 6126a307e..31a53cbde 100644 --- a/picture.php +++ b/picture.php @@ -52,7 +52,9 @@ SELECT id, file, level 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 |