summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-03-06 10:57:53 +0000
committerDries Buytaert <dries@buytaert.net>2004-03-06 10:57:53 +0000
commit744405e3169a40d24da40b9f4b23769d91649fd0 (patch)
tree7b40a245c9c2a74c6270544f8af8ffd6c7bf0cb0 /modules/node.module
parent76192f667d09f2b84dc9eb5ade3b77d7079c01c5 (diff)
downloadbrdo-744405e3169a40d24da40b9f4b23769d91649fd0.tar.gz
brdo-744405e3169a40d24da40b9f4b23769d91649fd0.tar.bz2
- Patch 6140 by Goba: fix the 'read more'-link behavior.
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/node.module b/modules/node.module
index c822c7b1d..71cfee864 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -494,6 +494,7 @@ function node_view($node, $main = 0, $page = 0) {
}
function node_prepare($node, $main = 0) {
+ $node->readmore = (strlen($node->teaser) < strlen($node->body));
if ($main == 0) {
$node->body = check_output($node->body);
}
@@ -597,7 +598,7 @@ function node_link($type, $node = 0, $main = 0) {
$links = $node->links;
}
- if ($main == 1 && $node->teaser && strlen($node->teaser) != strlen($node->body)) {
+ if ($main == 1 && $node->teaser && $node->readmore) {
$links[] = l(t('read more'), "node/view/$node->nid", array('title' => t('Read the rest of this posting.'), 'class' => 'read-more'));
}