aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2014-09-11 10:41:54 +0000
committerplegall <plg@piwigo.org>2014-09-11 10:41:54 +0000
commit0ffdff9439969bc845b4060e0743e12e000fd9e4 (patch)
tree25c721062bae9ab1c441410b93fa100731583d67
parentec7492cc2cb7370237fdd9e5f56ac0819dceb777 (diff)
feature 3139: search photo by id
git-svn-id: http://piwigo.org/svn/trunk@29483 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions_search.inc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php
index 28682215e..4f971cacb 100644
--- a/include/functions_search.inc.php
+++ b/include/functions_search.inc.php
@@ -963,6 +963,9 @@ function qsearch_get_images(QExpression $expr, QResults $qsr)
case 'posted':
$clauses[] = $token->scope->get_sql('date_available', $token);
break;
+ case 'id':
+ $clauses[] = $token->scope->get_sql($scope_id, $token);
+ break;
default:
// allow plugins to have their own scope with columns added in db by themselves
$clauses = trigger_change('qsearch_get_images_sql_scopes', $clauses, $token, $expr);
@@ -1180,6 +1183,7 @@ function get_quick_search_results_no_cache($q, $options)
$scopes[] = new QNumericRangeScope('filesize', array());
$scopes[] = new QNumericRangeScope('hits', array('hit', 'visit', 'visits'));
$scopes[] = new QNumericRangeScope('score', array('rating'), true);
+ $scopes[] = new QNumericRangeScope('id', array());
$createdDateAliases = array('taken', 'shot');
$postedDateAliases = array('added');