Index: themes/garland/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
retrieving revision 1.41
diff -u -r1.41 template.php
--- themes/garland/template.php	30 Jul 2010 02:47:28 -0000	1.41
+++ themes/garland/template.php	7 Sep 2010 13:49:30 -0000
@@ -111,6 +111,10 @@
   $slogan_text = $vars['site_slogan'];
   $site_name_text = $vars['site_name'];
   $vars['site_name_and_slogan'] = $site_name_text . ' ' . $slogan_text;
+
+  // Set variables for local tasks.
+  $vars['primary_local_tasks'] = menu_primary_local_tasks();
+  $vars['secondary_local_tasks'] = menu_secondary_local_tasks();
 }
 
 /**
@@ -139,11 +143,3 @@
     $vars['classes_array'][] = 'clearfix';
   }
 }
-
-/**
- * Returns the rendered local tasks. The default implementation renders
- * them as tabs. Overridden to split the secondary tasks.
- */
-function garland_menu_local_tasks() {
-  return menu_primary_local_tasks();
-}
Index: themes/garland/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/page.tpl.php,v
retrieving revision 1.45
diff -u -r1.45 page.tpl.php
--- themes/garland/page.tpl.php	3 Sep 2010 19:41:01 -0000	1.45
+++ themes/garland/page.tpl.php	7 Sep 2010 13:49:30 -0000
@@ -41,14 +41,18 @@
           <?php print $breadcrumb; ?>
           <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
           <a id="main-content"></a>
-          <?php if ($tabs): ?><div id="tabs-wrapper" class="clearfix"><?php endif; ?>
+          <?php if ($primary_local_tasks): ?><div id="tabs-wrapper" class="clearfix"><?php endif; ?>
           <?php print render($title_prefix); ?>
           <?php if ($title): ?>
             <h1<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h1>
           <?php endif; ?>
           <?php print render($title_suffix); ?>
-          <?php if ($tabs): ?><ul class="tabs primary"><?php print render($tabs) ?></ul></div><?php endif; ?>
-          <?php if ($tabs2): ?><ul class="tabs secondary"><?php print render($tabs2) ?></ul><?php endif; ?>
+          <?php if ($primary_local_tasks): ?>
+            <ul class="tabs primary"><?php print render($primary_local_tasks); ?></ul></div>
+          <?php endif; ?>
+          <?php if ($secondary_local_tasks): ?>
+            <ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul>
+          <?php endif; ?>
           <?php print $messages; ?>
           <?php print render($page['help']); ?>
           <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
