diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 942efbaa4c7fffe8d6c81293c2fbb2927c6dc2ab..437b9c1248c98e08400a652e64cb29e9847e6d10 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -243,7 +243,7 @@ Filter::addSupportedMatches('User Data', function() { foreach (UserForm::getInstance()->getFields() as $f) { if (!$f->hasData()) continue; - $matches['field.'.$f->get('id')] = $f->getLabel(); + $matches['field.'.$f->get('id')] = 'User / '.$f->getLabel(); } return $matches; }); @@ -327,7 +327,7 @@ Filter::addSupportedMatches('Ticket Data', function() { foreach (TicketForm::getInstance()->getFields() as $f) { if (!$f->hasData()) continue; - $matches['field.'.$f->get('id')] = $f->getLabel(); + $matches['field.'.$f->get('id')] = 'Ticket / '.$f->getLabel(); } return $matches; }); diff --git a/include/class.filter.php b/include/class.filter.php index 4c36541e6e262f097d6e7989d0ee9148d6760496..951832926e9a13150f6aa5d6387cafce06326b8f 100644 --- a/include/class.filter.php +++ b/include/class.filter.php @@ -318,12 +318,13 @@ class Filter { if ($this->getHelpTopic()) $ticket['topicId'] = $this->getHelpTopic(); } - /* static */ function getSupportedMatches() { + static function getSupportedMatches() { foreach (static::$match_types as $k=>&$v) { if (is_callable($v)) $v = $v(); } unset($v); + ksort(static::$match_types); return static::$match_types; } diff --git a/include/class.organization.php b/include/class.organization.php index d024507238db5c37420b814f8ab53370003c8e90..69924a6c385e8e905039e6f3ae5dded74087d92a 100644 --- a/include/class.organization.php +++ b/include/class.organization.php @@ -393,7 +393,7 @@ Filter::addSupportedMatches('Organization Data', function() { foreach (OrganizationForm::getInstance()->getFields() as $f) { if (!$f->hasData()) continue; - $matches['field.'.$f->get('id')] = $f->getLabel(); + $matches['field.'.$f->get('id')] = 'Organization / '.$f->getLabel(); } return $matches; });