From ddcaaa7bcf9d14a19233718937c04877aa08873e Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 21 Apr 2017 15:03:43 +0200 Subject: [PATCH] SyncPropertyForm: re-add related fields e6e51dc broke this, related fields like 'host' or 'zone' have no longer been offered. This did not affect existing Sync Rule configurations fixes #903 --- application/forms/SyncPropertyForm.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/forms/SyncPropertyForm.php b/application/forms/SyncPropertyForm.php index 463d0975..49b4d1b0 100644 --- a/application/forms/SyncPropertyForm.php +++ b/application/forms/SyncPropertyForm.php @@ -295,9 +295,10 @@ class SyncPropertyForm extends DirectorObjectForm // TODO: allow those fields, but munge them (store ids) //if (preg_match('~_id$~', $prop)) continue; if (substr($prop, -3) === '_id') { + $short = substr($prop, 0, -3); if ($dummy instanceof IcingaObject) { - if ($dummy->hasRelation($prop)) { - $prop = substr($prop, 0, -3); + if ($dummy->hasRelation($short)) { + $prop = $short; } else { continue; }