Menu

#71 Wrong topic page when navigating from the page forums/list.page

Fixed
templates (2)
High
templates/default/forum_list.htm
Defect
2017-04-04
2017-03-27
yamitunia
No
--- /src/main/java/net/jforum/view/forum/ForumAction.java
+++ /src/main/java/net/jforum/view/forum/ForumAction.java
@@ -87,6 +87,7 @@

        this.context.put("allCategories", ForumCommon.getAllCategoriesAndForums(true));
        this.context.put("topicsPerPage", Integer.valueOf(SystemGlobals.getIntValue(ConfigKeys.TOPICS_PER_PAGE)));
+       this.context.put("postsPerPage", Integer.valueOf(SystemGlobals.getIntValue(ConfigKeys.POSTS_PER_PAGE)));
        this.context.put("rssEnabled", SystemGlobals.getBoolValue(ConfigKeys.RSS_ENABLED));

        this.context.put("totalMessages", Integer.valueOf(ForumRepository.getTotalMessages()));

--- /src/main/resources/templates/default/forum_list.htm
+++ /src/main/resources/templates/default/forum_list.htm
@@ -79,8 +79,8 @@
                                <#if (lpi.userId > 0)><a href="${JForumContext.encodeURL("/user/profile/${lpi.userId}")}"></#if>${lpi.username}</a><br />

                                <#assign startPage = ""/>
-                               <#if (lpi.topicReplies + 1 > topicsPerPage)>
-                                   <#assign startPage = ((lpi.topicReplies / topicsPerPage)?int * topicsPerPage) +"/"/>
+                               <#if (lpi.topicReplies + 1 > postsPerPage)>
+                                   <#assign startPage = ((lpi.topicReplies / postsPerPage)?int * postsPerPage) +"/"/>
                                </#if>

                                <#assign url = JForumContext.encodeURL("/posts/list/${startPage}${lpi.topicId}") + "#p" + lpi.postId/>

Related

Wiki: NewFeatures250

Discussion

  • Ulf Dittmer

    Ulf Dittmer - 2017-03-27

    Fix checked in. Thanks for the report!

     
  • Ulf Dittmer

    Ulf Dittmer - 2017-03-27
    • status: New --> Fixed
     
  • Ulf Dittmer

    Ulf Dittmer - 2017-04-04
    • assigned_to: Ulf Dittmer
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.