summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-11-23 17:10:46 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-11-23 17:10:46 +0000
commitf5be5fdfa406db65aaf8c64050b7ed1971a44ec6 (patch)
tree1758ae72d02cbdbaed8651dc92578d6093f1f2aa /modules/node.module
parentdcf8e14a60dc312c0bc43e9e8f25e9106d4c7240 (diff)
downloadbrdo-f5be5fdfa406db65aaf8c64050b7ed1971a44ec6.tar.gz
brdo-f5be5fdfa406db65aaf8c64050b7ed1971a44ec6.tar.bz2
- 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.
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/node.module b/modules/node.module
index 0a587fe50..f2ab82bbc 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -88,7 +88,6 @@ function node_filter_link($text) {
}
function node_filter_line($text) {
-
/*
** If HTML mark-up is being used, strip regular mark-up:
*/
@@ -129,7 +128,7 @@ function node_filter($text) {
return node_filter_line($text);
}
-function node_link($type, $node = 0) {
+function node_link($type, $node = 0, $main = 0) {
if ($type == "admin" && user_access("administer nodes")) {
$links[] = "<a href=\"admin.php?mod=node\">content management</a>";
@@ -140,12 +139,11 @@ function node_link($type, $node = 0) {
}
if ($type == "node") {
-
if ($node->links) {
$links = $node->links;
}
- if ($node->teaser != $node->body) {
+ if ($node->teaser != $node->body && $main) {
$links[] = "<a href=\"node.php?id=". $node->nid ."\">". t("read more") ."</a>";
}