summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-11-04 23:30:39 +0000
committerDries Buytaert <dries@buytaert.net>2001-11-04 23:30:39 +0000
commitf88cfaa2dd205846843068175931e68c582bb037 (patch)
treed0a84e2bd55b49e5ad25f0c87ab8730ca3a701f3 /modules/node.module
parent4af6c9d2dc8b7360faf2fd18c7d39d179d69da57 (diff)
downloadbrdo-f88cfaa2dd205846843068175931e68c582bb037.tar.gz
brdo-f88cfaa2dd205846843068175931e68c582bb037.tar.bz2
- Another batch of updates. The most important bit is that the moderation
queue should be functional again. It's not ready yet but I'll be tuning it for the next two evenings or so.
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module16
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/node.module b/modules/node.module
index bc1697b7b..26d40dc08 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -237,6 +237,11 @@ function node_admin_nodes() {
function node_revision_create($node) {
global $user;
+ /*
+ ** 'revision' is the name of the field used to indicicate that we
+ ** have to create a new revision of a node.
+ */
+
if ($node->nid && $node->revision) {
$prev = node_load(array("nid" => $node->nid));
$node->revisions = $prev->revisions;
@@ -290,14 +295,21 @@ function node_revision_rollback($nid, $revision) {
node_save($rev, $filter);
- watchdog("message", "node: rolled-back '$node->title'");
+ watchdog("special", "node: rollbacked to revision #$revision of '$node->title'");
}
function node_revision_delete($nid, $revision) {
$node = node_load(array("nid" => $nid));
unset($node->revisions[$revision]);
+
node_save($node, array("nid", "revisions"));
+
+ watchdog("special", "node: removed revision #$revision of '$node->title'");
+}
+
+function node_revision_previous($node) {
+ return end(array_keys($node->revisions));
}
function node_admin() {
@@ -670,6 +682,7 @@ function node_submit($node) {
node_save($node, array_merge($fields, module_invoke($node->type, "save", $node)));
+ watchdog("special", "node: updated '$node->title'");
$output = t("The node has been updated.");
}
else {
@@ -701,6 +714,7 @@ function node_submit($node) {
node_save($node, array_merge($fields, module_invoke($node->type, "save", $node)));
+ watchdog("special", "node: added '$node->title'");
$output = t("Thanks for your submission.");
}
else {