### Eclipse Workspace Patch 1.0
#P drupal-contrib-6--2
Index: modules/linkchecker/includes/linkchecker.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linkchecker/includes/Attic/linkchecker.pages.inc,v
retrieving revision 1.1.2.17
diff -u -r1.1.2.17 linkchecker.pages.inc
--- modules/linkchecker/includes/linkchecker.pages.inc	1 Sep 2009 21:25:49 -0000	1.1.2.17
+++ modules/linkchecker/includes/linkchecker.pages.inc	15 Nov 2009 13:37:55 -0000
@@ -212,6 +212,19 @@
     '#description' => t("Disable this checkbox if you don't like to get informed any longer about this broken link. Use this setting only as the very last option if there is no other way to solve a failed link check."),
   );
 
+  $form['recheck'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Cron settings'),
+    '#collapsible' => FALSE,
+  );
+
+  $form['recheck']['recheck'] = array(
+    '#default_value' => 0,
+    '#type' => 'checkbox',
+    '#title' => t('Re-check link status on next cron run'),
+    '#description' => t('Enable this checkbox if you need an immediate re-check of the link and cannot wait until the next scheduled check at @date.', array('@date' => format_date($link['last_checked'] + variable_get('linkchecker_check_links_interval', 2419200)))),
+  );
+
   $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') );
   $form['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults') );
 
@@ -219,6 +232,12 @@
 }
 
 function linkchecker_link_edit_form_submit($form, &$form_state) {
+  // Force link re-check asap.
+  if ($form_state['values']['recheck']) {
+    db_query("UPDATE {linkchecker_links} SET last_checked = %d WHERE lid = %d", 0, $form_state['values']['lid']);
+    drupal_set_message(t('The link %url will be checked again on the next cron run.', array('%url' => $form_state['values']['url'])));
+  }
+
   if ($form_state['values']['method'] != $form['settings']['method']['#default_value']) {
     // Update settings and reset statistics for a quick re-check.
     db_query("UPDATE {linkchecker_links} SET method = '%s', fail_count = %d, last_checked = %d, status = %d WHERE lid = %d", $form_state['values']['method'], 0, 0, $form_state['values']['status'], $form_state['values']['lid']);
