[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaAssignServiceToHostForm: store escaped...

git at icinga.org git at icinga.org
Thu Feb 25 00:01:19 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: 4939b7d6c86009cd3cffa35e48df814771710f78
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=4939b7d6c86009cd3cffa35e48df814771710f78

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Feb 24 23:58:40 2016 +0100

IcingaAssignServiceToHostForm: store escaped...

...Icinga strings in filter expressions for now

---

 application/forms/IcingaAssignServiceToHostForm.php |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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



More information about the icinga-checkins mailing list