function apachesolr_nan_remove_form_item in Apache Solr Not-A-Node 7.2
function apachesolr_nan_remove_form_item().
Handles item removal from the admin page.
See also
apachesolr_nan_nan_settings_form().
1 string reference to 'apachesolr_nan_remove_form_item'
File
- ./
apachesolr_nan.admin.inc, line 143 - Administrative functions and form builders for Apache Solr NAN Search.
Code
function apachesolr_nan_remove_form_item($form, &$form_state) {
// Remove the item from the array that corresponds to the pressed delete
// button.
$keys = array_keys($form_state['values']['item']);
$first = reset($keys);
unset($form_state['items'][$first]);
$form_state['rebuild'] = TRUE;
if (empty($form_state['items'])) {
$form_state['all_removed'] = TRUE;
}
drupal_set_message(t('If you are making changes to existing data, your changes will not be saved until you press the submit button.'), 'warning');
}