diff --git a/recacher.module b/recacher.module index a1a86f0..9716cef 100644 --- a/recacher.module +++ b/recacher.module @@ -200,8 +200,12 @@ function recacher_crawler() { // Let other modules alter options and headers sent via HTTPRL. drupal_alter('recacher_role_options', $recacher_role_options); - // Trigger hook_recacher_role_options(). - $recacher_role_options = module_invoke_all('recacher_role_options', $recacher_role_options); + // Test if there are any modules implementing hook_recacher_role_options(). + // Without this test, no implementations would empty variable $recacher_role_options. + if (sizeof(module_implements('recacher_role_options')) > 0) { + // Trigger hook_recacher_role_options(). + $recacher_role_options = module_invoke_all('recacher_role_options', $recacher_role_options); + } foreach ($dburls as $dburl) { foreach ($recacher_role_options as $role => $options) { @@ -212,7 +216,6 @@ function recacher_crawler() { // Execute request. $request = httprl_send_request(); - //dpm($request); $codes = array(); foreach ($request as $url => $probe) { diff --git a/recacher_settings.inc b/recacher_settings.inc index 94ebd08..34beede 100644 --- a/recacher_settings.inc +++ b/recacher_settings.inc @@ -51,12 +51,12 @@ function recacher_admin($form, &$form_state) { $form['recrawler_hook_exit'] = array( '#type' => 'checkbox', '#title' => t('Try recrawling immediately'), - '#description' => t('Start the recaching process at the end of the current page request (uses "hook_exit()"). It is generally safer to re-cache on cron, especially if when expiring external cache such as Fastly or Akamai (see https://www.drupal.org/node/2828873).'), + '#description' => t('Start the re-caching process at the end of the current page request (uses "hook_exit()"). It is generally safer to re-cache on cron, especially when expiring external cache such as Fastly or Akamai (see https://www.drupal.org/node/2828873).'), '#default_value' => variable_get('recrawler_hook_exit', FALSE), ); $form['recacher_run_now'] = array( - '#markup' => '

'. l(t('Re-cache immediately'), 'admin/config/system/recacher/crawl') . ': ' . t('don\'t wait for the cron to run; warm caches of the expired pages immediately.') . '', + '#markup' => '

'. l(t('Re-cache immediately'), 'admin/config/system/recacher/crawl') . ': ' . t('click to warm caches of the expired pages immediately.') . '', ); return system_settings_form($form);