From 2c8b16893cccb151f5acfe75416837c444487f51 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 17 Mar 2016 08:47:59 +0100 Subject: [PATCH] DirectorObjectForm: fix strange notifications ...like "The operty has been modified" --- library/Director/Web/Form/DirectorObjectForm.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php index f9b50647..e5ce25b2 100644 --- a/library/Director/Web/Form/DirectorObjectForm.php +++ b/library/Director/Web/Form/DirectorObjectForm.php @@ -655,7 +655,12 @@ abstract class DirectorObjectForm extends QuickForm protected function getObjectname() { if ($this->objectName === null) { - return substr(join('', array_slice(explode('\\', get_class($this)), -1)), 6, -4); + $className = substr(strrchr(get_class($this), '\\'), 1); + if (substr($className, 0, 6) === 'Icinga') { + return substr($className, 6, -4); + } else { + return substr($className, 0, -4); + } } return $this->objectName;