From 83df57be0f431815624e8b43268991ee716e8395 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 2 May 2008 15:04:10 +0000 Subject: [PATCH] Pre-release: again the function to limit the announcements by age: let's depend it on "topic_time", not "topic_last_post_time". makes more sense to me... --- root/portal/block/announcements.php | 2 +- root/portal/includes/functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/root/portal/block/announcements.php b/root/portal/block/announcements.php index 13a2312a..6b4706f8 100644 --- a/root/portal/block/announcements.php +++ b/root/portal/block/announcements.php @@ -53,7 +53,7 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_global_announcements_foru $forum_from = ( strpos($forum_from, ',') !== FALSE ) ? explode(',', $forum_from) : (($forum_from != '') ? array($forum_from) : array()); $time = ( $portal_config['portal_announcements_day'] == 0 ) ? 0 : $portal_config['portal_announcements_day']; - $post_time = ($time == 0) ? '' : 'AND topic_last_post_time > ' . (time() - $time * 86400); + $post_time = ($time == 0) ? '' : 'AND topic_time > ' . (time() - $time * 86400); $str_where = ''; diff --git a/root/portal/includes/functions.php b/root/portal/includes/functions.php index 02e57c52..2b95c6dc 100644 --- a/root/portal/includes/functions.php +++ b/root/portal/includes/functions.php @@ -77,7 +77,7 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le $posts = array(); - $post_time = ($time == 0) ? '' : 'AND t.topic_last_post_time > ' . (time() - $time * 86400); + $post_time = ($time == 0) ? '' : 'AND t.topic_time > ' . (time() - $time * 86400); $forum_from = ( strpos($forum_from, ',') !== FALSE ) ? explode(',', $forum_from) : (($forum_from != '') ? array($forum_from) : array());