diff --git a/include/ajax.orgs.php b/include/ajax.orgs.php index ccdd3597cd1ce52a0a84c1cef46471b23318077c..9c2a2b207c11ba72e8b6c7fa259670d0b4b6a0d7 100644 --- a/include/ajax.orgs.php +++ b/include/ajax.orgs.php @@ -32,7 +32,7 @@ class OrgsAjaxAPI extends AjaxController { $q = $_REQUEST['q']; $limit = isset($_REQUEST['limit']) ? (int) $_REQUEST['limit']:25; - if (strlen($q) < 3) + if (strlen(Format::searchable($q)) < 3) return $this->encode(array()); $orgs = Organization::objects() diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index 3a157a511e6ba92c666e25738401ab4320db74f3..17799f2121a323170cf8d0f953567f039657db24 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -51,7 +51,7 @@ class TicketsAjaxAPI extends AjaxController { $q = $_REQUEST['q']; - if (strlen($q) < 3) + if (strlen(Format::searchable($q)) < 3) return $this->encode(array()); global $ost; diff --git a/include/ajax.users.php b/include/ajax.users.php index 07fc02f7917db0501cd0b949face1bd3042ddfc2..c4e32cc9155e963911511ee081f9d3bd39712fcf 100644 --- a/include/ajax.users.php +++ b/include/ajax.users.php @@ -39,7 +39,7 @@ class UsersAjaxAPI extends AjaxController { $emails=array(); $matches = array(); - if (strlen($q) < 3) + if (strlen(Format::searchable($q)) < 3) return $this->encode(array()); if (!$type || !strcasecmp($type, 'remote')) {