function node_admin_nodes_submit($form_id, $edit) { $operations = node_operations(); if ($operations[$edit['operation']][1]) { // Flag changes $operation = $operations[$edit['operation']][1]; foreach ($edit['nodes'] as $nid => $value) { if ($value) { db_query($operation, $nid); } } drupal_set_message(t('The update has been performed.')); } }