Skip to content

Commit

Permalink
feature 3139: search photo by id
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@29483 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Sep 11, 2014
1 parent ec7492c commit 0ffdff9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/functions_search.inc.php
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 0ffdff9

Please sign in to comment.