? 305324_update_xml_parser.1.patch
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.135
diff -u -p -r1.135 install.php
--- install.php	11 Oct 2008 18:20:53 -0000	1.135
+++ install.php	25 Oct 2008 23:49:50 -0000
@@ -622,7 +622,7 @@ function install_already_done_error() {
  * Tasks performed after the database is initialized.
  */
 function install_tasks($profile, $task) {
-  global $base_url, $install_locale;
+  global $base_url, $install_locale, $url;
 
   // Bootstrap newly installed Drupal, while preserving existing messages.
   $messages = isset($_SESSION['messages']) ? $_SESSION['messages'] : '';
@@ -795,7 +795,7 @@ if (Drupal.jsEnabled) {
       }
     }
     // Found nothing to import or not foreign language, go to next task.
-    $task = 'finished';
+    $task = 'theme';
   }
   if ($task == 'locale-remaining-batch') {
     include_once DRUPAL_ROOT . '/includes/batch.inc';
@@ -803,6 +803,15 @@ if (Drupal.jsEnabled) {
     $output = _batch_page();
   }
 
+  // Display theme options to user.
+  if ($task == 'theme') {
+    drupal_set_title(st('@drupal theme selection', array('@drupal' => drupal_install_profile_name())));
+    $messages = drupal_set_message();
+    $output = '<p>' . t('Select which themes are available to your users and specify the default theme.  Note that different themes may have different regions available for displaying content; for consistency in presentation, you may wish to enable only one theme.') . '</p>';
+    $output .= '<p>' . t('To change the appearance of your site, a number of <a href="@themes">contributed themes</a> are available.', array('@themes' => 'http://drupal.org/project/themes')) . '</p>';
+    $output .= drupal_get_form('install_themes_form');
+  }
+
   // Display a 'finished' page to user.
   if ($task == 'finished') {
     drupal_set_title(st('@drupal installation complete', array('@drupal' => drupal_install_profile_name())));
@@ -880,14 +889,14 @@ function _install_locale_initial_batch_f
  * Advance installer task to the finished screen.
  */
 function _install_locale_remaining_batch_finished($success, $results) {
-  variable_set('install_task', 'finished');
+  variable_set('install_task', 'theme');
 }
 
 /**
  * The list of reserved tasks to run in the installer.
  */
 function install_reserved_tasks() {
-  return array('configure', 'profile-install', 'profile-install-batch', 'locale-initial-import', 'locale-initial-batch', 'profile-finished', 'locale-remaining-batch', 'finished', 'done');
+  return array('configure', 'profile-install', 'profile-install-batch', 'locale-initial-import', 'locale-initial-batch', 'profile-finished', 'locale-remaining-batch', 'theme', 'finished', 'done');
 }
 
 /**
@@ -940,7 +949,7 @@ function install_check_requirements($pro
     }
     elseif ($writable) {
       $requirements['settings file'] = array(
-        'title'       => st('Settings file'), 
+        'title'       => st('Settings file'),
         'value'       => st('Settings file is writable.'),
       );
     }
@@ -961,6 +970,7 @@ function install_task_list($active = NUL
     'profile-install-batch' => st('Install profile'),
     'locale-initial-batch'  => st('Set up translations'),
     'configure'             => st('Configure site'),
+    'theme'                 => st('Set up theme'),
   );
 
   $profiles = install_find_profiles();
@@ -1177,5 +1187,25 @@ function install_configure_form_submit($
   variable_set('install_time', $_SERVER['REQUEST_TIME']);
 }
 
+/**
+ * Form API array definition for site themes.
+ */
+ function install_themes_form() {
+  $form = system_themes_form();
+  unset($form['buttons']['reset']);
+  return $form;
+}
+
+/**
+ * Form API submit for the site themes form.
+ */
+function install_themes_form_submit($form, &$form_state) {
+  global $url;
+  system_themes_form_submit($form, &$form_state);
+  variable_set('install_task','finished');
+  $form_state['redirect'] = $url;
+  return;
+}
+
 // Start the installer.
 install_main();
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.808
diff -u -p -r1.808 common.inc
--- includes/common.inc	12 Oct 2008 19:03:04 -0000	1.808
+++ includes/common.inc	25 Oct 2008 23:49:52 -0000
@@ -2704,7 +2704,7 @@ function drupal_system_listing($mask, $d
 
 /**
  * Hands off structured Drupal arrays to type-specific *_alter implementations.
- * 
+ *
  * This dispatch function hands off structured Drupal arrays to type-specific
  * *_alter implementations. It ensures a consistent interface for all altering
  * operations.
@@ -2917,6 +2917,9 @@ function drupal_common_theme() {
     'install_page' => array(
       'arguments' => array('content' => NULL),
     ),
+    'install_themes_form' => array(
+      'arguments' => array('form' => NULL),
+    ),
     '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.19
diff -u -p -r1.19 theme.maintenance.inc
--- includes/theme.maintenance.inc	1 Oct 2008 00:27:29 -0000	1.19
+++ includes/theme.maintenance.inc	25 Oct 2008 23:49:52 -0000
@@ -288,3 +288,21 @@ function template_preprocess_maintenance
     $variables['template_file'] = 'maintenance-page-offline';
   }
 }
+
+/**
+ * Generate a themed theme selection form for the installer.
+ *
+ * @param $form
+ *   The form to theme.
+ */
+ function theme_install_themes_form($form) {
+  $output = theme('system_themes_form', $form, TRUE);
+   $themes = list_themes();
+   foreach ($themes as $key => $theme) {
+     unset($form[$key]);
+   }
+   unset($form['status']);
+   unset($form['theme_default']);
+  $output .= drupal_render($form);
+  return $output;
+}
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.101
diff -u -p -r1.101 system.admin.inc
--- modules/system/system.admin.inc	12 Oct 2008 04:30:08 -0000	1.101
+++ modules/system/system.admin.inc	25 Oct 2008 23:49:54 -0000
@@ -2191,9 +2191,11 @@ function theme_system_theme_select_form(
  *
  * @param $form
  *   An associative array containing the structure of the form.
+ * @param $install
+ *   A boolean to indicate if form is being called during installation.
  * @ingroup themeable
  */
-function theme_system_themes_form($form) {
+function theme_system_themes_form($form, $install=FALSE) {
   foreach (element_children($form) as $key) {
     // Only look for themes
     if (!isset($form[$key]['info'])) {
@@ -2234,13 +2236,20 @@ function theme_system_themes_form($form)
     $row[] = array('data' => $status, 'align' => 'center');
     if ($form['theme_default']) {
       $row[] = array('data' => drupal_render($form['theme_default'][$key]), 'align' => 'center');
-      $row[] = array('data' => drupal_render($form[$key]['operations']), 'align' => 'center');
+      if (!$install) {
+        $row[] = array('data' => drupal_render($form[$key]['operations']), 'align' => 'center');
+      }
     }
     $rows[] = $row;
   }
 
-  $header = array(t('Screenshot'), t('Name'), t('Version'), t('Enabled'), t('Default'), t('Operations'));
+  $header = array(t('Screenshot'), t('Name'), t('Version'), t('Enabled'), t('Default'));
+  if (!$install) {
+    $header[] = t('Operations');
+  }
   $output = theme('table', $header, $rows);
-  $output .= drupal_render($form);
+  if (!$install) {
+    $output .= drupal_render($form);
+  }
   return $output;
 }
