IcingaAssignServiceToHostForm: store escaped...

...Icinga strings in filter expressions for now
This commit is contained in:
Thomas Gelf 2016-02-24 23:58:40 +01:00
parent 518ff61b3f
commit 4939b7d6c8
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
namespace Icinga\Module\Director\Forms; namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\IcingaConfig\IcingaConfigHelper as c;
use Icinga\Module\Director\Objects\IcingaObject; use Icinga\Module\Director\Objects\IcingaObject;
use Icinga\Module\Director\Objects\IcingaHost; use Icinga\Module\Director\Objects\IcingaHost;
use Icinga\Module\Director\Web\Form\QuickForm; use Icinga\Module\Director\Web\Form\QuickForm;
@ -155,9 +156,9 @@ class IcingaAssignServiceToHostForm extends QuickForm
$this->db->insert('icinga_service_assignment', array( $this->db->insert('icinga_service_assignment', array(
'service_id' => $this->getValue('service_id'), 'service_id' => $this->getValue('service_id'),
'filter_string' => sprintf( 'filter_string' => sprintf(
'%s=%s', 'host.%s=%s',
$this->getValue('host_property'), $this->getValue('host_property'),
$this->getValue('filter_expression') c::renderString($this->getValue('filter_expression'))
) )
)); ));
break; break;