diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-03 19:40:29 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-03 19:40:29 +0000 |
commit | db9235267121c6559e99668f9b1b58b0b235b7da (patch) | |
tree | d1083d3007bed77fa696d0554f7937937a488443 | |
parent | 590e2d8e5f05ab205dadc07f522b9c5c89785419 (diff) | |
download | brdo-db9235267121c6559e99668f9b1b58b0b235b7da.tar.gz brdo-db9235267121c6559e99668f9b1b58b0b235b7da.tar.bz2 |
- Patch #43032 by Steve Dondley: critical fix: can't update nodes by anonymous users.
-rw-r--r-- | modules/node.module | 2 | ||||
-rw-r--r-- | modules/node/node.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/node.module b/modules/node.module index 6b033e372..06130581e 100644 --- a/modules/node.module +++ b/modules/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); 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); |