From db9235267121c6559e99668f9b1b58b0b235b7da Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 3 Jan 2006 19:40:29 +0000 Subject: - Patch #43032 by Steve Dondley: critical fix: can't update nodes by anonymous users. --- modules/node/node.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 6b033e372..06130581e 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1657,7 +1657,7 @@ function node_form($node) { if (user_access('administer nodes')) { // Node author information $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 20); - $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#required' => TRUE, '#default_value' => $node->name, '#weight' => -1); + $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#required' => TRUE, '#default_value' => $node->name ? $node->name : variable_get('anonymous', 'Anonymous'), '#weight' => -1); $form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#required' => TRUE, '#default_value' => $node->date); -- cgit v1.2.3