diff --git a/root/portal/block/announcements.php b/root/portal/block/announcements.php index 588eb688..5c10fa9a 100644 --- a/root/portal/block/announcements.php +++ b/root/portal/block/announcements.php @@ -19,7 +19,7 @@ if (!defined('IN_PORTAL')) } $announcement = request_var('announcement', -1); -$announcement = ($announcement > $portal_config['portal_number_of_announcements']) ? -1 : $announcement; +$announcement = ($announcement > $portal_config['portal_number_of_announcements'] -1) ? -1 : $announcement; $start = request_var('ap', 0); $start = ($start < 0) ? 0 : $start; diff --git a/root/portal/block/news.php b/root/portal/block/news.php index 6b5b2b6d..77c4b4c1 100644 --- a/root/portal/block/news.php +++ b/root/portal/block/news.php @@ -21,7 +21,7 @@ if (!defined('IN_PORTAL')) } $news = request_var('news', -1); -$news = ($news > $portal_config['portal_number_of_news']) ? -1 : $news; +$news = ($news > $portal_config['portal_number_of_news'] -1) ? -1 : $news; $user->add_lang('viewforum'); $start = request_var('np', 0); $start = ($start < 0) ? 0 : $start;