? CristalX4Drupal.patch
Index: page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/CristalX4Drupal/page.tpl.php,v
retrieving revision 1.5.4.1
diff -u -r1.5.4.1 page.tpl.php
--- page.tpl.php	30 Aug 2008 13:04:59 -0000	1.5.4.1
+++ page.tpl.php	1 Sep 2008 22:23:48 -0000
@@ -92,9 +92,9 @@
 
 <?php if ($title): print '<h2 class="main-title'. ($tabs ? ' with-tabs' : '') .'">'. $title .'</h2>'; endif; ?>
 
-<?php if ($tabs): print $tabs; endif; ?>
+<?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul>'; endif; ?>
 
-<?php if (isset($tabs2)): print $tabs2; endif; ?>
+<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
 
 
 <div class="inner-content">
Index: template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/CristalX4Drupal/template.php,v
retrieving revision 1.2
diff -u -r1.2 template.php
--- template.php	3 Nov 2007 08:53:01 -0000	1.2
+++ template.php	1 Sep 2008 22:23:48 -0000
@@ -17,12 +17,9 @@
 /**
  * Allow themable wrapping of all comments.
  */
-function phptemplate_comment_wrapper($content, $type = null) {
-  static $node_type;
-  if (isset($type)) $node_type = $type;
-
-  if (!$content || $node_type == 'forum') {
-    return '<div id="comments">'. $content . '</div>';
+function phptemplate_comment_wrapper($content, $node) {
+  if (!$content || $node->type == 'forum') {
+    return '<div id="comments">'. $content .'</div>';
   }
   else {
     return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
@@ -32,38 +29,18 @@
 /**
  * Override or insert PHPTemplate variables into the templates.
  */
-function _phptemplate_variables($hook, $vars) {
-  if ($hook == 'page') {
-
-    if ($secondary = menu_secondary_local_tasks()) {
-      $output = '<span class="clear"></span>';
-      $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
-      $vars['tabs2'] = $output;
-    }
-
-    // Hook into color.module
-    if (module_exists('color')) {
-      _color_page_alter($vars);
-    }
-    return $vars;
-  }
-  return array();
+function phptemplate_preprocess_page(&$vars) {
+  $vars['tabs2'] = menu_secondary_local_tasks();
 }
 
 /**
  * Returns the rendered local tasks. The default implementation renders
- * them as tabs.
+ * them as tabs. Overridden to split the secondary tasks.
  *
  * @ingroup themeable
  */
 function phptemplate_menu_local_tasks() {
-  $output = '';
-
-  if ($primary = menu_primary_local_tasks()) {
-    $output .= "<ul class=\"tabs primary\">\n". $primary ."</ul>\n";
-  }
-
-  return $output;
+  return menu_primary_local_tasks();
 }
 
 /**
