Index: sections.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sections/sections.module,v
retrieving revision 1.3
diff -u -F^f -r1.3 sections.module
--- sections.module	22 Dec 2004 10:55:31 -0000	1.3
+++ sections.module	2 Apr 2005 06:58:50 -0000
@@ -140,6 +140,7 @@ function sections_perm() {
  * Implementation of hook_menu().
  */
 function sections_menu($may_cache) {
+  global $custom_theme;
   $items = array();
   
   /*
@@ -179,6 +180,9 @@ function sections_menu($may_cache) {
         'type' => MENU_CALLBACK);
     }
   }
+  else if ($section = sections_in_section()) {
+    $custom_theme = $section->template;
+  }
 
   return $items;
 }
@@ -206,29 +210,13 @@ function _section_load($section_name) {
  * Loads the options for the themes select form element 
  */
 function _sections_theme_select() {
-  $themes = system_theme_data('themes');
-  ksort($themes);
-  
-  foreach ($themes as $key => $info) {
-    if($info->status) {
-      $options[$key] = $info->shortname;
-    }
-  }
-  return $options;
-}
+  $themes = list_themes();
+  $options = array();
 
-/**
- * implementation of hook_init()
- */
-function sections_init() {
-  global $custom_theme;
-  
-  if($section = sections_in_section()) {
-    $custom_theme = $section->template;
-  }
-  else {
-    $custom_theme = variable_get('theme_default', 'bluemarine');
+  foreach (array_keys($themes) as $name) {
+    $options[$name] = $name;
   }
+  return $options;
 }
 
 /**
@@ -269,4 +257,4 @@ function sections_in_section($section = 
   //nothing found, return NULL
   return FALSE;
 }
-?>
\ No newline at end of file
+?>
