You are here

function spam_node_operations_list in Spam 5

Return the function to call dependant on the $action requested.

1 call to spam_node_operations_list()
spam_node_overview_submit in ./spam.module
Submit code for the spam_node_overview form/function

File

./spam.module, line 2809

Code

function spam_node_operations_list($action = 'NOTHING') {
  switch ($action) {
    case 'NOT_SPAM':
      $operation = 'spam_notspam_node';
      break;
    case 'UNPUBLISH':
      $operation = 'spam_unpublish_node';
      break;
    case 'PUBLISH':
      $operation = 'spam_publish_node';
      break;
    case 'DELETE':
      $operation = 'spam_delete_node';
      break;
    default:
      $operation = 'spam_donothing_node';

      // do nothing if we don't know what to do
      break;
  }
  return $operation;
}