From f97fad470a6da14534a07b1d902502f0a2efe8c0 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 12 Apr 2012 20:01:50 +0200 Subject: [PATCH] Redirect to portal.php when detecting incorrect announcement parameter --- root/portal/modules/portal_announcements.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/root/portal/modules/portal_announcements.php b/root/portal/modules/portal_announcements.php index d18af653..954cc550 100644 --- a/root/portal/modules/portal_announcements.php +++ b/root/portal/modules/portal_announcements.php @@ -280,6 +280,16 @@ class portal_announcements_module // Show "read full" page { $i = $announcement; + + /** + * redirect to portal page if the specified announcement does not exist + * force #top anchor in order to get rid of the #a anchor + */ + if (!isset($fetch_news[$i])) + { + redirect(append_sid($phpbb_root_path . 'portal.' . $phpEx, '#top')); + } + $forum_id = $fetch_news[$i]['forum_id']; $topic_id = $fetch_news[$i]['topic_id']; $topic_tracking_info = get_complete_topic_tracking($forum_id, $topic_id, $global_announce_list = false);