diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-05-10 19:55:24 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-05-10 19:55:24 +0000 |
commit | 258c653f56ce7dd7dddcbe7c3a46c678dcb79b36 (patch) | |
tree | a30e00872d523d70b1b1ff901b7d7717cc9f3937 /modules | |
parent | 571013af8cac7f8c47bb8028495be2e0393d5150 (diff) | |
download | brdo-258c653f56ce7dd7dddcbe7c3a46c678dcb79b36.tar.gz brdo-258c653f56ce7dd7dddcbe7c3a46c678dcb79b36.tar.bz2 |
- 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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/node/node.module | 4 | ||||
-rw-r--r-- | modules/system/system.css | 7 | ||||
-rw-r--r-- | modules/system/system.install | 8 | ||||
-rw-r--r-- | modules/system/system.js | 32 | ||||
-rw-r--r-- | modules/user/user.module | 6 |
5 files changed, 51 insertions, 6 deletions
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('<h1 class="title">Welcome to your new Drupal website!</h1><p>Please follow these steps to set up and start using your website:</p>'); $default_message .= '<ol>'; - - if (!$admin) { - $default_message .= '<li>'. t('<strong>Create your administrator account</strong> To begin, <a href="@register">create the first account</a>. This account will have full administration rights and will allow you to configure your website.', array('@register' => url('user/register'))) .'</li>'; - } $default_message .= '<li>'. t('<strong>Configure your website</strong> Once logged in, visit the <a href="@admin">administration section</a>, where you can <a href="@config">customize and configure</a> all aspects of your website.', array('@admin' => url('admin'), '@config' => url('admin/settings'))) .'</li>'; $default_message .= '<li>'. t('<strong>Enable additional functionality</strong> Next, visit the <a href="@modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="@download_modules">Drupal modules download section</a>.', array('@modules' => url('admin/build/modules'), '@download_modules' => 'http://drupal.org/project/modules')) .'</li>'; $default_message .= '<li>'. t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.', array('@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/themes')) .'</li>'; 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('<span><div id="testing">'+ Drupal.settings.cleanURL.testing +"</div></span>"); + $("#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('<div class="ok">'+ Drupal.settings.cleanURL.success +"</div>"); + $("#clean-url input.form-radio").attr("checked", 1); + } + else { + // Check failed. + $("#clean-url .description span").append('<div class="warning">'+ Drupal.settings.cleanURL.failure +"</div>"); + } + }}); +} + +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('<p>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 <a href="@settings">site information settings page</a>.</p><p> Your password is <strong>%pass</strong>. You may change your password below.</p>', array('%pass' => $pass, '@settings' => url('admin/settings/site-information')))); + drupal_set_message(t('<p>Welcome to Drupal. You are now logged in as user #1, which gives you full control over your website.</p>')); + if (variable_get('user_email_verification', TRUE)) { + drupal_set_message(t('</p><p> Your password is <strong>%pass</strong>. You may change your password below.</p>', array('%pass' => $pass))); + } user_authenticate($account->name, trim($pass)); return 'user/1/edit'; |