Prettified, some. More work to do.
[squirrelmail.git] / src / options_display.php
index 22a074dc552d0104fbb6be1a520126fbf753829b..d5c30fdce19a437f14d0e946a1c3eb4164c04b4b 100644 (file)
@@ -49,21 +49,25 @@ function load_optpage_data_display() {
     );
  
     $css_values = array( 'none' => _("Default" ) );
-       $handle=opendir('../themes/css/');
-       while ($file = readdir($handle) ) {
-           if ( substr( $file, -4 ) == '.css' ) {
-               $css_values[$file] = substr( $file, 0, strlen( $file ) - 4 );
+    $handle=opendir('../themes/css/');
+    while ($file = readdir($handle) ) {
+        if ( substr( $file, -4 ) == '.css' ) {
+            $css_values[$file] = substr( $file, 0, strlen( $file ) - 4 );
         }
-       }       
-       closedir($handle);
+    }
+    closedir($handle);
     
-    $optvals[SMOPT_GRP_GENERAL][] = array(
-        'name'    => 'custom_css',
-        'caption' => _("Custom Stylesheet"),
-        'type'    => SMOPT_TYPE_STRLIST,
-        'refresh' => SMOPT_REFRESH_ALL,
-        'posvals' => $css_values
-    );
+    if ( count( $css_values > 1 ) ) {
+    
+        $optvals[SMOPT_GRP_GENERAL][] = array(
+            'name'    => 'custom_css',
+            'caption' => _("Custom Stylesheet"),
+            'type'    => SMOPT_TYPE_STRLIST,
+            'refresh' => SMOPT_REFRESH_ALL,
+            'posvals' => $css_values
+        );
+    
+    }
     
     $language_values = array();
     foreach ($languages as $lang_key => $lang_attributes) {