You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -760,7 +771,12 @@ public static function selectChats(
760
771
}
761
772
762
773
if (! is_null($text)) {
763
-
$where[] = '(LOWER('.TB_CHAT . '.`title`) LIKE :text OR LOWER(' . TB_USER . '.`first_name`) LIKE :text OR LOWER(' . TB_USER . '.`last_name`) LIKE :text OR LOWER(' . TB_USER . '.`username`) LIKE :text)';
774
+
if ($select_users) {
775
+
$where[] = '(LOWER('.TB_CHAT . '.`title`) LIKE :text OR LOWER(' . TB_USER . '.`first_name`) LIKE :text OR LOWER(' . TB_USER . '.`last_name`) LIKE :text OR LOWER(' . TB_USER . '.`username`) LIKE :text)';
776
+
} else {
777
+
$where[] = 'LOWER('.TB_CHAT . '.`title`) LIKE :text';
778
+
}
779
+
764
780
$tokens[':text'] = '%'.strtolower($text).'%';
765
781
}
766
782
@@ -788,3 +804,4 @@ public static function selectChats(
0 commit comments