--- themesettingsapi.admin.inc	Mon Dec 03 21:09:26 2007
+++ themesettingsapi.admin_new.inc	Tue May 27 17:25:32 2008
@@ -83,10 +83,2 @@
 
-        // Since we are adding more settings, make logo and favicon collapsed
-        if (isset($form['logo'])) {
-          $form['logo']['#collapsed'] = TRUE;
-        }
-        if (isset($form['favicon'])) {
-          $form['favicon']['#collapsed'] = TRUE;
-        }
-
         // Get the theme settings
@@ -102,2 +94,4 @@
           if (!empty($group)) {
+            $collapse_logo = TRUE;
+            
             $form['engine_specific'] = array('#type' => 'fieldset', '#title' => t('Theme-engine-specific settings'), '#description' => t('These settings only exist for all the templates and styles based on the %engine theme engine.', array('%engine' => $themes[$key]->prefix)));
@@ -115,4 +109,15 @@
           if (!empty($group)) {
+            $collapse_logo = TRUE;
+            
             $form['theme_specific'] = array('#type' => 'fieldset', '#title' => t('Theme-specific settings'), '#description' => t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => $key)));
             $form['theme_specific'] = array_merge($form['theme_specific'], $group);
+          }
+        }
+        if ($collapse_logo) {
+          // Since we added more settings, make logo and favicon collapsed
+          if (isset($form['logo'])) {
+            $form['logo']['#collapsed'] = TRUE;
+          }
+          if (isset($form['favicon'])) {
+            $form['favicon']['#collapsed'] = TRUE;
           }
