diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-11-24 15:10:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-11-24 15:10:36 +0000 |
commit | eb7c5f60b965bb1385a4b209041ae99181fae3f5 (patch) | |
tree | da0ac82db614621e62fc07a5c1ba0db76476f83f /modules/node | |
parent | cd40123540f6b76e93fe3e4d87edba5aafc05018 (diff) | |
download | brdo-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 'modules/node')
-rw-r--r-- | modules/node/node.module | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 6b0dd88fe..b0e587a8b 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -150,7 +150,7 @@ function node_link($type, $node = 0, $main = 0) { if (module_invoke($node->type, "access", "update", $node)) { $links[] = "<a href=\"module.php?mod=node&op=edit&id=$node->nid\">". t("edit") ."</a>"; } - + if (user_access("administer nodes")) { $links[] = "<a href=\"admin.php?mod=node&op=edit&id=$node->nid\">". t("administer") ."</a>"; } @@ -232,7 +232,7 @@ function node_admin_edit($node) { $output .= "<h3>". t("Edit comments") ."</h3>"; - $result = db_query("SELECT c.cid, c.subject, u.uid, u.name FROM comments c LEFT JOIN users u ON u.uid = c.uid WHERE lid = '". $node["nid"] ."' ORDER BY c.timestamp"); + $result = db_query("SELECT c.cid, c.subject, u.uid, u.name FROM comments c LEFT JOIN users u ON u.uid = c.uid WHERE lid = '$node->nid' ORDER BY c.timestamp"); $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">"; $output .= " <tr><th>title</th><th>author</th><th colspan=\"3\">operations</th></tr>"; @@ -474,6 +474,7 @@ function node_validate($node, $error = array()) { $node = node_object($node); + /* ** Validate the title field: */ @@ -756,6 +757,14 @@ function node_submit($node) { $node = node_validate($node); /* + ** Apply the filters: + */ + + $node->teaser = filter($node->teaser); + $node->title = filter($node->title); + $node->body = filter($node->body); + + /* ** Create a new revision when required: */ |