You are here

function apachesolr_index_action_form_cron_submit in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr.admin.inc \apachesolr_index_action_form_cron_submit()
  2. 6.3 apachesolr.admin.inc \apachesolr_index_action_form_cron_submit()

Submit handler for the deletion form.

_state

Parameters

array $form:

1 string reference to 'apachesolr_index_action_form_cron_submit'
apachesolr_index_action_form in ./apachesolr.admin.inc
Form builder for the Apachesolr Indexer actions form.

File

./apachesolr.admin.inc, line 989
Administrative pages for the Apache Solr framework.

Code

function apachesolr_index_action_form_cron_submit(array $form, array &$form_state) {
  if (!empty($form_state['build_info']['args'][0])) {
    $env_id = $form_state['build_info']['args'][0];
    $form_state['redirect'] = 'admin/config/search/apachesolr/settings/' . $env_id . '/index';
  }
  else {
    $env_id = apachesolr_default_environment();
    $form_state['redirect'] = 'admin/config/search/apachesolr';
  }
  apachesolr_cron($env_id);
  drupal_set_message(t('Apachesolr cron successfully executed'));
}