diff options
Diffstat (limited to 'modules/node.module')
-rw-r--r-- | modules/node.module | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/node.module b/modules/node.module index 6b0dd88fe..b0e587a8b 100644 --- a/modules/node.module +++ b/modules/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: */ |