Commit 96eb9c6f authored by Steven Wittens's avatar Steven Wittens
Browse files

#18226: Non-admins were not obeying workflow.

parent d16e18f9
......@@ -1255,7 +1255,7 @@ function node_validate($node) {
// Validate for normal users:
$node->uid = $user->uid ? $user->uid : 0;
// Force defaults in case people modify the form:
$node_options = variable_get('node_options_'. $edit->type, array('status', 'promote'));
$node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));
$node->status = in_array('status', $node_options);
$node->moderate = in_array('moderate', $node_options);
$node->promote = in_array('promote', $node_options);
......
......@@ -1255,7 +1255,7 @@ function node_validate($node) {
// Validate for normal users:
$node->uid = $user->uid ? $user->uid : 0;
// Force defaults in case people modify the form:
$node_options = variable_get('node_options_'. $edit->type, array('status', 'promote'));
$node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));
$node->status = in_array('status', $node_options);
$node->moderate = in_array('moderate', $node_options);
$node->promote = in_array('promote', $node_options);
......
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