Index: controlpanel.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/controlpanel/controlpanel.module,v
retrieving revision 1.16
diff -u -r1.16 controlpanel.module
--- controlpanel.module	8 Nov 2005 15:04:02 -0000	1.16
+++ controlpanel.module	2 Jan 2006 23:11:45 -0000
@@ -109,7 +109,11 @@
     foreach ($menu_visible[$pid]['children'] as $mid) {
       $content .= '<div class="control-panel-item control-panel-icon-size-' . variable_get('controlpanel_icon_size' . $block, '48x48') . '">';
       $content .= '<a href=' . url($menu_visible[$mid]['path']) . '>';
-      $file_name = $image_directory . '/' . str_replace('/', '_', $menu_visible[$mid]['path']) . '.png'; 
+      $working_path = $menu_visible[$mid]['path'];
+      if (is_numeric(substr($working_path, strrpos($working_path, "/") + 1))) {
+        $working_path = substr($working_path, 0, strrpos($working_path, "/"));
+      }  
+      $file_name = $image_directory . '/' . str_replace('/', '_', $working_path) . '.png'; 
       if (file_exists($file_name)) {
         $src = $file_name;
       } else {
