Changeset 31032


Ignore:
Timestamp:
Mar 12, 2015, 8:56:33 PM (9 years ago)
Author:
rvelices
Message:

bug 3209: quick search add author: syntax

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_search.inc.php

    r29804 r31032  
    939939        $clauses[] = $file_like;
    940940        break;
     941      case 'author':
     942        if ( strlen($token->term) )
     943          $clauses = array_merge($clauses, qsearch_get_text_token_search_sql($token, array('author')));
     944        elseif ($token->modifier & QST_WILDCARD)
     945          $clauses[] = 'author IS NOT NULL';
     946        else
     947          $clauses[] = 'author IS NULL';
     948        break;
    941949      case 'width':
    942950      case 'height':
     
    11791187  $scopes[] = new QSearchScope('photo', array('photos'));
    11801188  $scopes[] = new QSearchScope('file', array('filename'));
     1189  $scopes[] = new QSearchScope('author', array(), true);
    11811190  $scopes[] = new QNumericRangeScope('width', array());
    11821191  $scopes[] = new QNumericRangeScope('height', array());
  • trunk/language/en_UK/help/quick_search.html

    r29485 r31032  
    6969
    7070<tr>
     71<td><q>author:</q>
     72</td>
     73<td>Searches by author.<br>
     74<q>author:John</q></td>
     75</tr>
     76
     77<tr>
    7178<td><q>created:</q><br>
    7279<q>taken:</q>
Note: See TracChangeset for help on using the changeset viewer.