You are here

function search_by_page_form_search_admin_settings_alter in Search by Page 6

Same name and namespace in other branches
  1. 8 search_by_page.module \search_by_page_form_search_admin_settings_alter()
  2. 7 search_by_page.module \search_by_page_form_search_admin_settings_alter()

Implementation of hook_form_FORM_ID_alter().

Modifies the Search module settings form so that you can select 0 items to be indexed per cron run for the other core search modules.

File

./search_by_page.module, line 458
Main module file for Drupal module Search by Page.

Code

function search_by_page_form_search_admin_settings_alter(&$form, $form_state) {
  $items = drupal_map_assoc(array(
    0,
    10,
    20,
    50,
    100,
    200,
    500,
  ));
  $form['indexing_throttle']['search_cron_limit']['#options'] = $items;
  $form['indexing_throttle']['search_cron_limit']['#description'] = t('The maximum number of items indexed in each pass of a <a href="@cron">cron maintenance task</a> by search modules that do not set their own defaults (such as the core Node module that indexes content items). If necessary, reduce the number of items to prevent timeouts and memory errors while indexing.', array(
    '@cron' => url('admin/reports/status'),
  ));
}