diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-06 09:00:31 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-06 09:00:31 +0000 |
commit | 5f09149caaff7f073101f01ec0ae8f3d251d4b56 (patch) | |
tree | d3ec6b0b777010bd2d9955768dde7ae2bb1d32ca /install.php | |
parent | 235621a072caff6e05ccf36e4990e084009f7c49 (diff) | |
download | brdo-5f09149caaff7f073101f01ec0ae8f3d251d4b56.tar.gz brdo-5f09149caaff7f073101f01ec0ae8f3d251d4b56.tar.bz2 |
#178581 by lot of contributors: opt-in for update module on install and update to avoid any privacy concerns
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/install.php b/install.php index d425d7618..673b7e44c 100644 --- a/install.php +++ b/install.php @@ -654,11 +654,8 @@ function install_tasks($profile, $task) { $form['#build_id'] = $form_build_id; drupal_prepare_form('install_configure_form', $form, $form_state); - // In order to find out if the form was successfully submitted or not, - // we do a little song and dance to set the form to 'programmed' and check - // to make sure this is really the form being submitted. It'd better be. + // Is the form submitted? if (!empty($_POST) && $_POST['form_id'] == 'install_configure_form') { - $form['#programmed'] = TRUE; $form['#post'] = $_POST; } else { @@ -945,11 +942,22 @@ if (Drupal.jsEnabled) { '#weight' => 10, ); + $form['server_settings']['update_status_module'] = array( + '#type' => 'checkboxes', + '#title' => st('Update notifications'), + '#options' => array(1 => st('Check for updates automatically')), + '#default_value' => array(1), + '#description' => st('Drupal can check periodically for important bug fixes and security releases. To do this, your site will send anonymous information on its installed components to drupal.org. It is <strong>highly recommended</strong> that you enable this option for your site\'s security. For more information please read the <a href="@update">update notification information</a>.', array('@update' => 'http://drupal.org/handbook/modules/update')), + '#weight' => 15, + ); + $form['submit'] = array( '#type' => 'submit', '#value' => st('Save'), '#weight' => 15, ); + $form['#redirect'] = FALSE; + $hook_form_alter = $_GET['profile'] .'_form_alter'; if (function_exists($hook_form_alter)) { $hook_form_alter($form, 'install_configure'); @@ -976,6 +984,11 @@ function install_configure_form_submit($form, &$form_state) { variable_set('site_mail', $form_state['values']['site_mail']); variable_set('date_default_timezone', $form_state['values']['date_default_timezone']); + // Enable update.module if this option was selected. + if ($form_state['values']['update_status_module'][1]) { + drupal_install_modules(array('update')); + } + // Turn this off temporarily so that we can pass a password through. variable_set('user_email_verification', FALSE); $form_state['old_values'] = $form_state['values']; |