Index: civicspace.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/zadministration/civicspace.inc,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 civicspace.inc
--- civicspace.inc	8 Apr 2006 16:09:30 -0000	1.6.2.3
+++ civicspace.inc	11 Apr 2006 04:27:54 -0000
@@ -54,9 +54,10 @@
         'description' => 'Turn on and off applications (modules)',
         'class' => 'dashboard-admin',
       ),
-       'admin/settings' => array(
+      'sadmin/modules' => array(
         'title' => 'configure modules',
         'description' => "Configure my site's application (module) settings",
+        'callback'    => '_administration_sub_dashboard_page',
         'class' => 'dashboard-admin',
       ),
       'sadmin/style/no-link1' => array(
@@ -78,8 +79,6 @@
     ),
   );
 
-
-
   $config['section']['sadmin/content'] = array(
     'title'       => t('content'),
     'description' => t('Manage web pages (content)'),
@@ -324,9 +323,57 @@
     'sadmin/statistics',
   );
 
+  // webchick: move module settings
+  move_modules($config);
+
   return $config;
 }
 
+function move_modules($config) {
+
+  // Get a list of paths already covered by the $config array
+  $config_paths = array();
+  foreach ($config['section'] as $section_path => $section) {
+    if (is_array($section['items'])) {
+       foreach ($section['items'] as $path => $info) {
+         $config_paths[] = $path;
+       }
+    }
+  }
+
+  // Get the current menu
+  $menu = menu_get_menu();
+
+  // Array to store new paths for 
+  $new_paths = array();
+
+  // Loop through each menu item, checking for admin/<module> or 
+  // admin/settings/<module>
+  foreach ($menu['items'] as $item) {
+    $path = $item['path'];
+
+    // Check for a path like 'admin/something'
+    if (substr($path, 0, 6) == 'admin/' && $path != 'admin/settings') {
+
+      // Does this path already exist in $config? If so, skip
+      if (in_array($path, $config_paths)) {
+        continue;
+      }
+
+      // What is the final part of the path?
+      $target = substr($path, strrpos($path, '/') + 1);
+
+      // This bunch of stuff checks for whether:
+      // 1. The path starts with 'admin/settings/' and there are exactly 2 '/'s in the path 
+      // 2. Or, there is only one '/' in the path
+      if ((substr($path, 0, 15) == 'admin/settings/' && substr_count($path, '/') == 2) 
+       || (substr_count($path, '/') == 1)) {
+       _administration_reparent_menu_item($path, "sadmin/modules/$target");
+      }
+    }
+  }
+}
+
 function theme_cs_administration_menu_panel($path) {
   static $old_class;
   // Just a copy of the standard one, but uses 2 columns.
