Commit e17490b6 authored by Steven Wittens's avatar Steven Wittens
Browse files

- #12401: Non-admins should obey workflow wrt revisions.

parent d7588e45
......@@ -1218,9 +1218,6 @@ function node_validate($node) {
form_set_error('changed', t('This content has been modified by another user, unable to save changes.'));
}
// Create a new revision when required.
$node = node_revision_create($node);
if (user_access('administer nodes')) {
// Set up default values, if required.
if (!$node->created) {
......@@ -1266,6 +1263,9 @@ function node_validate($node) {
unset($node->created);
}
// Create a new revision when required.
$node = node_revision_create($node);
// Do node-type-specific validation checks.
node_invoke($node, 'validate');
node_invoke_nodeapi($node, 'validate');
......
......@@ -1218,9 +1218,6 @@ function node_validate($node) {
form_set_error('changed', t('This content has been modified by another user, unable to save changes.'));
}
// Create a new revision when required.
$node = node_revision_create($node);
if (user_access('administer nodes')) {
// Set up default values, if required.
if (!$node->created) {
......@@ -1266,6 +1263,9 @@ function node_validate($node) {
unset($node->created);
}
// Create a new revision when required.
$node = node_revision_create($node);
// Do node-type-specific validation checks.
node_invoke($node, 'validate');
node_invoke_nodeapi($node, 'validate');
......
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