Module: check_mk
Branch: master
Commit: 227e1665ad385609454fb9231f9c17d45df1b68a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=227e1665ad3856…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Mar 3 16:52:26 2015 +0100
#2054 FIX Sidebar snapin "Tree of folders": fixed exception when using localized
default value
The sidebar snapin "Tree of folders" had an encoding exception in the following
setting
<ul>
<li>The user never changed the default values for this snapin</li>
<li>The interface language was different from the default language</li>
<li>The translated text in the snapin contained umlauts like ä, ö, ü</li>
</ul>
This has been fixed.
---
.werks/2054 | 18 ++++++++++++++++++
ChangeLog | 1 +
web/plugins/sidebar/wato.py | 2 ++
3 files changed, 21 insertions(+)
diff --git a/.werks/2054 b/.werks/2054
new file mode 100644
index 0000000..f21b402
--- /dev/null
+++ b/.werks/2054
@@ -0,0 +1,18 @@
+Title: Sidebar snapin "Tree of folders": fixed exception when using localized
default value
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1425397160
+
+The sidebar snapin "Tree of folders" had an encoding exception in the following
setting
+
+<ul>
+<li>The user never changed the default values for this snapin</li>
+<li>The interface language was different from the default language</li>
+<li>The translated text in the snapin contained umlauts like ä, ö, ü</li>
+</ul>
+
+This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 99bf3bc..c17ee8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -270,6 +270,7 @@
* 2008 FIX: Users created during basic auth login get the role assigned configured in
"default user profile"...
* 2011 FIX: "Service Group" view sorts/groups the services now correctly by
host
* 2024 FIX: Views: Fixed problem when filtering views by strings containing
umlauts...
+ * 2054 FIX: Sidebar snapin "Tree of folders": fixed exception when using
localized default value...
WATO:
* 1760 Added search form to manual checks page
diff --git a/web/plugins/sidebar/wato.py b/web/plugins/sidebar/wato.py
index cb3adfc..67ecc45 100644
--- a/web/plugins/sidebar/wato.py
+++ b/web/plugins/sidebar/wato.py
@@ -227,6 +227,8 @@ def render_wato_foldertree():
# Render link target selection
#
selected_topic, selected_target = config.load_user_file("foldertree",
(_('Hosts'), 'allhosts'))
+ if type(selected_topic) == unicode:
+ selected_topic = selected_topic.encode("utf-8")
views.load_views()
dashboard.load_dashboards()