diff options
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.css | 7 | ||||
-rw-r--r-- | modules/system/system.install | 8 | ||||
-rw-r--r-- | modules/system/system.js | 32 |
3 files changed, 47 insertions, 0 deletions
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); +} |