=== modified file 'includes/common.inc'
--- includes/common.inc	2007-10-17 21:59:31 +0000
+++ includes/common.inc	2007-10-20 06:30:09 +0000
@@ -2836,7 +2836,7 @@ function drupal_common_themes() {
       'arguments' => array('link' => NULL, 'active' => FALSE),
     ),
     'menu_local_tasks' => array(
-      'arguments' => array(),
+      'arguments' => array('primary' => NULL, 'secondary' => NULL),
     ),
     // from form.inc
     'select' => array(

=== modified file 'includes/menu.inc'
--- includes/menu.inc	2007-10-17 19:42:02 +0000
+++ includes/menu.inc	2007-10-20 06:41:12 +0000
@@ -1261,18 +1261,28 @@ function menu_tab_root_path() {
   return menu_local_tasks(0, TRUE);
 }
 
+function menu_local_tasks_prepare($primary = NULL, $secondary = NULL) {
+  if (!isset($primary)) {
+    $primary = menu_primary_local_tasks();
+  }
+  if (!isset($secondary)) {
+    $secondary = menu_secondary_local_tasks();
+  }
+  return array($primary, $secondary);
+}
+
 /**
  * Returns the rendered local tasks. The default implementation renders them as tabs.
  *
  * @ingroup themeable
  */
-function theme_menu_local_tasks() {
+function theme_menu_local_tasks($primary = NULL, $secondary = NULL) {
   $output = '';
-
-  if ($primary = menu_primary_local_tasks()) {
+  list($primary, $secondary) = menu_local_tasks_prepare($primary, $secondary);
+  if ($primary) {
     $output .= "<ul class=\"tabs primary\">\n". $primary ."</ul>\n";
   }
-  if ($secondary = menu_secondary_local_tasks()) {
+  if ($secondary) {
     $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
   }
 

=== modified file 'themes/garland/template.php'
--- themes/garland/template.php	2007-10-11 09:51:28 +0000
+++ themes/garland/template.php	2007-10-20 06:42:52 +0000
@@ -67,8 +67,9 @@ function phptemplate_preprocess_page(&$v
  *
  * @ingroup themeable
  */
-function phptemplate_menu_local_tasks() {
-  return menu_primary_local_tasks();
+function phptemplate_menu_local_tasks($primary, $secondary) {
+  list($primary, $secondary) = menu_local_tasks_prepare($primary, $secondary);
+  return $primary;
 }
 
 function phptemplate_comment_submitted($comment) {

