From c62260d19232255ed91801bfd3e8887bfe7cfb91 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Sat, 15 Dec 2012 12:58:55 -0500 Subject: Fixes #4491. Automatic fallback to JS to test rewrite rules during installation. --- install/js/install.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'install/js/install.js') diff --git a/install/js/install.js b/install/js/install.js index 49b2be10c..37e5b0dc3 100644 --- a/install/js/install.js +++ b/install/js/install.js @@ -19,3 +19,24 @@ $(function() { } }); }); + +elgg = { + installer: {} +}; + +/** + * Check the rewrite address for "success" and then allows the installation to proceed. + */ +elgg.installer.rewriteTest = function(url, success_msg, nextURL) { + $.ajax(url, { + success: function(data, status, xhr) { + if (data == 'success') { + $('.elgg-require-rewrite li').attr('class', 'pass'); + $('.elgg-require-rewrite li').html('

' + success_msg + '

'); + $('.elgg-install-nav a.elgg-state-disabled') + .removeClass('elgg-state-disabled') + .attr('href', nextURL); + } + } + }); +} -- cgit v1.2.3