You are here

function scs_admin_content_node_submit in Simplenews Content Selection 6.2

Same name and namespace in other branches
  1. 6 scs.module \scs_admin_content_node_submit()

Extra submit function on admin/content/node form

1 string reference to 'scs_admin_content_node_submit'
scs_form_alter in ./scs.module
Implements hook_form_alter() Used to add an extra update operation to admin/content/node

File

./scs.module, line 126
Select Drupal content to create a newsletter

Code

function scs_admin_content_node_submit($form, &$form_state) {
  if ($form_state['values']['operation'] == 'scs') {
    $nodes = $form_state['values']['nodes'];
    $counter = 0;
    $newnodes = array();
    foreach ($nodes as $key => $selected) {
      if ($selected != 0) {
        $newnodes['nid_' . $counter] = $selected;
        $counter++;
      }
    }
    $query = http_build_query($newnodes, '', '&');
    drupal_goto('admin/content/scs_sort_nodes', $query);
  }
}