summaryrefslogtreecommitdiff
path: root/app/Core/Lexer.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-28 20:47:39 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-28 20:47:39 -0400
commit2e7e7031804b09a04c83896535b31acb12138960 (patch)
treeafc617dc3679c464b7cb7e8ec6ff96c3bf1cdfb5 /app/Core/Lexer.php
parent7af5a923b047f612c02af2fe39a09beb45792f3a (diff)
Add status attribute for advanced search
Diffstat (limited to 'app/Core/Lexer.php')
-rw-r--r--app/Core/Lexer.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Core/Lexer.php b/app/Core/Lexer.php
index a81965c5..34d85704 100644
--- a/app/Core/Lexer.php
+++ b/app/Core/Lexer.php
@@ -28,6 +28,7 @@ class Lexer
"/^(assignee:)/" => 'T_ASSIGNEE',
"/^(color:)/" => 'T_COLOR',
"/^(due:)/" => 'T_DUE',
+ "/^(status:)/" => 'T_STATUS',
"/^(title:)/" => 'T_TITLE',
"/^(\s+)/" => 'T_WHITESPACE',
'/^([<=>]{0,2}[0-9]{4}-[0-9]{2}-[0-9]{2})/' => 'T_DATE',
@@ -114,10 +115,11 @@ class Lexer
break;
+ case 'T_STATUS':
case 'T_DUE':
$next = next($tokens);
- if ($next !== false && $next['token'] === 'T_DATE') {
+ if ($next !== false && ($next['token'] === 'T_DATE' || $next['token'] === 'T_STRING')) {
$map[$token['token']] = $next['match'];
}