Index: trunk/include/functions.inc.php
===================================================================
--- trunk/include/functions.inc.php	(revision 18579)
+++ trunk/include/functions.inc.php	(revision 18629)
@@ -124,30 +124,4 @@
   $pos = strrpos( $filename, '.' );
   return ($pos===false) ? $filename : substr( $filename, 0, $pos);
-}
-
-/**
- * returns an array contening sub-directories, excluding ".svn"
- *
- * @param string $dir
- * @return array
- */
-function get_dirs($directory)
-{
-  $sub_dirs = array();
-  if ($opendir = opendir($directory))
-  {
-    while ($file = readdir($opendir))
-    {
-      if ($file != '.'
-          and $file != '..'
-          and is_dir($directory.'/'.$file)
-          and $file != '.svn')
-      {
-        array_push($sub_dirs, $file);
-      }
-    }
-    closedir($opendir);
-  }
-  return $sub_dirs;
 }
 
@@ -1275,4 +1249,5 @@
   $languages = array_unique($languages);
 
+  /*Note: target charset is always utf-8
   if ( empty($options['target_charset']) )
   {
@@ -1283,5 +1258,5 @@
     $target_charset = $options['target_charset'];
   }
-  $target_charset = strtolower($target_charset);
+  $target_charset = strtolower($target_charset);*/
   $source_file    = '';
   foreach ($languages as $language)
@@ -1310,4 +1285,5 @@
       if ( !isset($lang_info) ) $lang_info=array();
 
+      /* Note: target charset is always utf-8
       if ( 'utf-8'!=$target_charset)
       {
@@ -1334,8 +1310,8 @@
       }
       else
-      {
+      {*/
         $lang = array_merge( $lang, (array)$load_lang );
         $lang_info = array_merge( $lang_info, (array)$load_lang_info );
-      }
+      //}
       return true;
     }
@@ -1343,5 +1319,5 @@
     {
       $content = @file_get_contents($source_file);
-      $content = convert_charset($content, 'utf-8', $target_charset);
+      //Note: target charset is always utf-8 $content = convert_charset($content, 'utf-8', $target_charset);
       return $content;
     }
@@ -1605,8 +1581,7 @@
 
   $options = array();
+  $label = '';
   foreach (array_reverse($conf['available_permission_levels']) as $level)
   {
-    $label = null;
-
     if (0 == $level)
     {
@@ -1615,24 +1590,9 @@
     else
     {
-      $labels = array();
-      $sub_levels = array_reverse($conf['available_permission_levels']);
-      foreach ($sub_levels as $sub_level)
+      if (strlen($label))
       {
-        if ($sub_level == 0 or $sub_level < $level)
-        {
-          break;
-        }
-        array_push(
-          $labels,
-          l10n(
-            sprintf(
-              'Level %d',
-              $sub_level
-              )
-            )
-          );
+        $label .= ', ';
       }
-
-      $label = implode(', ', $labels);
+      $label .= l10n( sprintf('Level %d',$level) );
     }
     $options[$level] = $label;
Index: trunk/include/functions_user.inc.php
===================================================================
--- trunk/include/functions_user.inc.php	(revision 18579)
+++ trunk/include/functions_user.inc.php	(revision 18629)
@@ -288,6 +288,4 @@
   global $conf;
 
-  $userdata = array();
-
   // retrieve basic user data
   $query = '
@@ -348,22 +346,19 @@
 
   // then merge basic + additional user data
-  $row = array_merge($row, $user_infos_row);
-
-  foreach ($row as $key => $value)
-  {
-    if (!is_numeric($key))
-    {
-      // If the field is true or false, the variable is transformed into a
-      // boolean value.
-      if ($value == 'true' or $value == 'false')
-      {
-        $userdata[$key] = get_boolean($value);
-      }
-      else
-      {
-        $userdata[$key] = $value;
-      }
-    }
-  }
+  $userdata = array_merge($row, $user_infos_row);
+
+  foreach ($userdata as &$value)
+  {
+      // If the field is true or false, the variable is transformed into a boolean value.
+      if ($value == 'true')
+      {
+        $value = true;
+      }
+      elseif ($value == 'false')
+      {
+        $value = false;
+      }
+  }
+  unset($value);
 
   if ($use_cache)
@@ -644,5 +639,5 @@
   if ($ref_level <> 0)
   {
-    array_push($list_cat_id, $cat_id);
+    $list_cat_id[] = $cat_id;
   }
 }
@@ -663,10 +658,10 @@
     if ($level > $ref_level)
     {
-      array_push($list_cat_id, $id);
+      $list_cat_id[] = $id;
     }
     else
     {
       compute_branch_cat_data($cats, $list_cat_id, $level, $ref_level);
-      array_push($list_cat_id, $id);
+      $list_cat_id[] = $id;
     }
     $ref_level = $level;
@@ -830,16 +825,15 @@
   if (is_array($cache['default_user']) and $convert_str)
   {
-    $default_user = array();
-    foreach ($cache['default_user'] as $name => $value)
-    {
-      // If the field is true or false, the variable is transformed into a
-      // boolean value.
-      if ($value == 'true' or $value == 'false')
-      {
-        $default_user[$name] = get_boolean($value);
-      }
-      else
-      {
-        $default_user[$name] = $value;
+    $default_user = $cache['default_user'];
+    foreach ($default_user as &$value)
+    {
+      // If the field is true or false, the variable is transformed into a boolean value.
+      if ($value == 'true')
+      {
+        $value = true;
+      }
+      elseif ($value == 'false')
+      {
+        $value = false;
       }
     }
@@ -985,5 +979,5 @@
           ));
 
-      array_push($inserts, $insert);
+      $inserts[] = $insert;
     }
 
