- 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
This commit is contained in:
parent
59129beb22
commit
e9b9046d8b
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue