Permalink
Browse files

Redirect to portal.php when detecting incorrect announcement parameter

  • Loading branch information...
1 parent 361fc24 commit f97fad470a6da14534a07b1d902502f0a2efe8c0 @marc1706 marc1706 committed Apr 12, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 root/portal/modules/portal_announcements.php
@@ -280,6 +280,16 @@ public function get_template_center($module_id)
// 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);

0 comments on commit f97fad4

Please sign in to comment.