Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal/drupal/CHANGELOG.txt,v
retrieving revision 1.352
diff -u -p -r1.352 CHANGELOG.txt
--- CHANGELOG.txt	15 Jan 2010 14:57:10 -0000	1.352
+++ CHANGELOG.txt	18 Jan 2010 05:18:34 -0000
@@ -37,8 +37,6 @@ Drupal 7.0, xxxx-xx-xx (development vers
       now be achieved with Field API.
     * Added additional features to the default install profile, and implemented
       a "slimmed down" install profile designed for developers.
-    * Added a built-in, automated cron run feature, which is triggered by site
-      visitors.
     * Added an administrator role which is assigned all permisions for
       installed modules automatically.
     * Image toolkits are now provided by modules (rather than requiring a
Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal/drupal/INSTALL.txt,v
retrieving revision 1.76
diff -u -p -r1.76 INSTALL.txt
--- INSTALL.txt	14 Sep 2009 07:33:55 -0000	1.76
+++ INSTALL.txt	18 Jan 2010 05:18:34 -0000
@@ -231,18 +231,9 @@ INSTALLATION
    maintenance task, including search module (to build and update the index
    used for keyword searching), aggregator module (to retrieve feeds from other
    sites), and system module (to perform routine maintenance and pruning on
-   system tables).
-
-   For most sites, the built-in, automated cron feature should be sufficient.
-   Note, however, that cron tasks will only be executed when there are site
-   visitors. You can enable the built-in cron feature at:
-
-          Administer > Configuration and modules > Development > Maintenance mode
-
-   Advanced users may want to ensure that cron tasks are executed periodically.
-   To do this, visit the page "cron.php", which executes maintenance tasks on
-   behalf of installed modules. The URL of the cron.php page requires a "cron
-   key" to protect against unauthorized access.
+   system tables). To activate these tasks, visit the page "cron.php", which
+   executes maintenance tasks on behalf of installed modules. The URL of the
+   cron.php page requires a "cron key" to protect against unauthorized access.
    Each cron key is automatically generated during installation and is specific
    to your site. The full URL of the page, with cron key, is available in the
    "Cron maintenance tasks" section of the "Status report page" at:
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.252
diff -u -p -r1.252 system.admin.inc
--- modules/system/system.admin.inc	18 Jan 2010 03:06:00 -0000	1.252
+++ modules/system/system.admin.inc	18 Jan 2010 05:18:34 -0000
@@ -1545,16 +1545,7 @@ function system_site_information_setting
     '#description' => t('This page is displayed when no other content matches the requested document. Leave blank to display a generic "page not found" page.'),
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
   );
-  $form['cron_safe_threshold'] = array(
-    '#type' => 'select',
-    '#title' => t('Automatically run cron'),
-    '#default_value' => variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD),
-    '#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'),
-    '#description' => t('When enabled, the site will check whether cron has been run in the configured interval and automatically run it upon the next page request. For more information visit the <a href="@status-report-url">status report page</a>.', array('@status-report-url' => url('admin/reports/status'))),
-  );
-
   $form['#validate'][] = 'system_site_information_settings_validate';
-  $form['#submit'][] = 'system_site_information_settings_submit';
 
   return system_settings_form($form, FALSE);
 }
@@ -1576,18 +1567,6 @@ function system_site_information_setting
 }
 
 /**
- * Form submit handler for the site-information form.
- */
-function system_site_information_settings_submit($form, &$form_state) {
-  // Clear caches when the cron threshold is changed to ensure that the cron
-  // image is not contained in cached pages.
-  $cron_threshold = variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD);
-  if ($cron_threshold != $form_state['input']['cron_safe_threshold']) {
-    cache_clear_all();
-  }
-}
-
-/**
  * Form builder; Configure error reporting settings.
  *
  * @ingroup forms
Index: modules/system/system.cron.js
===================================================================
RCS file: modules/system/system.cron.js
diff -N modules/system/system.cron.js
--- modules/system/system.cron.js	15 Dec 2009 08:45:32 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-// $Id: system.cron.js,v 1.1 2009/12/15 08:45:32 dries Exp $
-(function ($) {
-
-/**
- * Checks to see if the cron should be automatically run.
- */
-Drupal.behaviors.cronCheck = {
-  attach: function(context, settings) {
-    if (settings.cronCheck || false) {
-      $('body').once('cron-check', function() {
-        // Only execute the cron check if its the right time.
-        if (Math.round(new Date().getTime() / 1000.0) > settings.cronCheck) {
-          $.get(settings.basePath + 'system/run-cron-check');
-        }
-      });
-    }
-  }
-};
-
-})(jQuery);
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.876
diff -u -p -r1.876 system.module
--- modules/system/system.module	13 Jan 2010 23:03:31 -0000	1.876
+++ modules/system/system.module	18 Jan 2010 05:18:35 -0000
@@ -12,11 +12,6 @@
 define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 21600);
 
 /**
- * Default interval for automatic cron executions in seconds.
- */
-define('DRUPAL_CRON_DEFAULT_THRESHOLD', 10800);
-
-/**
  * New users will be set to the default time zone at registration.
  */
 define('DRUPAL_USER_TIMEZONE_DEFAULT', 0);
@@ -527,13 +522,6 @@ function system_menu() {
     'type' => MENU_CALLBACK,
     'file' => 'system.admin.inc',
   );
-  $items['system/run-cron-check'] = array(
-    'title' => 'Execute cron',
-    'page callback' => 'system_run_cron_check',
-    'access callback' => 'system_run_cron_check_access',
-    'type' => MENU_CALLBACK,
-    'file' => 'system.admin.inc',
-  );
   $items['admin'] = array(
     'title' => 'Administer',
     'access arguments' => array('access administration pages'),
@@ -3090,32 +3078,6 @@ function system_retrieve_file($url, $des
 }
 
 /**
- * Implements hook_page_build().
- */
-function system_page_build(&$page) {
-  // Automatic cron runs.
-  $cron_threshold = variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD);
-  if ($cron_threshold) {
-    $page['page_bottom']['run_cron'] = array(
-      // Trigger cron run via AJAX.
-      '#attached' => array(
-        'js' => array(
-          drupal_get_path('module', 'system') . '/system.cron.js' => array('weight' => JS_DEFAULT - 5),
-          array(
-            'data' => array(
-              // Add the timestamp for the next automatic cron run.
-              'cronCheck' => variable_get('cron_last', 0) + $cron_threshold,
-            ),
-            'type' => 'setting',
-          ),
-
-        ),
-      ),
-    );
-  }
-}
-
-/**
  * Implements hook_page_alter().
  */
 function system_page_alter(&$page) {
@@ -3131,68 +3093,6 @@ function system_page_alter(&$page) {
 }
 
 /**
- * Menu callback; executes cron via an AJAX callback.
- *
- * This callback runs cron in a separate HTTP request to prevent "mysterious"
- * slow-downs of regular HTTP requests. It is invoked via an AJAX request and
- * does not process the returned output.
- *
- * @see system_page_alter()
- * @see system_run_cron_check_access()
- */
-function system_run_cron_check() {
-  $cron_run = FALSE;
-  $cron_threshold = variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD);
-
-  // Cron threshold semaphore is used to avoid errors every time the image
-  // callback is displayed when a previous cron is still running.
-  $threshold_semaphore = variable_get('cron_threshold_semaphore', FALSE);
-  if ($threshold_semaphore) {
-    if (REQUEST_TIME - $threshold_semaphore > 3600) {
-      // Either cron has been running for more than an hour or the semaphore
-      // was not reset due to a database error.
-      watchdog('cron', 'Cron has been running for more than an hour and is most likely stuck.', array(), WATCHDOG_ERROR);
-
-      // Release the cron threshold semaphore.
-      variable_del('cron_threshold_semaphore');
-    }
-  }
-  else {
-    $cron_last = variable_get('cron_last', NULL);
-    // Run cron automatically if it has never run or threshold was crossed.
-    if (!isset($cron_last) || (REQUEST_TIME - $cron_last > $cron_threshold)) {
-      // Lock cron threshold semaphore.
-      variable_set('cron_threshold_semaphore', REQUEST_TIME);
-      $cron_run = drupal_cron_run();
-      // Release the cron threshold semaphore.
-      variable_del('cron_threshold_semaphore');
-    }
-  }
-
-  // Add an expires header with the time of the next cron run.
-  $cron_last = variable_get('cron_last', NULL);
-  drupal_add_http_header('Expires', gmdate(DATE_RFC1123, $cron_last + $cron_threshold));
-
-  drupal_json_output(array('cron_run' => $cron_run));
-  drupal_page_footer();
-}
-
-/**
- * Checks if the feature to automatically run cron is enabled.
- *
- * Also used as a menu access callback for this feature.
- *
- * @return
- *   TRUE if cron threshold is enabled, FALSE otherwise.
- *
- * @see system_run_cron_check()
- * @see system_page_alter()
- */
-function system_run_cron_check_access() {
-  return variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD) > 0;
-}
-
-/**
  * Get the list of available date types and attributes.
  *
  * @param $type
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.103
diff -u -p -r1.103 system.test
--- modules/system/system.test	13 Jan 2010 05:08:29 -0000	1.103
+++ modules/system/system.test	18 Jan 2010 05:18:35 -0000
@@ -398,7 +398,6 @@ class CronRunTestCase extends DrupalWebT
    */
   function testCronRun() {
     global $base_url;
-
     // Run cron anonymously without any cron key.
     $this->drupalGet($base_url . '/cron.php', array('external' => TRUE));
     $this->assertResponse(403);
@@ -415,64 +414,6 @@ class CronRunTestCase extends DrupalWebT
   }
 
   /**
-   * Ensure that the automatic cron run callback is working.
-   *
-   * In these tests we do not use REQUEST_TIME to track start time, because we
-   * need the exact time when cron is triggered.
-   */
-  function testAutomaticCron() {
-    // Ensure cron does not run when the cron threshold is enabled and was
-    // not passed.
-    $cron_last = time();
-    $cron_safe_threshold = 100;
-    variable_set('cron_last', $cron_last);
-    variable_set('cron_safe_threshold', $cron_safe_threshold);
-    $this->drupalGet('');
-    $this->assertRaw('"cronCheck":' . ($cron_last + $cron_safe_threshold));
-    $this->drupalGet('system/run-cron-check');
-    $this->assertExpiresHeader($cron_last + $cron_safe_threshold);
-    $this->assertTrue($cron_last == variable_get('cron_last', NULL), t('Cron does not run when the cron threshold is not passed.'));
-
-    // Test if cron runs when the cron threshold was passed.
-    $cron_last = time() - 200;
-    variable_set('cron_last', $cron_last);
-    $this->drupalGet('');
-    $this->assertRaw('"cronCheck":' . ($cron_last + $cron_safe_threshold));
-    sleep(1);
-    $this->drupalGet('system/run-cron-check');
-    $this->assertExpiresHeader(variable_get('cron_last', NULL) + $cron_safe_threshold);
-    $this->assertTrue($cron_last < variable_get('cron_last', NULL), t('Cron runs when the cron threshold is passed.'));
-
-    // Disable the cron threshold through the interface.
-    $admin_user = $this->drupalCreateUser(array('administer site configuration'));
-    $this->drupalLogin($admin_user);
-    $this->drupalPost('admin/config/system/site-information', array('cron_safe_threshold' => 0), t('Save configuration'));
-    $this->assertText(t('The configuration options have been saved.'));
-    $this->drupalLogout();
-
-    // Test if cron does not run when the cron threshold is disabled.
-    $cron_last = time() - 200;
-    variable_set('cron_last', $cron_last);
-    $this->drupalGet('');
-    $this->assertNoRaw('cronCheck');
-    $this->drupalGet('system/run-cron-check');
-    $this->assertResponse(403);
-    $this->assertTrue($cron_last == variable_get('cron_last', NULL), t('Cron does not run when the cron threshold is disabled.'));
-  }
-
-  /**
-   * Assert that the Expires header is a specific timestamp.
-   *
-   * @param $timestamp
-   *   The timestamp value to match against the header.
-   */
-  private function assertExpiresHeader($timestamp) {
-    $expires = $this->drupalGetHeader('Expires');
-    $expires = strtotime($expires);
-    $this->assertEqual($expires, $timestamp, t('Expires header expected @expected got @actual.', array('@expected' => $timestamp, '@actual' => $expires)));
-  }
-
-  /**
    * Ensure that temporary files are removed.
    *
    * Create files for all the possible combinations of age and status. We are
@@ -1237,7 +1178,7 @@ class SystemThemeFunctionalTest extends 
     $this->drupalPost('admin/appearance/settings', $edit, t('Save configuration'));
     $this->drupalGet('node');
     $this->assertRaw($file->uri, t('Logo path successfully changed.'));
-  
+
     // Upload a file to use for the logo.
     $file = current($this->drupalGetTestFiles('image'));
     $edit = array(
