From 63eccc5ebbf8cb794df909efc212fb0bae86071b Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Thu, 29 Jan 2004 22:00:31 +0000 Subject: - Modified node and comments to not be marked as new when they are 30 days old. --- modules/node/node.module | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 83b559ac4..b966bec09 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1,6 +1,8 @@ uid' AND nid = %d", $nid)); - return ($history->timestamp ? $history->timestamp : 0); + return ($history->timestamp ? $history->timestamp : NODE_NEW_LIMIT); } /** * Determines whether the supplied timestamp is newer than the user's last view * of a given node * - * @param $nid node-id twhose history supplies the 'last viewed' timestamp - * @param $timestamp time which is compared against node's 'last veiwed' + * @param $nid node-id whose history supplies the 'last viewed' timestamp + * @param $timestamp time which is compared against node's 'last viewed' * timestamp */ function node_is_new($nid, $timestamp) { @@ -130,12 +136,7 @@ function node_is_new($nid, $timestamp) { } } - if ($timestamp > $cache[$nid]) { - return 1; - } - else { - return 0; - } + return ($timestamp > $cache[$nid] && $timestamp > NODE_NEW_LIMIT); } function node_teaser($body) { -- cgit v1.2.3