Index: modules/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system.module,v
retrieving revision 1.234
diff -u -r1.234 system.module
--- modules/system.module	13 Sep 2005 19:12:19 -0000	1.234
+++ modules/system.module	16 Sep 2005 14:26:28 -0000
@@ -67,11 +67,17 @@
       'access' => TRUE,
       'type' => MENU_CALLBACK);
 
+    // Admin control panel
+    $items[] = array('path' => 'admin/controlpanel',
+      'callback' => 'system_admin_controlpanel',
+      'access' => TRUE,
+      'type' => MENU_CALLBACK);
+      
     $access = user_access('administer site configuration');
 
     $items[] = array('path' => 'admin', 'title' => t('administer'),
       'access' => user_access('access administration pages'),
-      'callback' => 'watchdog_overview',
+      'callback' => '_system_adminpage',
       'weight' => 9);
 
     // Themes:
@@ -167,6 +173,10 @@
   }
 }
 
+function _system_adminpage () {
+    drupal_goto($path = variable_get('site_adminpage', 'admin/controlpanel'), $query = NULL, $fragment = NULL);
+}
+
 function _system_zonelist() {
   $timestamp = time();
   $zonelist = array(-11, -10, -9.5, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 5, 5.5, 5.75, 6, 6.5, 7, 8, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14);
@@ -187,6 +197,7 @@
   $group .= form_textarea(t('Footer message'), 'site_footer', variable_get('site_footer', ''), 60, 5, t('This text will be displayed at the bottom of each page.  Useful for adding a copyright notice to your pages.'));
   $group .= form_textfield(t('Anonymous user'), 'anonymous', variable_get('anonymous', 'Anonymous'), 60, 70, t('The name used to indicate anonymous users.'));
   $group .= form_textfield(t('Default front page'), 'site_frontpage', variable_get('site_frontpage', 'node'), 60, 70, t('The home page displays content from this relative URL.  If you are not using clean URLs, specify the part after "?q=".  If unsure, specify "node".'));
+  $group .= form_textfield(t('Default admin front page'), 'site_adminpage', variable_get('site_adminpage', 'admin/controlpanel'), 60, 70, t('The admin home page displays content from this relative URL.  If you are not using clean URLs, specify the part after "?q=".  If unsure, specify "admin/controlpanel".'));
 
   // We check for clean URL support using an image on the client side.
   $group .= form_radios(t('Clean URLs'), 'clean_url', variable_get('clean_url', 0), array(t('Disabled'), t('Enabled')), t('This option makes Drupal emit clean URLs (i.e. without <code>?q=</code> in the URL). You\'ll need <code>ModRewrite</code> support for this to work. See the <code>.htaccess</code> file in Drupal\'s top-level directory for more information.'));
@@ -425,6 +436,47 @@
 }
 
 /**
+ * Menu callback: admin control panel.
+ */
+function system_admin_controlpanel() {
+  $content = '';
+  $menu = menu_get_menu();
+  $menuvisible = $menu['visible'];
+  
+  // find the key to the admin menu item
+  foreach ($menuvisible as $key => $row) {
+    foreach($row as $cell) {
+      if (!empty($cell) && ($cell == 'admin')) {
+        $pid = $key;
+      }
+    }
+  } 
+  
+  $content .= '<h1 class=page-title>Control Panel</h1>';
+  $content .= '<ul style="overflow: auto; list-style-type: none; margin: 0pt; padding: 0pt">';
+
+  if (isset($menuvisible[$pid]) && $menuvisible[$pid]['children']) {
+    foreach ($menuvisible[$pid]['children'] as $mid) {
+      $content .= '<li style="float: left; margin: 1em">';
+      $content .= '<a style="text-decoration: none;" href='.$menuvisible[$mid]['path'].'>';
+      if (file_exists('misc/'. substr($menuvisible[$mid]['path'],6). '.png')) {
+        $src = 'misc/'. substr($menuvisible[$mid]['path'],6). '.png';
+      } else {
+        $src = 'misc/control_panel_default.png';
+      }
+      $content .= '<div style="text-align: center;">';
+      $content .= '<img width=48 height=48 src='.$src.'>';
+      $content .= '<br>'.$menuvisible[$mid]['title'];
+      $content .= '</div>';
+      $content .= '</a>';
+      $content .= '</li>';
+    }
+  }
+  $content .= '</ul>';
+  return $content;
+}
+
+/**
  * Returns an array of files objects of the given type from both the
  * site-wide directory (i.e. modules/) and site-specific directory
  * (i.e. sites/somesite/modules/).  The returned array will be keyed
@@ -862,6 +914,4 @@
 
   return form($form, 'post', null, array('enctype' => 'multipart/form-data'));
 
-}
-
-
+}
\ No newline at end of file
