- 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:
rvelices 2008-09-06 00:21:21 +00:00
parent 59129beb22
commit e9b9046d8b

View file

@ -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