From c8fb9c20c6c7e83d13d68ea99a025b3fc71cecff Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Thu, 21 Nov 2013 22:22:13 +0100 Subject: [PATCH] Search queries: removed case sensitivity --- src/Models/Model_Post_QueryBuilder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Models/Model_Post_QueryBuilder.php b/src/Models/Model_Post_QueryBuilder.php index fddc2f33..8fa0212b 100644 --- a/src/Models/Model_Post_QueryBuilder.php +++ b/src/Models/Model_Post_QueryBuilder.php @@ -133,7 +133,7 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder protected static function filterTokenType($dbQuery, $val) { - switch ($val) + switch (strtolower($val)) { case 'swf': $type = PostType::Flash; @@ -382,7 +382,7 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder continue; } - $key = substr($token, 0, $pos); + $key = strtolower(substr($token, 0, $pos)); $val = substr($token, $pos + 1); $methodName = 'filterToken' . TextHelper::kebabCaseToCamelCase($key); @@ -408,6 +408,6 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder } } - self::order($dbQuery, $orderToken); + self::order($dbQuery, strtolower($orderToken)); } }