mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-26 07:14:59 +02:00
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
This commit is contained in:
parent
1887780363
commit
ddcaaa7bcf
@ -295,9 +295,10 @@ class SyncPropertyForm extends DirectorObjectForm
|
|||||||
// TODO: allow those fields, but munge them (store ids)
|
// TODO: allow those fields, but munge them (store ids)
|
||||||
//if (preg_match('~_id$~', $prop)) continue;
|
//if (preg_match('~_id$~', $prop)) continue;
|
||||||
if (substr($prop, -3) === '_id') {
|
if (substr($prop, -3) === '_id') {
|
||||||
|
$short = substr($prop, 0, -3);
|
||||||
if ($dummy instanceof IcingaObject) {
|
if ($dummy instanceof IcingaObject) {
|
||||||
if ($dummy->hasRelation($prop)) {
|
if ($dummy->hasRelation($short)) {
|
||||||
$prop = substr($prop, 0, -3);
|
$prop = $short;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user