Commit 5d5b285d authored by Gábor Hojtsy's avatar Gábor Hojtsy

#174220 by webernet: fix noticed in node module when a user has no adminiter nodes permission

parent 5566f740
......@@ -810,7 +810,7 @@ function node_save(&$node) {
// Only store the log message if there's something to store; this prevents
// existing log messages from being unintentionally overwritten by a blank
// message. A new revision will have an empty log message (or $node->log).
$revisions_table_values['log'] = $node->log;
$revisions_table_values['log'] = !empty($node->log) ? $node->log : '';
$revisions_table_types['log'] = "'%s'";
}
$node_table_values = array(
......
......@@ -130,7 +130,7 @@ function node_form(&$form_state, $node) {
// Add a log field if the "Create new revision" option is checked, or if the
// current user has the ability to check that option.
if ($node->revision || user_access('administer nodes')) {
if (!empty($node->revision) || user_access('administer nodes')) {
$form['revision_information'] = array(
'#type' => 'fieldset',
'#title' => t('Revision information'),
......
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