Index: misc/maintenance.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/misc/maintenance.tpl.php,v
retrieving revision 1.5
diff -u -p -r1.5 maintenance.tpl.php
--- misc/maintenance.tpl.php	1 Sep 2007 05:42:48 -0000	1.5
+++ misc/maintenance.tpl.php	6 Oct 2007 15:19:11 -0000
@@ -40,8 +40,9 @@
           <?php if ($title): print '<h2>'. $title .'</h2>'; endif; ?>
 
           <?php if ($messages): print $messages; endif; ?>
-          <?php print $content ?>
-          <span class="clear"></span>
+          <div class="clear-block">
+            <?php print $content ?>
+          </div>
 
           <!--partial-->
 
Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.280
diff -u -p -r1.280 block.module
--- modules/block/block.module	5 Oct 2007 12:57:20 -0000	1.280
+++ modules/block/block.module	5 Oct 2007 20:03:29 -0000
@@ -82,7 +82,7 @@ function block_help($path, $arg) {
 </ul>
 ");
       $output .= '<h3>'. t('Module blocks') .'</h3>';
-      $output .= '<p>'. t('Some modules generate blocks that become available when the modules are enabled. These blocks can be administered via the <a href="@admin-block">blocks administration page</a>.</p>', array('@admin-block' => url('admin/build/block'))) .'</p>';
+      $output .= '<p>'. t('Some modules generate blocks that become available when the modules are enabled. These blocks can be administered via the <a href="@admin-block">blocks administration page</a>.', array('@admin-block' => url('admin/build/block'))) .'</p>';
       $output .= '<h3>'. t('Administrator defined blocks') .'</h3>';
       $output .= '<p>'. t('Administrators can also define custom blocks. These blocks consist of a title, a description, and a body which can be as long as you wish. Block content can be in any of the input formats supported for other content.') .'</p>';
       $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@block">Block page</a>.', array('@block' => 'http://drupal.org/handbook/modules/block/')) .'</p>';
Index: modules/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.24
diff -u -p -r1.24 color.module
--- modules/color/color.module	6 Aug 2007 12:54:39 -0000	1.24
+++ modules/color/color.module	5 Oct 2007 20:13:30 -0000
@@ -172,7 +172,7 @@ function theme_color_scheme_form($form) 
   // Preview
   $output .= drupal_render($form);
   $output .= '<h2>'. t('Preview') .'</h2>';
-  $output .= '<div id="preview"><div id="text"><h2>Lorem ipsum dolor</h2><p>Sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud <a href="#">exercitation ullamco</a> laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div><div id="img" style="background-image: url('. base_path() . $path . $info['preview_image'] .')" alt=""></div></div>';
+  $output .= '<div id="preview"><div id="text"><h2>Lorem ipsum dolor</h2><p>Sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud <a href="#">exercitation ullamco</a> laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div><div id="img" style="background-image: url('. base_path() . $path . $info['preview_image'] .')"></div></div>';
 
   // Close wrapper
   $output .= '</div>';
Index: modules/help/help.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/help/help.admin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 help.admin.inc
--- modules/help/help.admin.inc	19 Aug 2007 09:27:24 -0000	1.1
+++ modules/help/help.admin.inc	5 Oct 2007 20:45:00 -0000
@@ -70,11 +70,12 @@ function help_links_as_list() {
   sort($modules);
 
   // Output pretty four-column list
-  $break = ceil(count($modules) / 4);
+  $count = count($modules);
+  $break = ceil($count / 4);
   $output = '<div class="clear-block"><div class="help-items"><ul>';
   foreach ($modules as $i => $module) {
     $output .= '<li>'. l($module_info[$module]->info['name'], 'admin/help/'. $module) .'</li>';
-    if (($i + 1) % $break == 0) {
+    if (($i + 1) % $break == 0 && ($i + 1) != $count) {
       $output .= '</ul></div><div class="help-items'. ($i + 1 == $break * 3 ? ' help-items-last' : '') .'"><ul>';
     }
   }
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.890
diff -u -p -r1.890 node.module
--- modules/node/node.module	3 Oct 2007 17:35:22 -0000	1.890
+++ modules/node/node.module	5 Oct 2007 18:48:22 -0000
@@ -58,12 +58,12 @@ function node_help($path, $arg) {
     case 'node/%/edit':
       $node = node_load($arg[1]);
       $type = node_get_types('type', $node->type);
-      return '<p>'. (isset($type->help) ? filter_xss_admin($type->help) : '') .'</p>';
+      return (!empty($type->help) ? '<p>'. filter_xss_admin($type->help) .'</p>' : '');
   }
 
   if ($arg[0] == 'node' && $arg[1] == 'add' && $arg[2]) {
     $type = node_get_types('type', str_replace('-', '_', $arg[2]));
-    return '<p>'. (isset($type->help) ? filter_xss_admin($type->help) : '') .'</p>';
+    return (!empty($type->help) ? '<p>'. filter_xss_admin($type->help) .'</p>' : '');
   }
 }
 
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.220
diff -u -p -r1.220 profile.module
--- modules/profile/profile.module	5 Oct 2007 13:26:53 -0000	1.220
+++ modules/profile/profile.module	5 Oct 2007 20:45:08 -0000
@@ -288,7 +288,7 @@ Unless you know what you are doing, it i
   if ($type == 'selection') {
     $form['fields']['options'] = array('#type' => 'textarea',
       '#title' => t('Selection options'),
-      '#default_value' => $edit['options'],
+      '#default_value' => isset($edit['options']) ? $edit['options'] : '',
       '#description' => t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'),
     );
   }
Index: modules/search/search.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.admin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 search.admin.inc
--- modules/search/search.admin.inc	5 Sep 2007 08:39:57 -0000	1.1
+++ modules/search/search.admin.inc	5 Oct 2007 20:13:38 -0000
@@ -58,7 +58,7 @@ function search_admin_settings() {
   $form['indexing_throttle']['search_cron_limit'] = array('#type' => 'select', '#title' => t('Items to index per cron run'), '#default_value' => variable_get('search_cron_limit', 100), '#options' => $items, '#description' => t('The maximum amount of items that will be indexed in one cron run. Set this number lower if your cron is timing out or if PHP is running out of memory.'));
   // Indexing settings:
   $form['indexing_settings'] = array('#type' => 'fieldset', '#title' => t('Indexing settings'));
-  $form['indexing_settings']['info'] = array('#value' => '<em>'. t('<p>Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.</p><p>The default settings should be appropriate for the majority of sites.</p>') .'</em>');
+  $form['indexing_settings']['info'] = array('#value' => t('<p><em>Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.</em></p><p><em>The default settings should be appropriate for the majority of sites.</em></p>'));
   $form['indexing_settings']['minimum_word_size'] = array('#type' => 'textfield', '#title' => t('Minimum word length to index'), '#default_value' => variable_get('minimum_word_size', 3), '#size' => 5, '#maxlength' => 3, '#description' => t('The number of characters a word has to be to be indexed. A lower setting means better search result ranking, but also a larger database. Each search query must contain at least one keyword that is this size (or longer).'));
   $form['indexing_settings']['overlap_cjk'] = array('#type' => 'checkbox', '#title' => t('Simple CJK handling'), '#default_value' => variable_get('overlap_cjk', TRUE), '#description' => t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.'));
 
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.537
diff -u -p -r1.537 system.module
--- modules/system/system.module	5 Oct 2007 14:50:25 -0000	1.537
+++ modules/system/system.module	5 Oct 2007 20:13:45 -0000
@@ -1164,7 +1164,7 @@ function system_actions_manage() {
   }
 
   if ($actions_map) {
-    $output .= '<p>'. drupal_get_form('system_actions_manage_form', $options) .'</p>';
+    $output .= drupal_get_form('system_actions_manage_form', $options);
   }
 
   return $output;
Index: modules/trigger/trigger.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v
retrieving revision 1.2
diff -u -p -r1.2 trigger.module
--- modules/trigger/trigger.module	26 Sep 2007 18:19:22 -0000	1.2
+++ modules/trigger/trigger.module	5 Oct 2007 20:45:15 -0000
@@ -333,7 +333,12 @@ function theme_trigger_display($element)
     }
   }
 
-  $output = theme('table', $header, $rows) . drupal_render($element);
+  if (count($rows)) {
+    $output = theme('table', $header, $rows) . drupal_render($element);
+  }
+  else {
+    $output = drupal_render($element);
+  }
   return $output;
 }
 
Index: themes/garland/node.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/node.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 node.tpl.php
--- themes/garland/node.tpl.php	7 Aug 2007 08:39:36 -0000	1.4
+++ themes/garland/node.tpl.php	6 Oct 2007 15:15:24 -0000
@@ -13,11 +13,11 @@
     <span class="submitted"><?php print $submitted; ?></span>
   <?php endif; ?>
 
-  <div class="content">
+  <div class="content clear-block">
     <?php print $content ?>
   </div>
 
-  <div class="clear-block clear">
+  <div class="clear-block">
     <div class="meta">
     <?php if ($taxonomy): ?>
       <div class="terms"><?php print $terms ?></div>
Index: themes/garland/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/page.tpl.php,v
retrieving revision 1.13
diff -u -p -r1.13 page.tpl.php
--- themes/garland/page.tpl.php	5 Oct 2007 13:09:17 -0000	1.13
+++ themes/garland/page.tpl.php	6 Oct 2007 15:22:58 -0000
@@ -62,19 +62,17 @@
       <?php endif; ?>
 
       <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
-          <?php if ($breadcrumb): print $breadcrumb; endif; ?>
+          <?php print $breadcrumb; ?>
           <?php if ($mission): print '<div id="mission">'. $mission .'</div>'; endif; ?>
-
           <?php if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'; endif; ?>
           <?php if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; ?>
-          <?php if ($tabs): print $tabs .'</div>'; endif; ?>
-
-          <?php if (isset($tabs2)): print $tabs2; endif; ?>
-
-          <?php if ($help): print $help; endif; ?>
+          <?php if ($tabs): print '<ul class="tabs primary">'. $tabs .'</ul></div>'; endif; ?>
+          <?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
+          <?php print $help; ?>
           <?php if ($show_messages && $messages): print $messages; endif; ?>
-          <?php print $content ?>
-          <div class="clear"></div>
+          <div class="clear-block">
+            <?php print $content ?>
+          </div>
           <?php print $feed_icons ?>
           <div id="footer"><?php print $footer_message . $footer ?></div>
       </div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
Index: themes/garland/style-rtl.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/style-rtl.css,v
retrieving revision 1.2
diff -u -p -r1.2 style-rtl.css
--- themes/garland/style-rtl.css	2 Oct 2007 16:03:17 -0000	1.2
+++ themes/garland/style-rtl.css	6 Oct 2007 15:16:05 -0000
@@ -5,32 +5,6 @@ html {
 }
 
 /**
- * Markup free clearing
- * Details: http://www.positioniseverything.net/easyclearing.html
- */
-.clear-block:after {
-  content: ".";
-  display: block;
-  height: 0;
-  clear: both;
-  visibility: hidden;
-}
-
-.clear-block {
-  display: inline-block;
-}
-
-/* Hides from IE-mac \*/
-* html .clear-block {
-  height: 1%;
-}
-
-.clear-block {
-  display: block;
-}
-/* End hide from IE-mac */
-
-/**
  * Generic elements
  */
 body {
Index: themes/garland/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/style.css,v
retrieving revision 1.26
diff -u -p -r1.26 style.css
--- themes/garland/style.css	5 Oct 2007 13:09:17 -0000	1.26
+++ themes/garland/style.css	6 Oct 2007 15:15:56 -0000
@@ -971,14 +971,6 @@ tr.selected td a:link, tr.selected td a:
 /**
  * CSS support
  */
-div.clear {
-  display: block;
-  clear: both;
-  height: 1px;
-  line-height: 0px;
-  font-size: 0px;
-  margin-bottom: -1px;
-}
 
 /*******************************************************************
  * Color Module: Don't touch                                       *
Index: themes/garland/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
retrieving revision 1.15
diff -u -p -r1.15 template.php
--- themes/garland/template.php	2 Oct 2007 16:03:17 -0000	1.15
+++ themes/garland/template.php	6 Oct 2007 15:16:13 -0000
@@ -53,11 +53,7 @@ function phptemplate_comment_wrapper($co
  * Override or insert PHPTemplate variables into the templates.
  */
 function phptemplate_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'] = menu_secondary_local_tasks();
 
   // Hook into color.module
   if (module_exists('color')) {
@@ -67,18 +63,12 @@ function phptemplate_preprocess_page(&$v
 
 /**
  * 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();
 }
 
 function phptemplate_comment_submitted($comment) {
