Author |
Topic |
SiSL
Average Member
Turkey
671 Posts |
Posted - 19 January 2011 : 11:55:27
|
Greetings,
Here is a bug found in latest version (including current boards), my board was 3.4.05 and it also has this... So I think it covers all versions...
1. Post a Topic to a Moderated Forum as normal user (like me)...
It does not show on "default.asp" as "Last Post" (so far so good). It does not update Last Topic / Last Reply / Last Post on Forum table...
2. Now "update" this topic (without being approved by mod) and then logout...
Voila, now it shows as "new topic" on default.asp (Board listing) and also updates "FORUM_FORUM" as last post...
3. Now delete this post... No, it still shows as latest post on board listings...
I did a testing on Announcements here, showing my post as last post... So I'm not familiar with a lot on post post options, so help me out here...
|
CHIP Online Forum
My Mods Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
|
Edited by - SiSL on 19 January 2011 12:03:29 |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
Posted - 19 January 2011 : 17:15:38
|
Okay, here what looks to me suspicious: post_info.asp Line 652
if Moderation = "No" or Topic_Status < 2 then
'## Forum_SQL - Update count of replies to a topic in Forum table
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_COUNT = F_COUNT - " & intResetCount
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
strSql = strSql & " F_TOPICS = F_TOPICS - 1 "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
end if
strSql = "UPDATE " & strTablePrefix & "FORUM SET "
'if strLast_Post <> "" then
strSql = strSql & "F_LAST_POST = '" & strLast_Post & "'"
'if strLast_Post_Author <> "" then
strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author
'end if
'end if
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & strLast_Post_Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & strLast_Post_Reply_ID
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
Should Red part be inside previous end if or should we write another End if for various scenerios?
|
CHIP Online Forum
My Mods Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
|
Edited by - SiSL on 19 January 2011 17:26:26 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 19 January 2011 : 20:06:14
|
Problem is around line 500, in these two lines:
AutoApprove = "No"
Moderation = "No"
This because moderation is then checked, but only for topic moves. Moderation is never checked for topics that aren't moved. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
SiSL
Average Member
Turkey
671 Posts |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 19 January 2011 : 20:10:50
|
Probably if you change the code in this area to this:
'## if the forum we are moving to doesn't have MODERATION, and this topic did have that
'## we are going to have to auto-approve the topic !
if Forum_ID <> cLng(aryForum(1)) then
blnTopicMoved = True
AutoApprove = "No"
Moderation = "No"
strSql = "SELECT " & strTablePrefix & "FORUM.F_MODERATION "
strSql = strsql & " FROM " & strTablePrefix & "FORUM "
It may fix it. Those two variables are just to be used on moved topics, but it may be possible that only the one that sets a value for moderation needs moving.
Test it and see if it works. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
SiSL
Average Member
Turkey
671 Posts |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
Topic |
|