You are here

function _addanother_quelch_message in Add Another 7.2

Same name and namespace in other branches
  1. 8 addanother.module \_addanother_quelch_message()

Remove the default Drupal node creation message.

2 calls to _addanother_quelch_message()
addanother_node_form_message_submit in ./addanother.module
Form submit handler for node_form() considering the 'message'.
addanother_node_form_submit in ./addanother.module
Form submit handler for node_form().

File

./addanother.module, line 293
The main file for the addanother module.

Code

function _addanother_quelch_message($node) {
  if (!isset($_SESSION['messages']['status'])) {
    return 0;
  }
  $t_args = array(
    '@type' => node_type_get_name($node),
    '%title' => $node->title,
  );
  $remove[] = t('@type %title has been created.', $t_args);
  if ($messages = array_diff($_SESSION['messages']['status'], $remove)) {
    $_SESSION['messages']['status'] = $messages;
  }
  else {
    $_SESSION['messages']['status'] = array();
  }
}