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/system/system.css | 7 +++++++ modules/system/system.install | 8 ++++++++ modules/system/system.js | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) (limited to 'modules/system') 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); +} -- cgit v1.2.3