Browse Source

Redirect the user to the url if he accidentally got the the forum which should actually be a link.

sh4nks 10 years ago
parent
commit
a5db362077
1 changed files with 4 additions and 0 deletions
  1. 4 0
      flaskbb/forum/views.py

+ 4 - 0
flaskbb/forum/views.py

@@ -78,6 +78,10 @@ def view_forum(forum_id, slug=None):
     page = request.args.get('page', 1, type=int)
 
     forum, forumsread = Forum.get_forum(forum_id=forum_id, user=current_user)
+
+    if forum.external:
+        return redirect(forum.external)
+
     topics = Forum.get_topics(forum_id=forum.id, user=current_user, page=page,
                               per_page=flaskbb_config["TOPICS_PER_PAGE"])