? mw.patch
? tmp.patch
Index: index.php
===================================================================
RCS file: /cvs/drupal/drupal/index.php,v
retrieving revision 1.94
diff -u -F^f -r1.94 index.php
--- index.php	26 Dec 2007 08:46:48 -0000	1.94
+++ index.php	5 Apr 2008 23:28:00 -0000
@@ -33,7 +33,8 @@
 }
 elseif (isset($return)) {
   // Print any value (including an empty string) except NULL or undefined:
-  print theme('page', $return);
+  drupal_set_content('content', $return);
+  print theme('page');
 }
 
 drupal_page_footer();
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.116
diff -u -F^f -r1.116 install.php
--- install.php	10 Feb 2008 19:03:47 -0000	1.116
+++ install.php	5 Apr 2008 23:28:01 -0000
@@ -109,7 +109,7 @@ function install_main() {
     if (!empty($messages['error'])) {
       install_task_list('requirements');
       drupal_set_title(st('Requirements problem'));
-      print theme('install_page', '');
+      print theme('install_page');
       exit;
     }
 
@@ -199,7 +199,8 @@ function install_change_settings($profil
 
   $output = drupal_get_form('install_settings_form', $profile, $install_locale, $settings_file, $db_url, $db_type, $db_prefix, $db_user, $db_pass, $db_host, $db_port, $db_path);
   drupal_set_title(st('Database configuration'));
-  print theme('install_page', $output);
+  drupal_set_content('content', $output);
+  print theme('install_page');
   exit;
 }
 
@@ -442,7 +443,8 @@ function install_select_profile() {
     install_task_list('profile-select');
 
     drupal_set_title(st('Select an installation profile'));
-    print theme('install_page', drupal_get_form('install_select_profile_form', $profiles));
+    drupal_set_content('content', drupal_get_form('install_select_profile_form'));
+    print theme('install_page', $profiles);
     exit;
   }
 }
@@ -518,7 +520,8 @@ function install_select_locale($profilen
       else {
         $output = '<ul><li><a href="install.php?profile='. $profilename .'&amp;locale=en">'. st('Install Drupal in English') .'</a></li><li><a href="install.php?profile='. $profilename .'&amp;localize=true">'. st('Learn how to install Drupal in other languages') .'</a></li></ul>';
       }
-      print theme('install_page', $output);
+      drupal_set_content('content', $output);
+      print theme('install_page');
       exit;
     }
     // One language, but not the default profile, assume
@@ -548,7 +551,8 @@ function install_select_locale($profilen
     install_task_list('locale-select');
 
     drupal_set_title(st('Choose language'));
-    print theme('install_page', drupal_get_form('install_select_locale_form', $locales));
+    drupal_set_content('content', drupal_get_form('install_select_locale_form', $locales));
+    print theme('install_page');
     exit;
   }
 }
@@ -586,7 +590,9 @@ function install_select_locale_form(&$fo
 function install_no_profile_error() {
   install_task_list('profile-select');
   drupal_set_title(st('No profiles available'));
-  print theme('install_page', '<p>'. st('We were unable to find any installer profiles. Installer profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.') .'</p>');
+  $output = '<p>'. st('We were unable to find any installer profiles. Installer profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.') .'</p>';
+  drupal_set_content('content', $output);
+  print theme('install_page');
   exit;
 }
 
@@ -598,7 +604,9 @@ function install_already_done_error() {
   global $base_url;
 
   drupal_set_title(st('Drupal already installed'));
-  print theme('install_page', st('<ul><li>To start over, you must empty your existing database.</li><li>To install to a different database, edit the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li><li>To upgrade an existing installation, proceed to the <a href="@base-url/update.php">update script</a>.</li><li>View your <a href="@base-url">existing site</a>.</li></ul>', array('@base-url' => $base_url)));
+  $output = st('<ul><li>To start over, you must empty your existing database.</li><li>To install to a different database, edit the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li><li>To upgrade an existing installation, proceed to the <a href="@base-url/update.php">update script</a>.</li><li>View your <a href="@base-url">existing site</a>.</li></ul>', array('@base-url' => $base_url));
+  drupal_set_content('content', $output);
+  print theme('install_page');
   exit;
 }
 
@@ -806,7 +814,8 @@ function install_tasks($profile, $task) 
   // Output page, if some output was required. Otherwise it is possible
   // that we are printing a JSON page and theme output should not be there.
   if (isset($output)) {
-    print theme('maintenance_page', $output);
+    drupal_set_content('content', $output);
+    print theme('maintenance_page');
   }
 }
 
Index: update.php
===================================================================
RCS file: /cvs/drupal/drupal/update.php,v
retrieving revision 1.253
diff -u -F^f -r1.253 update.php
--- update.php	19 Mar 2008 07:36:28 -0000	1.253
+++ update.php	5 Apr 2008 23:28:01 -0000
@@ -661,5 +661,6 @@ function update_check_requirements() {
 if (isset($output) && $output) {
   // We defer the display of messages until all updates are done.
   $progress_page = ($batch = batch_get()) && isset($batch['running']);
-  print theme('update_page', $output, !$progress_page);
+  drupal_set_content('content', $output);
+  print theme('update_page', !$progress_page);
 }
Index: includes/batch.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/batch.inc,v
retrieving revision 1.14
diff -u -F^f -r1.14 batch.inc
--- includes/batch.inc	20 Dec 2007 11:57:20 -0000	1.14
+++ includes/batch.inc	5 Apr 2008 23:28:01 -0000
@@ -133,7 +133,8 @@ function _batch_progress_page_nojs() {
     // followed by the error message.
     ob_start();
     $fallback = $current_set['error_message'] .'<br/>'. $batch['error_message'];
-    $fallback = theme('maintenance_page', $fallback, FALSE, FALSE);
+    drupal_set_content('content', $fallback);
+    $fallback = theme('maintenance_page', FALSE, FALSE);
 
     // We strip the end of the page using a marker in the template, so any
     // additional HTML output by PHP shows up inside the page rather than
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.762
diff -u -F^f -r1.762 common.inc
--- includes/common.inc	31 Mar 2008 20:50:05 -0000	1.762
+++ includes/common.inc	5 Apr 2008 23:28:02 -0000
@@ -331,8 +331,9 @@ function drupal_site_offline() {
   drupal_maintenance_theme();
   drupal_set_header('HTTP/1.1 503 Service unavailable');
   drupal_set_title(t('Site off-line'));
-  print theme('maintenance_page', filter_xss_admin(variable_get('site_offline_message',
+  drupal_set_content('content', filter_xss_admin(variable_get('site_offline_message',
     t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))))));
+  print theme('maintenance_page');
 }
 
 /**
@@ -2821,18 +2822,18 @@ function drupal_common_theme() {
       'arguments' => array('text' => NULL)
     ),
     'page' => array(
-      'arguments' => array('content' => NULL, 'show_blocks' => TRUE, 'show_messages' => TRUE),
+      'arguments' => array('show_blocks' => TRUE, 'show_messages' => TRUE),
       'template' => 'page',
     ),
     'maintenance_page' => array(
-      'arguments' => array('content' => NULL, 'show_blocks' => TRUE, 'show_messages' => TRUE),
+      'arguments' => array('show_blocks' => TRUE, 'show_messages' => TRUE),
       'template' => 'maintenance-page',
     ),
     'update_page' => array(
       'arguments' => array('content' => NULL, 'show_messages' => TRUE),
     ),
     'install_page' => array(
-      'arguments' => array('content' => NULL),
+      'arguments' => array(),
     ),
     'task_list' => array(
       'arguments' => array('items' => NULL, 'active' => NULL),
Index: includes/theme.maintenance.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.maintenance.inc,v
retrieving revision 1.11
diff -u -F^f -r1.11 theme.maintenance.inc
--- includes/theme.maintenance.inc	6 Feb 2008 19:38:26 -0000	1.11
+++ includes/theme.maintenance.inc	5 Apr 2008 23:28:02 -0000
@@ -103,14 +103,11 @@ function theme_task_list($items, $active
  *
  * Note: this function is not themeable.
  *
- * @param $content
  *   The page content to show.
  */
-function theme_install_page($content) {
+function theme_install_page() {
   drupal_set_header('Content-Type: text/html; charset=utf-8');
 
-  // Assign content.
-  $variables['content'] = $content;
   // Delay setting the message variable so it can be processed below.
   $variables['show_messages'] = FALSE;
   // The maintenance preprocess function is recycled here.
@@ -153,18 +150,14 @@ function theme_install_page($content) {
  *
  * Note: this function is not themeable.
  *
- * @param $content
- *   The page content to show.
  * @param $show_messages
  *   Whether to output status and error messages.
  *   FALSE can be useful to postpone the messages to a subsequent page.
  */
-function theme_update_page($content, $show_messages = TRUE) {
+function theme_update_page($show_messages = TRUE) {
   // Set required headers.
   drupal_set_header('Content-Type: text/html; charset=utf-8');
 
-  // Assign content and show message flag.
-  $variables['content'] = $content;
   $variables['show_messages'] = $show_messages;
   // The maintenance preprocess function is recycled here.
   template_preprocess_maintenance_page($variables);
Index: themes/chameleon/chameleon.info
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.info,v
retrieving revision 1.5
diff -u -F^f -r1.5 chameleon.info
--- themes/chameleon/chameleon.info	18 Feb 2008 19:19:48 -0000	1.5
+++ themes/chameleon/chameleon.info	5 Apr 2008 23:28:02 -0000
@@ -1,6 +1,7 @@
 ; $Id: chameleon.info,v 1.5 2008/02/18 19:19:48 dries Exp $
 name = Chameleon
 description = Minimalist tabled theme with light colors.
+regions[content] = Content
 regions[left] = Left sidebar
 regions[right] = Right sidebar
 features[] = logo
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.76
diff -u -F^f -r1.76 chameleon.theme
--- themes/chameleon/chameleon.theme	24 Jan 2008 09:42:53 -0000	1.76
+++ themes/chameleon/chameleon.theme	5 Apr 2008 23:28:02 -0000
@@ -13,7 +13,7 @@ function chameleon_theme($existing, $typ
   return drupal_find_theme_functions($existing, array($theme));
 }
 
-function chameleon_page($content, $show_blocks = TRUE, $show_messages = TRUE) {
+function chameleon_page($show_blocks = TRUE, $show_messages = TRUE) {
   $language = $GLOBALS['language']->language;
   $direction = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
 
@@ -26,6 +26,7 @@ function chameleon_page($content, $show_
   // Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.)
   $blocks_left = theme_blocks('left');
   $blocks_right = theme_blocks('right');
+  $content = theme_blocks('content');
 
   $output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
   $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\" dir=\"$direction\">\n";
Index: themes/chameleon/marvin/marvin.info
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/marvin/marvin.info,v
retrieving revision 1.5
diff -u -F^f -r1.5 marvin.info
--- themes/chameleon/marvin/marvin.info	18 Feb 2008 19:19:48 -0000	1.5
+++ themes/chameleon/marvin/marvin.info	5 Apr 2008 23:28:02 -0000
@@ -1,6 +1,7 @@
 ; $Id: marvin.info,v 1.5 2008/02/18 19:19:48 dries Exp $
 name = Marvin
 description = Boxy tabled theme in all grays.
+regions[center] = Center
 regions[left] = Left sidebar
 regions[right] = Right sidebar
 version = VERSION
