• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Message posted notification link bug and the solution

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have already written once (unfortunately after the forum crash the message is gone), that the notification link does not work if there was more than 15 answers, and I see it is now fixed, but there is still two problems with this link. First problem is that it will always point to the one message before the last one. It is not a problem for most of the posts, but it does not work for the first reply in a new page. It will point to the last reply on one page before that. Here is what i have changed in order to fix it:

first in PostAction


instead of



the reason for that is that we need to increase the totalReplies before we call the notifyUsers, because we want to notify about the latest post that just came.

secondly it will not work exactly for the 15th (postPerPage) reply . in TopicSpammer there should be



instead of



because if totalReplies is equal to postPerPage, it already goes to the new page. 15th reply is a 16th message in the topic.

best regards,

Marcin
[originally posted on jforum.net by marcinn]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Added to the cvs.

Thank you for the help!

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic