From 46b09ba6ea8a5f62b3c846042679ef22bc427ac9 Mon Sep 17 00:00:00 2001 From: Ice Date: Sat, 16 Aug 2008 22:18:16 +0000 Subject: [PATCH] CBA TBH --- root/portal/block/announcements.php | 2 +- root/portal/block/news.php | 2 +- root/portal/includes/functions.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/root/portal/block/announcements.php b/root/portal/block/announcements.php index 47a25581..b4316ea1 100644 --- a/root/portal/block/announcements.php +++ b/root/portal/block/announcements.php @@ -112,7 +112,7 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_global_announcements_foru if($announcement < 0) // Show the announcements overview { - $count = sizeof($fetch_news)-1; + $count = $fetch_news['topic_count'] for ($i = 0; $i < $count; $i++) { if( isset($fetch_news[$i]['striped']) && $fetch_news[$i]['striped'] == true ) diff --git a/root/portal/block/news.php b/root/portal/block/news.php index ac34af57..b7dff146 100644 --- a/root/portal/block/news.php +++ b/root/portal/block/news.php @@ -107,7 +107,7 @@ $fetch_news = phpbb_fetch_posts($portal_config['portal_news_forum'], $portal_con if($news < 0) // Show the news overview { - $count = sizeof($fetch_news)-1; + $count = $fetch_news['topic_count']; for ($i = 0; $i < $count; $i++) { if( isset($fetch_news[$i]['striped']) && $fetch_news[$i]['striped'] == true ) diff --git a/root/portal/includes/functions.php b/root/portal/includes/functions.php index ad9e661c..6de7bf05 100644 --- a/root/portal/includes/functions.php +++ b/root/portal/includes/functions.php @@ -351,6 +351,7 @@ function phpbb_fetch_posts($forum_from, $permissions, $number_of_posts, $text_le } $posts['topic_icons'] = max($topic_icons); + $posts['topic_count'] = $i; if( $global_f < 1 ) {