From dbdca484c1a5198e9ce5ba3c8a0680b2d265f67d Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Mon, 6 Feb 2006 05:54:17 +0000
Subject: [PATCH] - Patch #48021 by Zen: removed unused variable.

---
 modules/node.module      | 9 ++++++---
 modules/node/node.module | 9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/modules/node.module b/modules/node.module
index 1bbe52f2543d..0706abc1fd26 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1310,7 +1310,8 @@ function node_revision_overview($node) {
 }
 
 /**
- * Revert to the revision with the specified revision number.
+ * Revert to the revision with the specified revision number. A node and nodeapi "update" event is triggered
+ * (via the node_save() call) when a revision is reverted.
  */
 function node_revision_revert($nid, $revision) {
   global $user;
@@ -1320,7 +1321,8 @@ function node_revision_revert($nid, $revision) {
     if ($node->vid) {
       $node->revision = 1;
       $node->log = t('Copy of the revision from %date.', array('%date' => theme('placeholder', format_date($node->revision_timestamp))));
-      $new_node = node_save($node);
+
+      node_save($node);
 
       drupal_set_message(t('%title has been reverted back to the revision from %revision-date', array('%revision-date' => theme('placeholder', format_date($node->revision_timestamp)), '%title' => theme('placeholder', check_plain($node->title)))));
       watchdog('content', t('%type: reverted %title revision %revision.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title), '%revision' => theme('placeholder', $revision))));
@@ -1334,7 +1336,8 @@ function node_revision_revert($nid, $revision) {
 }
 
 /**
- * Delete the revision with specified revision number.
+ * Delete the revision with specified revision number. A "delete revision" nodeapi event is invoked when a
+ * revision is deleted.
  */
 function node_revision_delete($nid, $revision) {
   if (user_access('administer nodes')) {
diff --git a/modules/node/node.module b/modules/node/node.module
index 1bbe52f2543d..0706abc1fd26 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1310,7 +1310,8 @@ function node_revision_overview($node) {
 }
 
 /**
- * Revert to the revision with the specified revision number.
+ * Revert to the revision with the specified revision number. A node and nodeapi "update" event is triggered
+ * (via the node_save() call) when a revision is reverted.
  */
 function node_revision_revert($nid, $revision) {
   global $user;
@@ -1320,7 +1321,8 @@ function node_revision_revert($nid, $revision) {
     if ($node->vid) {
       $node->revision = 1;
       $node->log = t('Copy of the revision from %date.', array('%date' => theme('placeholder', format_date($node->revision_timestamp))));
-      $new_node = node_save($node);
+
+      node_save($node);
 
       drupal_set_message(t('%title has been reverted back to the revision from %revision-date', array('%revision-date' => theme('placeholder', format_date($node->revision_timestamp)), '%title' => theme('placeholder', check_plain($node->title)))));
       watchdog('content', t('%type: reverted %title revision %revision.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title), '%revision' => theme('placeholder', $revision))));
@@ -1334,7 +1336,8 @@ function node_revision_revert($nid, $revision) {
 }
 
 /**
- * Delete the revision with specified revision number.
+ * Delete the revision with specified revision number. A "delete revision" nodeapi event is invoked when a
+ * revision is deleted.
  */
 function node_revision_delete($nid, $revision) {
   if (user_access('administer nodes')) {
-- 
GitLab