From 36c410ad4a4a14bd090383869a5b8069e93379ac Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Mar 2010 10:49:32 +0000 Subject: [PATCH] Fixed encoding problems git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16376 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_userFilter.inc | 2 +- gosa-core/include/class_userFilterEditor.inc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gosa-core/include/class_userFilter.inc b/gosa-core/include/class_userFilter.inc index 50e9e58e4..83b6c85ca 100644 --- a/gosa-core/include/class_userFilter.inc +++ b/gosa-core/include/class_userFilter.inc @@ -216,7 +216,7 @@ class userFilter extends plugin ($attrs['dn'] == $ui->dn || in_array('share', $tmp['flags'])); // Convert filter encoding - $tmp['filter'] = utf8_encode($tmp['filter']); + $tmp['filter'] = mb_convert_encoding($tmp['filter'], 'UTF-8'); // Add filter if it matches the category list if($visible && (count($category) == 0 || array_intersect($category, $tmp['categories']))){ diff --git a/gosa-core/include/class_userFilterEditor.inc b/gosa-core/include/class_userFilterEditor.inc index b3fddca92..90eefe1c3 100644 --- a/gosa-core/include/class_userFilterEditor.inc +++ b/gosa-core/include/class_userFilterEditor.inc @@ -64,11 +64,11 @@ class userFilterEditor extends plugin { plugin::execute(); $smarty = get_smarty(); - $smarty->assign('name', htmlentities($this->name)); - $smarty->assign('filter', htmlentities($this->filter)); + $smarty->assign('name', htmlentities($this->name,ENT_COMPAT,'UTF-8')); + $smarty->assign('filter', htmlentities($this->filter,ENT_COMPAT,'UTF-8')); $smarty->assign('share', $this->share); $smarty->assign('enable', $this->enabled); - $smarty->assign('description', htmlentities($this->description)); + $smarty->assign('description', htmlentities($this->description,ENT_COMPAT,'UTF-8')); $smarty->assign('selectedCategories', $this->selectedCategories); $smarty->assign('availableCategories', $this->availableCategories); return($smarty->fetch(get_template_path('userFilterEditor.tpl', FALSE))); @@ -95,7 +95,7 @@ class userFilterEditor extends plugin if(get_magic_quotes_gpc()){ $f = stripcslashes($f); } - $f = utf8_decode($f); + $f = mb_convert_encoding($_POST['filter'], 'UTF-8'); $this->filter = $f; } -- 2.30.2