? .DS_Store
? files
? fix_garland_and_menu_theme.patch
? sites/all/.DS_Store
? sites/all/modules
? sites/all/views
? sites/default/settings.php
? themes/garland/.DS_Store
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.682
diff -u -p -r1.682 common.inc
--- includes/common.inc	30 Aug 2007 15:53:39 -0000	1.682
+++ includes/common.inc	2 Sep 2007 21:59:22 -0000
@@ -2754,7 +2754,7 @@ function drupal_common_themes() {
       'arguments' => array('link' => NULL, 'active' => FALSE),
     ),
     'menu_local_tasks' => array(
-      'arguments' => array(),
+      'arguments' => array('primary' => FALSE, 'secondary' => FALSE),
     ),
     // from form.inc
     'select' => array(
Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.202
diff -u -p -r1.202 menu.inc
--- includes/menu.inc	29 Aug 2007 20:46:18 -0000	1.202
+++ includes/menu.inc	2 Sep 2007 21:59:22 -0000
@@ -1202,16 +1202,21 @@ function menu_tab_root_path() {
 
 /**
  * Returns the rendered local tasks. The default implementation renders them as tabs.
+ * 
+ * @param primary
+ *   The primary local tasks.
+ * @param secondary
+ *   The secondary local tasks
  *
  * @ingroup themeable
  */
-function theme_menu_local_tasks() {
+function theme_menu_local_tasks($primary = FALSE, $secondary = FALSE) {
   $output = '';
 
-  if ($primary = menu_primary_local_tasks()) {
+  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";
   }
 
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.379
diff -u -p -r1.379 theme.inc
--- includes/theme.inc	1 Sep 2007 11:32:07 -0000	1.379
+++ includes/theme.inc	2 Sep 2007 21:59:22 -0000
@@ -1711,7 +1711,7 @@ function template_preprocess_page(&$vari
   $variables['css']               = drupal_add_css();
   $variables['styles']            = drupal_get_css();
   $variables['scripts']           = drupal_get_js();
-  $variables['tabs']              = theme('menu_local_tasks');
+  $variables['tabs']              = theme('menu_local_tasks', menu_primary_local_tasks(), menu_secondary_local_tasks());
   $variables['title']             = drupal_get_title();
   // Closure should be filled last.
   $variables['closure']           = theme('closure');
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.68
diff -u -p -r1.68 chameleon.theme
--- themes/chameleon/chameleon.theme	3 Jul 2007 18:48:41 -0000	1.68
+++ themes/chameleon/chameleon.theme	2 Sep 2007 21:59:23 -0000
@@ -76,7 +76,7 @@ function chameleon_page($content, $show_
     $output .= "<h2>$title</h2>";
   }
 
-  if ($tabs = theme('menu_local_tasks')) {
+  if ($tabs = theme('menu_local_tasks', menu_primary_local_tasks())) {
     $output .= $tabs;
   }
 
Index: themes/garland/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/page.tpl.php,v
retrieving revision 1.11
diff -u -p -r1.11 page.tpl.php
--- themes/garland/page.tpl.php	1 Sep 2007 05:42:48 -0000	1.11
+++ themes/garland/page.tpl.php	2 Sep 2007 21:59:23 -0000
@@ -12,7 +12,7 @@
     <link type="text/css" rel="stylesheet" media="all" href="<?php print base_path() . path_to_theme() ?>/fix-ie.css" />
     <![endif]-->
   </head>
-  <body<?php print phptemplate_body_class($left, $right); ?>>
+  <body<?php if ($class = theme('body_class', $left, $right)): ?> class="<?php print $class; ?>"<?php endif; ?>>
 
 <!-- Layout -->
   <div id="header-region" class="clear-block"><?php print $header; ?></div>
Index: themes/garland/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
retrieving revision 1.13
diff -u -p -r1.13 template.php
--- themes/garland/template.php	1 Sep 2007 05:42:48 -0000	1.13
+++ themes/garland/template.php	2 Sep 2007 21:59:23 -0000
@@ -1,12 +1,25 @@
 <?php
-// $Id: template.php,v 1.13 2007/09/01 05:42:48 dries Exp $
+// $Id$
+
+function garland_theme() {
+  return array(
+    'menu_secondary_local_tasks' => array(
+      'arguments' => array('tabs' => NULL),
+    ),
+    'body_class' => array(
+      'arguments' => array('left' => NULL, 'right' => NULL),
+    ),
+  );
+}
 
 /**
  * Sets the body-tag class attribute.
  *
  * Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
  */
-function phptemplate_body_class($left, $right) {
+function garland_body_class($left, $right) {
+  $class = '';
+  
   if ($left != '' && $right != '') {
     $class = 'sidebars';
   }
@@ -19,9 +32,7 @@ function phptemplate_body_class($left, $
     }
   }
 
-  if (isset($class)) {
-    print ' class="'. $class .'"';
-  }
+  return $class;
 }
 
 /**
@@ -40,7 +51,7 @@ function phptemplate_breadcrumb($breadcr
 /**
  * Allow themable wrapping of all comments.
  */
-function phptemplate_comment_wrapper($content, $node) {
+function garland_comment_wrapper($content, $node) {
   if (!$content || $node->type == 'forum') {
     return '<div id="comments">'. $content .'</div>';
   }
@@ -50,13 +61,11 @@ function phptemplate_comment_wrapper($co
 }
 
 /**
- * Override or insert PHPTemplate variables into the templates.
+ * Add secondary local tasks and color.module alterations
  */
-function phptemplate_preprocess_page(&$vars) {
+function garland_preprocess_page(&$vars) {
   if ($secondary = menu_secondary_local_tasks()) {
-    $output = '<span class="clear"></span>';
-    $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
-    $vars['tabs2'] = $output;
+    $vars['tabs2'] = theme('menu_secondary_local_tasks', $secondary);
   }
 
   // Hook into color.module
@@ -65,23 +74,27 @@ function phptemplate_preprocess_page(&$v
   }
 }
 
+function garland_menu_secondary_local_tasks($tabs) {
+  if ($tabs) {
+    $output = '<span class="clear"></span>';
+    $output .= "<ul class=\"tabs secondary\">\n". $tabs ."</ul>\n";
+  }
+  return $output;
+}
+
 /**
  * Returns the rendered local tasks. The default implementation renders
  * them as tabs.
  *
  * @ingroup themeable
  */
-function phptemplate_menu_local_tasks() {
-  $output = '';
-
-  if ($primary = menu_primary_local_tasks()) {
-    $output .= "<ul class=\"tabs primary\">\n". $primary ."</ul>\n";
+function garland_menu_local_tasks($tabs) {
+  if ($tabs) {
+    return "<ul class=\"tabs primary\">\n". $tabs ."</ul>\n";
   }
-
-  return $output;
 }
 
-function phptemplate_comment_submitted($comment) {
+function garland_comment_submitted($comment) {
   return t('!datetime — !username',
     array(
       '!username' => theme('username', $comment),
@@ -89,7 +102,7 @@ function phptemplate_comment_submitted($
     ));
 }
 
-function phptemplate_node_submitted($node) {
+function garland_node_submitted($node) {
   return t('!datetime — !username',
     array(
       '!username' => theme('username', $node),
