DirectorObjectForm: adjust choice loading to fit

...new class names
This commit is contained in:
Thomas Gelf 2017-06-22 22:40:20 +02:00
parent 9845cddcb4
commit d7422fa55c

View File

@ -1043,7 +1043,7 @@ abstract class DirectorObjectForm extends QuickForm
protected function addChoices($type) protected function addChoices($type)
{ {
$connection = $this->getDb(); $connection = $this->getDb();
$choiceType = $type . 'TemplateChoice'; $choiceType = 'TemplateChoice' . ucfirst($type);
$choices = IcingaObject::loadAllByType($choiceType, $connection); $choices = IcingaObject::loadAllByType($choiceType, $connection);
foreach ($choices as $choice) { foreach ($choices as $choice) {
$this->addChoiceElement($choice); $this->addChoiceElement($choice);