[icinga-checkins] icinga.org: icingaweb2/master: Cookie icingaweb2-tzo: use `-' as separator

git at icinga.org git at icinga.org
Thu Feb 25 13:24:00 CET 2016


Module: icingaweb2
Branch: master
Commit: af18334e3e8725743756f6973988d1422460d0ec
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=af18334e3e8725743756f6973988d1422460d0ec

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Thu Feb 25 13:21:34 2016 +0100

Cookie icingaweb2-tzo: use `-' as separator

fixes #11126

---

 library/Icinga/Util/TimezoneDetect.php |    2 +-
 public/js/icinga/timezone.js           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/Icinga/Util/TimezoneDetect.php b/library/Icinga/Util/TimezoneDetect.php
index dfd8d55..f5e033a 100644
--- a/library/Icinga/Util/TimezoneDetect.php
+++ b/library/Icinga/Util/TimezoneDetect.php
@@ -53,7 +53,7 @@ class TimezoneDetect
         }
 
         if (Platform::isCli() === false && array_key_exists(self::$cookieName, $_COOKIE)) {
-            list($offset, $dst) = explode(',', $_COOKIE[self::$cookieName]);
+            list($offset, $dst) = explode('-', $_COOKIE[self::$cookieName]);
             $timezoneName = timezone_name_from_abbr('', (int)$offset, (int)$dst);
 
             self::$success = (bool)$timezoneName;
diff --git a/public/js/icinga/timezone.js b/public/js/icinga/timezone.js
index 1395671..c018c5d 100644
--- a/public/js/icinga/timezone.js
+++ b/public/js/icinga/timezone.js
@@ -73,7 +73,7 @@
                 return;
             }
 
-            this.writeCookie(this.cookieName, timezoneOffset + ',' + Number(dst), 1);
+            this.writeCookie(this.cookieName, timezoneOffset + '-' + Number(dst), 1);
         },
 
         /**



More information about the icinga-checkins mailing list