summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-02-06 05:54:17 +0000
committerDries Buytaert <dries@buytaert.net>2006-02-06 05:54:17 +0000
commitdbdca484c1a5198e9ce5ba3c8a0680b2d265f67d (patch)
treed2e133e003d7a8135356fe20fef197e26b87ac8f /modules/node
parentcce18287a6a3083303ec97085e67133b1f514e82 (diff)
downloadbrdo-dbdca484c1a5198e9ce5ba3c8a0680b2d265f67d.tar.gz
brdo-dbdca484c1a5198e9ce5ba3c8a0680b2d265f67d.tar.bz2
- Patch #48021 by Zen: removed unused variable.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.module9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 1bbe52f25..0706abc1f 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')) {