### Eclipse Workspace Patch 1.0
#P zen
Index: zen-internals/template.block-editing.inc
===================================================================
RCS file: /cvs/drupal/contributions/themes/zen/zen-internals/Attic/template.block-editing.inc,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 template.block-editing.inc
--- zen-internals/template.block-editing.inc	14 Sep 2010 18:50:00 -0000	1.2.2.1
+++ zen-internals/template.block-editing.inc	24 Oct 2010 07:56:23 -0000
@@ -74,15 +74,24 @@
   // Display 'edit menu' for Menu block blocks.
   elseif ($block->module == 'menu_block' && user_access('administer menu')) {
     list($menu_name, ) = split(':', variable_get("menu_block_{$block->delta}_parent", 'navigation:0'));
-    $vars['edit_links_array']['block-edit-menu'] = l('<span>' . t('edit menu') . '</span>', 'admin/build/menu-customize/' . $menu_name,
-      array(
-        'attributes' => array(
-          'title' => t('edit the menu that defines this block'),
-          'class' => 'block-edit-menu',
-        ),
-        'query' => drupal_get_destination(),
-        'html' => TRUE,
-      )
-    );
+
+    // If the menu block is set to use the active menu, get the name of the
+    // active menu.
+    if ($menu_name == MENU_TREE__CURRENT_PAGE_MENU) {
+      $menu_name = menu_block_get_active_menu();
+    }
+
+    if ($menu_name) {
+      $vars['edit_links_array']['block-edit-menu'] = l('<span>' . t('edit menu') . '</span>', 'admin/build/menu-customize/' . $menu_name,
+        array(
+          'attributes' => array(
+            'title' => t('edit the menu that defines this block'),
+            'class' => 'block-edit-menu',
+          ),
+          'query' => drupal_get_destination(),
+          'html' => TRUE,
+        )
+      );
+    }
   }
 }
