[icinga-checkins] icinga.org: icingaweb2/bugfix/js-close-container-8590: Fix that user dashboards are always deleted on add/update

git at icinga.org git at icinga.org
Mon Feb 22 13:38:12 CET 2016


Module: icingaweb2
Branch: bugfix/js-close-container-8590
Commit: b005df68a2880733d8b47df4ab2c4fcf1d9b0701
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=b005df68a2880733d8b47df4ab2c4fcf1d9b0701

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Wed Feb 17 10:17:23 2016 +0100

Fix that user dashboards are always deleted on add/update

fixes #11136

---

 library/Icinga/Legacy/DashboardConfig.php |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/library/Icinga/Legacy/DashboardConfig.php b/library/Icinga/Legacy/DashboardConfig.php
index 08b5646..54cd3b7 100644
--- a/library/Icinga/Legacy/DashboardConfig.php
+++ b/library/Icinga/Legacy/DashboardConfig.php
@@ -77,6 +77,9 @@ class DashboardConfig extends Config
     public function saveIni($filePath = null, $fileMode = 0660)
     {
         parent::saveIni($filePath, $fileMode);
+        if ($filePath === null) {
+            $filePath = $this->configFile;
+        }
         foreach (static::listConfigFilesForUser($this->user) as $file) {
             if ($file !== $filePath) {
                 @unlink($file);



More information about the icinga-checkins mailing list