function revisioning_create_pending_revision_action in Revisioning 6.3
Implementation of create_pending_revision_action.
1 call to revisioning_create_pending_revision_action()
- revisioning_rules_action_create_pending_revision in ./
revisioning.rules.inc - Action: create pending revision.
File
- ./
revisioning_triggers_actions.inc, line 139 - Triggers and actions supported by the revisioning module.
Code
function revisioning_create_pending_revision_action(&$node, $context = array()) {
if ($node->is_new || empty($node->nid)) {
return;
}
$type = node_get_types('name', $node->type);
watchdog('revisioning', 'Executing create_pending_revision_action for @type %title', array(
'@type' => $type,
'%title' => $node->title,
), WATCHDOG_NOTICE, l(t('view'), "node/{$node->nid}"));
// Create a new revision upon saving and subject it to moderation (pending)
$node->revision = TRUE;
$node->revision_moderation = TRUE;
}