Fixed language sorting (again).
[squirrelmail.git] / src / options_display.php
index c4da9aa21382a3665d14e96e7d65d85402a606c6..5fd5c5ef2679df6d04829326da2e3e46162257e8 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * options_display.php
  *
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Displays all optinos about display preferences
@@ -35,8 +35,10 @@ function load_optpage_data_display() {
     /* Load the theme option. */
     $theme_values = array();
     foreach ($theme as $theme_key => $theme_attributes) {
-        $theme_values[$theme_attributes['PATH']] = $theme_attributes['NAME'];
+        $theme_values[$theme_attributes['NAME']] = $theme_attributes['PATH'];
     }
+    ksort($theme_values);
+    $theme_values = array_flip($theme_values);
     $optvals[SMOPT_GRP_GENERAL][] = array(
         'name'    => 'chosen_theme',
         'caption' => _("Theme"),
@@ -52,6 +54,7 @@ function load_optpage_data_display() {
             $language_values[$lang_key] = $lang_attributes['NAME'];
         }
     }
+    asort($language_values);
     $optvals[SMOPT_GRP_GENERAL][] = array(
         'name'    => 'language',
         'caption' => _("Language"),