From dcf8e14a60dc312c0bc43e9e8f25e9106d4c7240 Mon Sep 17 00:00:00 2001 From: natrak <> Date: Fri, 23 Nov 2001 17:10:45 +0000 Subject: - modified node_save so that revisions are not validated using check_input, as this breaks revisions. - modified link_node() to take a third parameter $main, which will be passed on to _link hooks. This lets modules decide which links a node will get when shown on the main page, or when not. - updated themes to use the new syntax. --- includes/node.inc | 4 ++-- themes/goofy/goofy.theme | 4 ++-- themes/trillian/trillian.theme | 11 ++++++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/includes/node.inc b/includes/node.inc index a020cb724..bbfd8e5d6 100644 --- a/includes/node.inc +++ b/includes/node.inc @@ -194,9 +194,9 @@ function node_save($node, $filter) { // prepare the query: foreach ($node as $key => $value) { if (in_array($key, $fields)) { - $q[] = check_query($key) ." = '". check_input($value) ."'"; + $q[] = check_query($key) ." = '". ($key != "revisions" ? check_input($value) : $value) ."'"; // NOTE: for the values we use 'check_input()' such that we apply - // the filters + // the filters, except revisions } } diff --git a/themes/goofy/goofy.theme b/themes/goofy/goofy.theme index c2ac85a82..a0f23d66e 100644 --- a/themes/goofy/goofy.theme +++ b/themes/goofy/goofy.theme @@ -117,8 +117,8 @@ function c(subject,mod,author,date,body) {document.writeln("body, 1); } - if ($main) { - $body .= "
[ " . $this->links(link_node($node)) . " ]
"; + if ($links = link_node($node, $main)) { + $body .= "
[ " . $this->links($links) . " ]
"; } print "\n"; diff --git a/themes/trillian/trillian.theme b/themes/trillian/trillian.theme index 210b52950..8cd4ee3b1 100644 --- a/themes/trillian/trillian.theme +++ b/themes/trillian/trillian.theme @@ -1,4 +1,5 @@ body, 1); ?>
>>> links($links); ?> @@ -67,6 +68,14 @@
title); ?>
created)); ?>
body, 1); ?>
+
>>> + links($links); + } + ?> +