I found a minor bug on the forums, when you delete the last post on a topic that has a poll using the delete button at the bottom of the post the poll is not deleted... The solution for this add the following code on delete_post.asp:
If rsTopicDelete("Poll_ID") > 0 Then
'Delete the Poll choices
strSQL = "DELETE FROM " & strDbTable & "PollChoice WHERE " & strDbTable & "PollChoice.Poll_ID=" & rsTopicDelete("Poll_ID") & ";"
'Write to database
adoCon.Execute(strSQL)
'Delete the Poll
strSQL = "DELETE FROM " & strDbTable & "Poll WHERE " & strDbTable & "Poll.Poll_ID=" & rsTopicDelete("Poll_ID") & ";"
'Write to database
adoCon.Execute(strSQL)
End If |
right next to these lines:
'If there are no more threads in the database for the topic then delete the topic from the database
Else |
sorry I can't post the exact line # but I've modded my forums a lot and it would be different...