### Eclipse Workspace Patch 1.0
#P drupal 7
Index: modules/shortcut/shortcut.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.module,v
retrieving revision 1.24
diff -u -r1.24 shortcut.module
--- modules/shortcut/shortcut.module	6 Mar 2010 06:33:14 -0000	1.24
+++ modules/shortcut/shortcut.module	15 May 2010 15:30:15 -0000
@@ -622,10 +622,29 @@
 }
 
 /**
+ * Request that the shortcut add/remove button is hidden.
+ *
+ * This function is used to keep a static cache of whether the shortcut
+ * add/remove button should be hidden on the current page.
+ *
+ * @param $hide
+ *   Boolean whether the button should be hidden (optional).
+ * @return
+ *   TRUE if the button should be hidden, FALSE if not. Defaults to TRUE.
+ */
+function shortcut_hide_add_remove_button($hide = NULL) {
+  $hide_button = &drupal_static(__FUNCTION__, TRUE);
+  if ($hide !== NULL) {
+    $hide_button = ($hide);
+  }
+  return $hide_button;
+}
+
+/**
  * Implements hook_preprocess_page().
  */
 function shortcut_preprocess_page(&$variables) {
-  if (shortcut_set_edit_access()) {
+  if (shortcut_set_edit_access() && !shortcut_hide_add_remove_button()) {
     $link = $_GET['q'];
     $query_parameters = drupal_get_query_parameters();
     if (!empty($query_parameters)) {
@@ -682,6 +701,12 @@
     // current shortcuts in the toolbar drawer.
     $page['page_top']['toolbar']['#pre_render'][] = 'shortcut_toolbar_pre_render';
   }
+
+  if (isset($page['content']['system_main']['#type'], $page['content']['system_main']['#theme'])
+    && $page['content']['system_main']['#type'] == 'form' && $page['content']['system_main']['#theme'] == 'confirm_form') {
+    // If the current page is a confirm_form, hide the add/remove button.
+    shortcut_hide_add_remove_button(TRUE);
+  }
 }
 
 /**
