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 9e8bce892bc6230dff7c9cfb920f2d26198e3ca4..ec2886613d8eca88e1e40748360074484a6ce715 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -53,7 +53,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')) {