Index: modules/system/system.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.js,v
retrieving revision 1.21
diff -u -r1.21 system.js
--- modules/system/system.js	17 Mar 2009 15:26:29 -0000	1.21
+++ modules/system/system.js	1 Apr 2009 12:14:20 -0000
@@ -19,25 +19,36 @@
     var url = settings.basePath +"admin/settings/clean-urls/check";
     $("#clean-url .description span").html('<div id="testing">'+ Drupal.t('Testing clean URLs...') +"</div>");
     $("#clean-url p").hide();
-    $.ajax({
-      url: location.protocol +"//"+ location.host + url,
-      dataType: 'json',
-      success: function () {
-        // Check was successful.
+    if (Drupal.cleanURLsCheck() == true) {    // Check was successful.
         $("#clean-url input.form-radio").attr("disabled", false);
-        $("#clean-url .description span").append('<div class="ok">'+ Drupal.t('Your server has been successfully tested to support this feature.') +"</div>");
         $("#testing").hide();
-      },
-      error: function() {
+      } else {
         // Check failed.
-        $("#clean-url .description span").append('<div class="warning">'+ Drupal.t('Your system configuration does not currently support this feature. The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.') +"</div>");
+        $("#clean-url input.form-radio").attr("disabled", true);
+        $("#clean-url .description span").append('<div class="warning">'+ Drupal.settings.cleanURL.failure +"</div>");
         $("#testing").hide();
       }
-    });
     $("#clean-url").addClass('clean-url-processed');
   }
 };
 
+Drupal.cleanURLsCheck = function () {
+  var url = location.protocol +"//"+ location.host + Drupal.settings.basePath +"admin/settings/clean-urls/check";
+  $.ajax({
+    async: false,
+    url: url,
+    dataType: 'json',
+    success: function () {
+      ret = true;
+    },
+    error: function() {
+      // Check failed.
+      ret = false;
+    }
+  });
+  return ret;
+}
+
 /**
  * Internal function to check using Ajax if clean URLs can be enabled on the
  * install page.
@@ -46,28 +57,20 @@
  * are currently enabled.
  */
 Drupal.cleanURLsInstallCheck = function() {
-  var url = location.protocol +"//"+ location.host + Drupal.settings.basePath +"admin/settings/clean-urls/check";
   $("#clean-url .description").append('<span><div id="testing">'+ Drupal.settings.cleanURL.testing +"</div></span>");
   $("#clean-url.install").css("display", "block");
   // Submit a synchronous request to avoid database errors associated with
   // concurrent requests during install.
-  $.ajax({
-    async: false,
-    url: url,
-    dataType: 'json',
-    success: function () {
-      // Check was successful.
-      $("#clean-url input.form-radio").attr("disabled", false);
-      $("#clean-url input.form-radio").attr("checked", 1);
-      $("#clean-url .description span").append('<div class="ok">'+ Drupal.settings.cleanURL.success +"</div>");
-      $("#testing").hide();
-    },
-    error: function() {
-      // Check failed.
-      $("#clean-url .description span").append('<div class="warning">'+ Drupal.settings.cleanURL.failure +"</div>");
-      $("#testing").hide();
-    }
-  });
+  if (Drupal.cleanURLsCheck() == true) {
+    // Check was successful.
+    $("#edit-clean-url").val(1)
+    $("#testing").hide();
+  } else {
+    // Check failed.
+    $("#edit-clean-url").val(0)
+    $("#clean-url .description span").append('<div class="warning">'+ Drupal.settings.cleanURL.failure +"</div>");
+    $("#testing").hide();
+  }
   $("#clean-url").addClass('clean-url-processed');
 };
 
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.131
diff -u -r1.131 system.admin.inc
--- modules/system/system.admin.inc	17 Mar 2009 15:26:29 -0000	1.131
+++ modules/system/system.admin.inc	1 Apr 2009 12:14:22 -0000
@@ -1773,11 +1773,18 @@
     '#options' => array(t('Disabled'), t('Enabled')),
     '#description' => t('This option makes Drupal emit "clean" URLs (i.e. without <code>?q=</code> in the URL).'),
   );
-
+  
+  $failure_message = t('Your system configuration does not currently support clean urls (i.e. <strong>http://mysite.com/story/mystory</strong> instead of <strong>http://mysite.com?q=story/mystory</strong>). The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.');
   if (!variable_get('clean_url', 0)) {
     if (strpos(request_uri(), '?q=') !== FALSE) {
       drupal_add_js(drupal_get_path('module', 'system') . '/system.js');
-
+      drupal_add_js(array(
+              'copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')),
+              'cleanURL' => array(
+                'success' => null,
+                'failure' => $failure_message,
+                'testing' => t('Testing clean URLs...'))),
+              'setting');
       $form['clean_url']['#description'] .= ' <span>' . t('Before enabling clean URLs, you must perform a test to determine if your server is properly configured. If you are able to see this page again after clicking the "Run the clean URL test" link, the test has succeeded and the radio buttons above will be available. If instead you are directed to a "Page not found" error, you will need to change the configuration of your server. The <a href="@handbook">handbook page on Clean URLs</a> has additional troubleshooting information.', array('@handbook' => 'http://drupal.org/node/15365')) . '</span>';
 
       $form['clean_url']['#disabled'] = TRUE;
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.161
diff -u -r1.161 install.php
--- install.php	25 Mar 2009 16:40:51 -0000	1.161
+++ install.php	1 Apr 2009 12:14:23 -0000
@@ -725,7 +725,13 @@
       drupal_add_js('misc/timezone.js');
       // We add these strings as settings because JavaScript translation does not
       // work on install time.
-      drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')), 'cleanURL' => array('success' => st('Your server has been successfully tested to support this feature.'), 'failure' => st('Your system configuration does not currently support this feature. The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.'), 'testing' => st('Testing clean URLs...'))), 'setting');
+      drupal_add_js(array(
+        'copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')),
+        'cleanURL' => array(
+          'success' => null,
+          'failure' => st('Your system configuration does not currently support clean urls (i.e. <strong>http://mysite.com/story/mystory</strong> instead of <strong>http://mysite.com?q=story/mystory</strong>). The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.'),
+          'testing' => st('Testing clean URLs...'))),
+        'setting');
       drupal_add_js('
 // Global Killswitch
 if (Drupal.jsEnabled) {
@@ -1038,15 +1044,11 @@
     '#weight' => 5,
     '#attributes' => array('class' => 'timezone-detect'),
   );
-
+  
   $form['server_settings']['clean_url'] = array(
-    '#type' => 'radios',
-    '#title' => st('Clean URLs'),
+    '#type' => 'hidden',
     '#default_value' => 0,
-    '#options' => array(0 => st('Disabled'), 1 => st('Enabled')),
-    '#description' => st('This option makes Drupal emit "clean" URLs (i.e. without <code>?q=</code> in the URL).'),
-    '#disabled' => TRUE,
-    '#prefix' => '<div id="clean-url" class="install">',
+    '#prefix' => '<div id="clean-url" class="install"><p class="description"></p>',
     '#suffix' => '</div>',
     '#weight' => 10,
   );
