Search queries: removed case sensitivity

This commit is contained in:
Marcin Kurczewski 2013-11-21 22:22:13 +01:00
parent 6549237dda
commit c8fb9c20c6

View file

@ -133,7 +133,7 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder
protected static function filterTokenType($dbQuery, $val) protected static function filterTokenType($dbQuery, $val)
{ {
switch ($val) switch (strtolower($val))
{ {
case 'swf': case 'swf':
$type = PostType::Flash; $type = PostType::Flash;
@ -382,7 +382,7 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder
continue; continue;
} }
$key = substr($token, 0, $pos); $key = strtolower(substr($token, 0, $pos));
$val = substr($token, $pos + 1); $val = substr($token, $pos + 1);
$methodName = 'filterToken' . TextHelper::kebabCaseToCamelCase($key); $methodName = 'filterToken' . TextHelper::kebabCaseToCamelCase($key);
@ -408,6 +408,6 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder
} }
} }
self::order($dbQuery, $orderToken); self::order($dbQuery, strtolower($orderToken));
} }
} }