summaryrefslogtreecommitdiff
path: root/includes/node.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-11-24 15:10:36 +0000
committerDries Buytaert <dries@buytaert.net>2001-11-24 15:10:36 +0000
commiteb7c5f60b965bb1385a4b209041ae99181fae3f5 (patch)
treeda0ac82db614621e62fc07a5c1ba0db76476f83f /includes/node.inc
parentcd40123540f6b76e93fe3e4d87edba5aafc05018 (diff)
downloadbrdo-eb7c5f60b965bb1385a4b209041ae99181fae3f5.tar.gz
brdo-eb7c5f60b965bb1385a4b209041ae99181fae3f5.tar.bz2
- Bugfix: when updating a book page, the name of the author did not change.
- Bugfix: the "Edit comments" part of the node administration pages did not display the correct comments. - Bugfix: somethimes, update in a book page would mess up the book. - Improvement: when "node administrators" update a book page through the "update this book page"-link (like regular users do), their update will be subject to moderation. - Improvement: made some intermediate changes to the filter mechanism. Needs more work.
Diffstat (limited to 'includes/node.inc')
-rw-r--r--includes/node.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/node.inc b/includes/node.inc
index bbfd8e5d6..6af45c6d2 100644
--- a/includes/node.inc
+++ b/includes/node.inc
@@ -107,8 +107,8 @@ function node_load($conditions) {
}
/*
- ** Call the node specific callback (if any) and piggy-back to
- ** results to the node:
+ ** Call the node specific callback (if any) and piggy-back the
+ ** results to the node or overwrite some values:
*/
if ($extra = module_invoke($node->type, "load", $node)) {
@@ -156,6 +156,10 @@ function node_save($node, $filter) {
$node->revisions = serialize($node->revisions);
}
+ /*
+ ** Apply filters to some default node fields:
+ */
+
if (empty($node->nid)) {
/*
@@ -170,9 +174,7 @@ function node_save($node, $filter) {
foreach ($node as $key => $value) {
if (in_array($key, $fields)) {
$k[] = check_query($key);
- $v[] = "'". check_input($value) ."'";
- // NOTE: for the values we use 'check_input()' such that we apply
- // the filters
+ $v[] = "'". check_query($value) ."'";
}
}
@@ -194,9 +196,7 @@ function node_save($node, $filter) {
// prepare the query:
foreach ($node as $key => $value) {
if (in_array($key, $fields)) {
- $q[] = check_query($key) ." = '". ($key != "revisions" ? check_input($value) : $value) ."'";
- // NOTE: for the values we use 'check_input()' such that we apply
- // the filters, except revisions
+ $q[] = check_query($key) ." = '". check_query($value) ."'";
}
}