Skip to content
Snippets Groups Projects
Commit ad0401f8 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- improved the watchdog messages
parent f5be5fdf
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -49,16 +49,16 @@ function queue_vote($node, $vote) { ...@@ -49,16 +49,16 @@ function queue_vote($node, $vote) {
if (variable_get("queue_threshold_post", 3) <= $node->score) { if (variable_get("queue_threshold_post", 3) <= $node->score) {
node_save($node, array_merge(array("nid", "moderate" => 0), module_invoke($node->type, "save", "approve", $node))); node_save($node, array_merge(array("nid", "moderate" => 0), module_invoke($node->type, "save", "approve", $node)));
watchdog("special", "moderation: posted '$node->title'"); watchdog("special", "moderation: approved '$node->title'");
} }
else if (variable_get("queue_threshold_dump", -2) >= $node->score) { else if (variable_get("queue_threshold_dump", -2) >= $node->score) {
if ($node->revisions) { if ($node->revisions) {
node_revision_rollback($node, end(node_revision_list($node))); node_revision_rollback($node, end(node_revision_list($node)));
watchdog("special", "moderation: dumped '$node->title' (rollback)"); watchdog("special", "moderation: declined '$node->title' (rollback)");
} }
else { else {
node_save($node, array_merge(array("nid", "moderate" => 0), module_invoke($node->type, "save", "decline", $node))); node_save($node, array_merge(array("nid", "moderate" => 0), module_invoke($node->type, "save", "decline", $node)));
watchdog("special", "moderation: dumped '$node->title'"); watchdog("special", "moderation: declined '$node->title'");
} }
} }
else if (variable_get("queue_threshold_expire", 6) <= $node->votes) { else if (variable_get("queue_threshold_expire", 6) <= $node->votes) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment