You are here

function spam_comment_operations in Spam 5

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

2 calls to spam_comment_operations()
spam_comment_overview_submit in ./spam.module
Form API hook; submit spam_comment_overview() form.
spam_custom_filter_scan_submit in ./spam.module
Form API hook; submit the custom filter scanner.

File

./spam.module, line 2598

Code

function spam_comment_operations($action = 'NOTHING') {
  switch ($action) {
    case 'SPAM':
      $operation = 'spam_spam_comment';
      break;
    case 'NOT_SPAM':
      $operation = 'spam_notspam_comment';
      break;
    case 'UNPUBLISH':
      $operation = 'spam_unpublish_comment';
      break;
    case 'PUBLISH':
      $operation = 'spam_publish_comment';
      break;
    case 'DELETE':
      $operation = 'spam_delete_comment';
      break;
    default:
      $operation = 'spam_donothing_comment';

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