Code

Fixed encoding problems
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Mar 2010 10:49:32 +0000 (10:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Mar 2010 10:49:32 +0000 (10:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16376 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_userFilter.inc
gosa-core/include/class_userFilterEditor.inc

index 50e9e58e4755d4ce8995264719c26a3a9f00d2f9..83b6c85cafa53702aa672837d1f8a9068c650169 100644 (file)
@@ -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']))){ 
index b3fddca9257c85e01a9cea09f8a7be1ab0b932b0..90eefe1c336bb4d51a1ebd4c908f3e9ff7d43272 100644 (file)
@@ -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;
       }