Commit 3528f79e authored by Kjartan's avatar Kjartan
Browse files

- Readding queue message on node add removed in rev 1.86.

  Uses drupal_set_message() so the message doesn't interfeer with non-HTML
  formats (posting using blog API etc).
parent 016a8f68
......@@ -242,16 +242,28 @@ function queue_block($op = "list", $delta = 0) {
function queue_nodeapi(&$node, $op, $arg = 0) {
switch ($op) {
case "fields":
return array("score", "users", "votes");
case "validate":
case 'fields':
return array('score', 'users', 'votes');
case 'validate':
if ($node->nid && $node->moderate) {
// Reset votes when node is updated:
$node->score = 0;
$node->users = "";
$node->users = '';
$node->votes = 0;
}
break;
}
case 'insert':
case 'update':
if ($node->moderate && user_access("access submission queue")) {
drupal_set_message(t('The post is queued for approval. You can check the votes in the <a href="%queue">submission queue</a>.', array('%queue' => url('queue'))));
}
else if ($node->moderate) {
drupal_set_message(t('The post is queued for approval. The editors will decide whether it should be published.'));
}
else {
drupal_set_message(t('The post is published.'));
}
break;
}
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment