Permalink
Browse files

fix unquoted string + better image sql filter

git-svn-id: http://piwigo.org/svn/trunk@21799 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
modus75 committed Mar 23, 2013
1 parent 0804d94 commit c523eec16366d39a14823ab6935aca2254834ef8
Showing with 5 additions and 5 deletions.
  1. +5 −5 include/ws_functions.inc.php
@@ -54,15 +54,15 @@ function ws_std_image_sql_filter( $params, $tbl_name='' )
$clauses = array();
if ( is_numeric($params['f_min_rate']) )
{
$clauses[] = $tbl_name.'rating_score>'.$params['f_min_rate'];
$clauses[] = $tbl_name.'rating_score>='.$params['f_min_rate'];
}
if ( is_numeric($params['f_max_rate']) )
{
$clauses[] = $tbl_name.'rating_score<='.$params['f_max_rate'];
}
if ( is_numeric($params['f_min_hit']) )
{
$clauses[] = $tbl_name.'hit>'.$params['f_min_hit'];
$clauses[] = $tbl_name.'hit>='.$params['f_min_hit'];
}
if ( is_numeric($params['f_max_hit']) )
{
@@ -86,7 +86,7 @@ function ws_std_image_sql_filter( $params, $tbl_name='' )
}
if ( is_numeric($params['f_min_ratio']) )
{
$clauses[] = $tbl_name.'width/'.$tbl_name.'height>'.$params['f_min_ratio'];
$clauses[] = $tbl_name.'width/'.$tbl_name.'height>='.$params['f_min_ratio'];
}
if ( is_numeric($params['f_max_ratio']) )
{
@@ -1977,9 +1977,9 @@ function ws_images_addSimple($params, &$service)
if (isset($params['tags']) and !empty($params['tags']))
{
$tag_ids = array();
if (is_array($params[tags]))
if (is_array($params['tags']))
{
foreach ($params[tags] as $tag_name)
foreach ($params['tags'] as $tag_name)
{
$tag_id = tag_id_from_tag_name($tag_name);
array_push($tag_ids, $tag_id);

0 comments on commit c523eec

Please sign in to comment.