function prev_next_admin_submit in Previous/Next API 6
Same name and namespace in other branches
- 7.2 prev_next.admin.inc \prev_next_admin_submit()
- 7 prev_next.module \prev_next_admin_submit()
Submit callback.
1 string reference to 'prev_next_admin_submit'
- prev_next_admin in ./
prev_next.module - Menu callback argument. Creates the prev_next administration form.
File
- ./
prev_next.module, line 172
Code
function prev_next_admin_submit($form, &$form_state) {
$rebuild = FALSE;
// Test sensitive values.
foreach (node_get_types() as $type => $name) {
if ($form_state['values'][PREV_NEXT_NODE_TYPE . $type . '_current'] != $form_state['values'][PREV_NEXT_NODE_TYPE . $type] || $form_state['values'][PREV_NEXT_NODE_TYPE . $type . '_indexing_criteria_current'] != $form_state['values'][PREV_NEXT_NODE_TYPE . $type . '_indexing_criteria'] || $form_state['values'][PREV_NEXT_NODE_TYPE . $type . '_same_type_current'] != $form_state['values'][PREV_NEXT_NODE_TYPE . $type . '_same_type']) {
$rebuild = TRUE;
}
}
// If the search criterias has been changed, re-index.
if ($rebuild) {
prev_next_reindex();
drupal_set_message(t('The Prev/Next index will be rebuilt.'));
}
$form_state['redirect'] = 'admin/settings/prev_next';
}