mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
git-svn-id: http://piwigo.org/svn/trunk@29804 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -384,9 +384,9 @@ class QNumericRangeScope extends QSearchScope
|
||||
function get_sql($field, $token)
|
||||
{
|
||||
$clauses = array();
|
||||
if ($token->scope_data['range'][0]!=='')
|
||||
if ($token->scope_data['range'][0]!='')
|
||||
$clauses[] = $field.' >'.($token->scope_data['strict'][0]?'':'=').$token->scope_data['range'][0].' ';
|
||||
if ($token->scope_data['range'][1]!=='')
|
||||
if ($token->scope_data['range'][1]!='')
|
||||
$clauses[] = $field.' <'.($token->scope_data['strict'][1]?'':'=').$token->scope_data['range'][1].' ';
|
||||
|
||||
if (empty($clauses))
|
||||
@@ -458,9 +458,9 @@ class QDateRangeScope extends QSearchScope
|
||||
function get_sql($field, $token)
|
||||
{
|
||||
$clauses = array();
|
||||
if ($token->scope_data[0]!=='')
|
||||
if ($token->scope_data[0]!='')
|
||||
$clauses[] = $field.' >= \'' . $token->scope_data[0].'\'';
|
||||
if ($token->scope_data[1]!=='')
|
||||
if ($token->scope_data[1]!='')
|
||||
$clauses[] = $field.' <= \'' . $token->scope_data[1].'\'';
|
||||
|
||||
if (empty($clauses))
|
||||
@@ -1081,7 +1081,7 @@ function qsearch_eval(QMultiToken $expr, QResults $qsr, &$qualifies, &$ignored_t
|
||||
{
|
||||
$crt_ids = $qsr->iids[$crt->idx] = array_unique( array_merge($qsr->images_iids[$crt->idx], $qsr->tag_iids[$crt->idx]) );
|
||||
$crt_qualifies = count($crt_ids)>0 || count($qsr->tag_ids[$crt->idx])>0;
|
||||
$crt_ignored_terms = $crt_qualifies ? array() : array($crt->term);
|
||||
$crt_ignored_terms = $crt_qualifies ? array() : array((string)$crt);
|
||||
}
|
||||
else
|
||||
$crt_ids = qsearch_eval($crt, $qsr, $crt_qualifies, $crt_ignored_terms);
|
||||
@@ -1172,6 +1172,8 @@ function get_quick_search_results_no_cache($q, $options)
|
||||
'qs' => array('q'=>$q),
|
||||
);
|
||||
|
||||
$q = trigger_change('qsearch_pre', $q);
|
||||
|
||||
$scopes = array();
|
||||
$scopes[] = new QSearchScope('tag', array('tags'));
|
||||
$scopes[] = new QSearchScope('photo', array('photos'));
|
||||
@@ -1247,6 +1249,8 @@ function get_quick_search_results_no_cache($q, $options)
|
||||
$debug[] = 'before perms '.count($ids);
|
||||
|
||||
$search_results['qs']['matching_tags'] = $qsr->all_tags;
|
||||
$search_results = trigger_change('qsearch_results', $search_results, $expression, $qsr);
|
||||
|
||||
global $template;
|
||||
|
||||
if (empty($ids))
|
||||
|
||||
Reference in New Issue
Block a user