function gathercontent_pages_form_submit in GatherContent 7.2
Form submission handler for gathercontent_pages_form().
File
- includes/
pages.inc, line 115 - Contains selecting pages to process.
Code
function gathercontent_pages_form_submit($form, &$form_state) {
$selected_pages = array();
if (isset($form_state['values']['pages'])) {
foreach ($form_state['values']['pages'] as $id => $val) {
if ($val > 0) {
$selected_pages[] = $id;
}
}
}
if (count($selected_pages) > 0) {
variable_set('gathercontent_selected_pages', $selected_pages);
drupal_goto('admin/config/content/gathercontent/pages_import');
}
else {
drupal_set_message(t('No pages selected'), 'error');
}
}