From 258c653f56ce7dd7dddcbe7c3a46c678dcb79b36 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 10 May 2007 19:55:24 +0000 Subject: - Patch #141637 by merlinofchaos, gabor, et al: provide a site config form at the end of install to collect data, plus allow profiles to modify and add more. --- modules/node/node.module | 4 ---- modules/system/system.css | 7 +++++++ modules/system/system.install | 8 ++++++++ modules/system/system.js | 32 ++++++++++++++++++++++++++++++++ modules/user/user.module | 6 ++++-- 5 files changed, 51 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/node/node.module b/modules/node/node.module index fcba35b7d..c96606a94 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2448,10 +2448,6 @@ function node_page_default() { $default_message = t('

Welcome to your new Drupal website!

Please follow these steps to set up and start using your website:

'); $default_message .= '
    '; - - if (!$admin) { - $default_message .= '
  1. '. t('Create your administrator account To begin, create the first account. This account will have full administration rights and will allow you to configure your website.', array('@register' => url('user/register'))) .'
  2. '; - } $default_message .= '
  3. '. t('Configure your website Once logged in, visit the administration section, where you can customize and configure all aspects of your website.', array('@admin' => url('admin'), '@config' => url('admin/settings'))) .'
  4. '; $default_message .= '
  5. '. t('Enable additional functionality Next, visit the module list and enable features which suit your specific needs. You can find additional modules in the Drupal modules download section.', array('@modules' => url('admin/build/modules'), '@download_modules' => 'http://drupal.org/project/modules')) .'
  6. '; $default_message .= '
  7. '. t('Customize your website design To change the "look and feel" of your website, visit the themes section. You may choose from one of the included themes or download additional themes from the Drupal themes download section.', array('@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/themes')) .'
  8. '; diff --git a/modules/system/system.css b/modules/system/system.css index 2485269bc..ebe41c55a 100644 --- a/modules/system/system.css +++ b/modules/system/system.css @@ -431,3 +431,10 @@ tr.selected td { thead div.sticky-header { background: #fff; } + +/* +** Installation clean URLs +*/ +#clean-url.install { + display: none; +} diff --git a/modules/system/system.install b/modules/system/system.install index 62e582d64..b1fda9b22 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3873,6 +3873,14 @@ function system_update_6013() { system_theme_data(); } +/** + * Record that the installer is done, so it is not + * possible to run the installer on upgraded sites. + */ +function system_update_6014() { + variable_set('install_task', 'done'); +} + /** * @} End of "defgroup updates-5.x-to-6.x" diff --git a/modules/system/system.js b/modules/system/system.js index a77c7ac99..0c88c9f06 100644 --- a/modules/system/system.js +++ b/modules/system/system.js @@ -24,3 +24,35 @@ Drupal.cleanURLsSettingsCheck = function() { } }}); } + +/** + * Internal function to check using Ajax if clean URLs can be enabled on the + * install page. + * + * This function is not used to verify whether or not clean URLs + * are currently enabled. + */ +Drupal.cleanURLsInstallCheck = function() { + var pathname = location.pathname +""; + var url = pathname.replace(/\/[^\/]*?$/, '/') +"node"; + $("#clean-url .description").append('
    '+ Drupal.settings.cleanURL.testing +"
    "); + $("#clean-url.install").css("display", "block"); + $.ajax({url: location.protocol +"//"+ location.host + url, type: "GET", data: " ", complete: function(response) { + $("#testing").toggle(); + if (response.status == 200) { + // Check was successful. + $("#clean-url input.form-radio").attr("disabled", ""); + $("#clean-url .description span").append('
    '+ Drupal.settings.cleanURL.success +"
    "); + $("#clean-url input.form-radio").attr("checked", 1); + } + else { + // Check failed. + $("#clean-url .description span").append('
    '+ Drupal.settings.cleanURL.failure +"
    "); + } + }}); +} + +Drupal.installDefaultTimezone = function() { + var offset = new Date().getTimezoneOffset() * -60; + $("#edit-date-default-timezone").val(offset); +} diff --git a/modules/user/user.module b/modules/user/user.module index d4ddc76e7..ff3ee7b33 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1374,8 +1374,10 @@ function user_register_submit($form_id, $form_values) { // The first user may login immediately, and receives a customized welcome e-mail. if ($account->uid == 1) { - drupal_mail('user-register-admin', $mail, t('Drupal user account details for !s', array('!s' => $name)), strtr(t("!username,\n\nYou may now login to !uri using the following username and password:\n\n username: !username\n password: !password\n\n!edit_uri\n\n--drupal"), $variables), $from); - drupal_set_message(t('

    Welcome to Drupal. You are user #1, which gives you full and immediate access. All future registrants will receive their passwords via e-mail, so please make sure your website e-mail address is set properly under the general settings on the site information settings page.

    Your password is %pass. You may change your password below.

    ', array('%pass' => $pass, '@settings' => url('admin/settings/site-information')))); + drupal_set_message(t('

    Welcome to Drupal. You are now logged in as user #1, which gives you full control over your website.

    ')); + if (variable_get('user_email_verification', TRUE)) { + drupal_set_message(t('

    Your password is %pass. You may change your password below.

    ', array('%pass' => $pass))); + } user_authenticate($account->name, trim($pass)); return 'user/1/edit'; -- cgit v1.2.3