Skip to content
Snippets Groups Projects
Commit 1aaa3139 authored by Peter Rotich's avatar Peter Rotich
Browse files

Require three or more chars to do lookup

Due to MySQL FULLTEXT min-word-lenn requirements (which various from
installation to installation), fulltext-based searches require at least two
characters.
parent a4b057a0
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ class OrgsAjaxAPI extends AjaxController {
$q = $_REQUEST['q'];
$limit = isset($_REQUEST['limit']) ? (int) $_REQUEST['limit']:25;
if (strlen($q) < 2)
if (strlen($q) < 3)
return $this->encode(array());
$orgs = Organization::objects()
......
......@@ -48,7 +48,7 @@ class TicketsAjaxAPI extends AjaxController {
$q = $_REQUEST['q'];
if (strlen($q) < 2)
if (strlen($q) < 3)
return $this->encode(array());
global $ost;
......
......@@ -34,7 +34,7 @@ class UsersAjaxAPI extends AjaxController {
$users=array();
$emails=array();
if (strlen($q) < 2)
if (strlen($q) < 3)
return $this->encode(array());
if (!$type || !strcasecmp($type, 'remote')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment