--- modules/block/block.admin.inc	Sat Jun 27 13:48:58 2009
+++ modules/block/block.admin.inc	Mon Jun 29 22:40:28 2009
@@ -87,6 +87,7 @@
   }
   // Do not allow disabling the main system content block.
   unset($form['system_main']['region']['#options'][BLOCK_REGION_NONE]);
+  unset($form['system_secondary_tabs']['region']['#options'][BLOCK_REGION_NONE]);
 
   $form['submit'] = array(
     '#type' => 'submit',

--- modules/block/block.module	Sat Jun 27 12:10:06 2009
+++ modules/block/block.module	Tue Jun 30 19:20:09 2009
@@ -274,7 +274,7 @@
       $build[$key] = $block->content;
       unset($block->content);
       $build[$key] += array(
-        '#theme_wrapper' => 'block',
+        '#theme_wrapper' => ($key != 'system_page_title' ? 'block' : ''),
         '#block' => $block,
         '#weight' => ++$weight,
       );

--- modules/system/system.module	Sun Jun 28 14:52:58 2009
+++ modules/system/system.module	Wed Jul 01 17:18:07 2009
@@ -966,6 +966,24 @@
      // Cached elsewhere.
     'cache' => BLOCK_NO_CACHE,
   );
+  
+  $blocks['page_title'] = array(
+    'info' => t('Page title'),
+    'cache' => BLOCK_NO_CACHE,
+  );
+  $blocks['primary_tabs'] = array(
+    'info' => t('Primary tabs'),
+    'cache' => BLOCK_NO_CACHE,
+  );
+  $blocks['secondary_tabs'] = array(
+    'info' => t('Secondary tabs'),
+    'cache' => BLOCK_NO_CACHE,
+  );
+  $blocks['messages'] = array(
+    'info' => t('Messages'),
+	   'cache' => BLOCK_NO_CACHE,
+  );
+  
   $blocks['powered-by'] = array(
     'info' => t('Powered by Drupal'),
     'weight' => '10',
@@ -1038,6 +1056,53 @@
       $block['subject'] = NULL;
       $block['content'] = drupal_set_page_content();
       return $block;
+	case 'page_title':
+	  
+	  global $theme_key;
+      $result = db_select('block', 'b')
+        ->fields('b')
+        ->condition('b.theme', $theme_key)
+        ->condition('b.module', 'system')
+        ->condition('b.delta', 'primary_tabs')
+        ->condition('b.status', 1)
+        ->addTag('block_load')
+        ->execute()->fetchObject();
+
+		$page_title = drupal_get_title();
+		$block['subject'] = NULL;
+
+	  if (!$result) {
+	    $tabs_content = menu_primary_local_tasks();
+      if ($page_title || $tabs_content) {
+        $block['content'] = '<div id="tabs-wrapper" class="clearfix">' .
+          ($page_title ? t('<h1 class="with-tabs">!title</h1>', array('!title' => $page_title)) : '') . 
+          ($tabs_content ? '<ul class="tabs primary">'.$tabs_content.'</ul>' : '') . '</div>';
+      }
+	  }
+	  else if ($page_title) {
+        $block['content'] = t('<h1>!title</h1>', array('!title' => drupal_get_title()));
+      }
+	  return $block;
+	case 'primary_tabs':
+	  if (!variable_get('drupal_title_with_tabs', 0)) {
+	    $tabs_content = menu_primary_local_tasks();
+	    if ($tabs_content) {
+	      $block['subject'] = NULL;
+	      $block['content'] = '<ul class="tabs primary">' . $tabs_content . '</ul>';
+	    }
+	  }
+	  return $block;
+	case 'secondary_tabs':
+	  $tabs_content = menu_secondary_local_tasks();
+	  if ($tabs_content) {
+	    $block['subject'] = NULL;
+	    $block['content'] = '<ul class="tabs secondary">' . $tabs_content . '</ul>';
+	  }
+	  return $block;
+    case 'messages':
+      $block['subject'] = NULL;
+      $block['content'] = theme('status_messages');
+      return $block;
     case 'powered-by':
       $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
       $block['subject'] = NULL;
@@ -1356,6 +1421,7 @@
       'regions' => array(
         'left' => 'Left sidebar',
         'right' => 'Right sidebar',
+        'title' => 'Title',
         'content' => 'Content',
         'header' => 'Header',
         'footer' => 'Footer',

--- modules/system/page.tpl.php	Thu Jun 18 23:19:02 2009
+++ modules/system/page.tpl.php	Wed Jul 01 17:15:33 2009
@@ -156,14 +156,11 @@
       <div id="breadcrumb"><?php print $breadcrumb; ?></div>
     <?php endif; ?>
 
-    <?php print $messages; ?>
-
     <div id="main-wrapper"><div id="main" class="clearfix">
 
       <div id="content" class="column"><div class="section">
         <?php if ($highlight): ?><div id="highlight"><?php print $highlight; ?></div><?php endif; ?>
-        <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
-        <?php if ($tabs): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
+        <?php print $title; ?>
         <?php print $help; ?>
         <div id="content-area" class="region">
           <?php print $content; ?>

--- themes/garland/page.tpl.php	Thu May 28 18:44:08 2009
+++ themes/garland/page.tpl.php	Wed Jul 01 16:51:06 2009
@@ -46,11 +46,7 @@
       <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
           <?php print $breadcrumb; ?>
           <?php if ($highlight): ?><div id="highlight"><?php print $highlight ?></div><?php endif; ?>
-          <?php if ($tabs): ?><div id="tabs-wrapper" class="clearfix"><?php endif; ?>
-          <?php if ($title): ?><h2<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h2><?php endif; ?>
-          <?php if ($tabs): ?><ul class="tabs primary"><?php print $tabs ?></ul></div><?php endif; ?>
-          <?php if ($tabs2): ?><ul class="tabs secondary"><?php print $tabs2 ?></ul><?php endif; ?>
-          <?php if ($show_messages && $messages): print $messages; endif; ?>
+          <?php print $title; ?>
           <?php print $help; ?>
           <div class="clearfix">
             <?php print $content ?>

--- themes/garland/style.css	Sat Jun 20 09:40:36 2009
+++ themes/garland/style.css	Tue Jun 30 19:22:53 2009
@@ -617,7 +617,7 @@
   margin: -0.2em -26px 1em;
   padding: 0 26px 0.6em;
 }
-h2.with-tabs {
+h1.with-tabs {
   float: left; /* LTR */
   margin: 0 2em 0 0; /* LTR */
   padding: 0;

--- includes/theme.inc	Thu Jun 18 23:19:02 2009
+++ includes/theme.inc	Tue Jun 30 19:54:20 2009
@@ -1945,13 +1945,11 @@
   $variables['language']          = $GLOBALS['language'];
   $variables['language']->dir     = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
   $variables['logo']              = theme_get_setting('logo');
-  $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
   $variables['main_menu']         = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
   $variables['secondary_menu']    = theme_get_setting('toggle_secondary_menu') ? menu_secondary_menu() : array();
   $variables['search_box']        = (theme_get_setting('toggle_search') ? drupal_render(drupal_get_form('search_theme_form')) : '');
   $variables['site_name']         = (theme_get_setting('toggle_name') ? filter_xss_admin(variable_get('site_name', 'Drupal')) : '');
   $variables['site_slogan']       = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : '');
-  $variables['tabs']              = theme('menu_local_tasks');
   $variables['title']             = drupal_get_title();
   // RDFa allows annotation of XHTML pages with RDF data, while GRDDL provides
   // mechanisms for extraction of this RDF content via XSLT transformation
