diff options
author | rvelices <rv-github@modusoptimus.com> | 2013-03-23 09:32:25 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2013-03-23 09:32:25 +0000 |
commit | c523eec16366d39a14823ab6935aca2254834ef8 (patch) | |
tree | 0e0556d582278b85584859cb3579e088275e3732 /include/ws_functions.inc.php | |
parent | 0804d945651cba6dddae1150499cfe075c44c9ea (diff) |
fix unquoted string + better image sql filter
git-svn-id: http://piwigo.org/svn/trunk@21799 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/ws_functions.inc.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php index 7a27b8ba0..c0a0be246 100644 --- a/include/ws_functions.inc.php +++ b/include/ws_functions.inc.php @@ -54,7 +54,7 @@ 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']) ) { @@ -62,7 +62,7 @@ function ws_std_image_sql_filter( $params, $tbl_name='' ) } 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 @@ SELECT * 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); |