diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-11-23 17:10:46 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-11-23 17:10:46 +0000 |
commit | f5be5fdfa406db65aaf8c64050b7ed1971a44ec6 (patch) | |
tree | 1758ae72d02cbdbaed8651dc92578d6093f1f2aa /includes | |
parent | dcf8e14a60dc312c0bc43e9e8f25e9106d4c7240 (diff) | |
download | brdo-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 'includes')
-rw-r--r-- | includes/common.inc | 4 | ||||
-rw-r--r-- | includes/theme.inc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index e1f2dcc11..fabee01bf 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -350,10 +350,10 @@ function link_page() { return $links; } -function link_node($node) { +function link_node($node, $main = 0) { foreach (module_list() as $name) { if (module_hook($name, "link")) { - $links = array_merge($links, module_invoke($name, "link", "node", $node)); + $links = array_merge($links, module_invoke($name, "link", "node", $node, $main)); } } diff --git a/includes/theme.inc b/includes/theme.inc index 79fdeb353..60bf86cd0 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -69,8 +69,8 @@ class BaseTheme { else { $output .= check_output($node->body, 1); } - if ($main) { - $output .= "<br />[ ". $this->links(link_node($node)) ." ]"; + if ($links = link_node($node, $main)) { + $output .= "<br />[ ". $this->links($links) ." ]"; } $output .= "<hr />"; |