Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Open)
 Bug after deletion of replies?
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SiSL
Average Member

Turkey
671 Posts

Posted - 31 May 2009 :  12:31:16  Show Profile  Visit SiSL's Homepage  Reply with Quote
Greetings,

I was just wondering about pop_delete.asp...

For instance, I have deleted a reply, after reply deletion, it updates forum last topic info...

'## Forum_SQL - Get last_post and last_post_author for Forum
					strSql = "SELECT TOPIC_ID, T_LAST_POST, T_LAST_POST_AUTHOR, T_LAST_POST_REPLY_ID "
					strSql = strSql & " FROM " & strActivePrefix & "TOPICS "
					strSql = strSql & " WHERE FORUM_ID = " & Forum_ID & " "
					strSql = strSql & " ORDER BY T_LAST_POST DESC"


I feel there is something itchy there, it updates last topic even if they are not moderated yet, therefor allow people / bots try to go to an unmoderated topic from default.asp. It does not check Last Topic Status so...

So, I was thinking if it is okay to add " AND T_STATUS = 1" code there... By doing this, even though Admins/mods may not see "latest unmoderated" in main forum list, but users & bots (which are majority) will not be directed to a topic they will not see...

To Reproduce:
- Start two Topics (as user) to a First Posts Moderated Forum
- Go to the topic you started as first as admin and open it to posting. (The latest date one should be still unmoderated)
- Post a reply to first topic as user
- Delete reply
- Go to default.asp to check which topic is shown latest

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 31 May 2009 12:53:25

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 31 May 2009 :  16:15:59  Show Profile  Visit HuwR's Homepage
your logic is flawed, if someone has replied to a ' a First Posts Moderated Forum' then the first post must have been moderated otherwise the user would not have been able to reply since they would not be able to see the topic.
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 31 May 2009 :  16:29:09  Show Profile  Visit SiSL's Homepage
I could not tell what I meant I guess.

Reply is a post to "open" topic, not "unmoderated" topic.

Two topics on a forum that has moderation:
Topic A: Unmoderated Newer dateTopic
Topic B: Approved Topic but older date, both had no replies.

Topic B (which is open to posting) receives a reply. You delete the reply (or user deletes it himself)

Final result: Topic A still unmoderated/waiting, Topic B still open but no replies left. (Naturally)

However: After deletion, default.asp shows link to Topic A (due to being newest post but which is still unmoderated, so it should not) instead of latest open/approved topic (or latest reply)

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 31 May 2009 16:59:38
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 31 May 2009 :  17:00:07  Show Profile  Visit HuwR's Homepage
ok, I see what you mean now, sorry for the confusion
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 May 2009 :  17:29:28  Show Profile  Send ruirib a Yahoo! Message
I guess your proposed solution should work.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 31 May 2009 :  21:13:36  Show Profile  Visit SiSL's Homepage
Thanks guys, that was quickest solution I can came up with, without having to get deeper into.

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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07