aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2013-03-23 09:33:47 +0000
committerrvelices <rv-github@modusoptimus.com>2013-03-23 09:33:47 +0000
commitb8b697c2dd3efeb72a206e6eaaa6cf46a52722a1 (patch)
treedc13130d2fdb8aba653c0ec8af77997ebfbac97f
parentf984751375fa7ddd9a4ffeeed609727d534136aa (diff)
Merge -r21799 from trunk to branch 2.5 : fix unquoted string + better image sql filter
git-svn-id: http://piwigo.org/svn/branches/2.5@21800 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/ws_functions.inc.php10
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);