Disable the automatic creation of node revisions for non administrators

This commit is contained in:
Manuel Cillero 2017-07-26 08:50:52 +02:00
parent d1fe5dac3b
commit e76acf63f2

View file

@ -683,9 +683,9 @@ function book_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
break; break;
case 'presave': case 'presave':
// Always save a revision for non-administrators. // Always save a revision for non-administrators.
if (!empty($node->book['bid']) && !user_access('administer nodes')) { # if (!empty($node->book['bid']) && !user_access('administer nodes')) {
$node->revision = 1; # $node->revision = 1;
} # }
// Make sure a new node gets a new menu link. // Make sure a new node gets a new menu link.
if (empty($node->nid)) { if (empty($node->nid)) {
$node->book['mlid'] = NULL; $node->book['mlid'] = NULL;