summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-07 05:55:41 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-07 05:55:41 +0000
commitcf2f3059f27465b759c1429fe6ebf0fa0305b757 (patch)
tree9c754e4e08f50d5e9c5a358e2d6669daf0116bd1 /modules
parent235d9a7e4a00ed26785042824abc0e10dc874e90 (diff)
downloadbrdo-cf2f3059f27465b759c1429fe6ebf0fa0305b757.tar.gz
brdo-cf2f3059f27465b759c1429fe6ebf0fa0305b757.tar.bz2
#83288 by chx and pwolanin. Remove a redundant access check.
Diffstat (limited to 'modules')
-rw-r--r--modules/node/node.module20
1 files changed, 6 insertions, 14 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index a8c52d313..087ff7f01 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2162,22 +2162,14 @@ function node_form_submit($form_id, $form_values) {
// Prepare the node's body:
if ($node->nid) {
- // Check whether the current user has the proper access rights to
- // perform this operation:
- if (node_access('update', $node)) {
- node_save($node);
- watchdog('content', t('@type: updated %title.', array('@type' => t($node->type), '%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid));
- drupal_set_message(t('The %post has been updated.', array ('%post' => node_get_types('name', $node))));
- }
+ node_save($node);
+ watchdog('content', t('@type: updated %title.', array('@type' => t($node->type), '%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid));
+ drupal_set_message(t('The %post has been updated.', array ('%post' => node_get_types('name', $node))));
}
else {
- // Check whether the current user has the proper access rights to
- // perform this operation:
- if (node_access('create', $node)) {
- node_save($node);
- watchdog('content', t('@type: added %title.', array('@type' => t($node->type), '%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
- drupal_set_message(t('Your %post has been created.', array ('%post' => node_get_types('name', $node))));
- }
+ node_save($node);
+ watchdog('content', t('@type: added %title.', array('@type' => t($node->type), '%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
+ drupal_set_message(t('Your %post has been created.', array ('%post' => node_get_types('name', $node))));
}
if ($node->nid) {
if (node_access('view', $node)) {