Author |
Topic |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 09 March 2006 : 05:16:38
|
Not a bug, per se, which is why I'm posting here rather than the bug reports forum but, when jumping to the last post in an archive, the code in topic.asp (line 273) that redirects to the correct page when whichpage=-1 redirects to the live topic which then requires an additional redirect to the archived topic when the live topic isn't found in the database (line 162).
To get around this, find the following on line 273 of topic.asp:Response.Redirect("topic.asp?" & strwhichpage & "TOPIC_ID=" & Topic_ID & "#" & LastPostReplyID & "") And replace it with the following:Response.Redirect("topic.asp?" & ArchiveLink & strwhichpage & "TOPIC_ID=" & Topic_ID & "#" & LastPostReplyID & "") It's a trifling issue but saves the processing of 162 lines of code
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 09 March 2006 05:31:01 |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 09 March 2006 : 05:30:26
|
Also, just spotted that there is no check made to see if the value of the REPLY_ID variable passed through the querystring is numeric. This would cause problems on lines 233 and 260 of topic.asp when that variable is passed through the clng function.
To add the check, find the following on line 202 of topic.asp:if mypage = -1 and Request.QueryString("REPLY_ID") <> "" then And replace it with the following:if mypage = -1 and Request.QueryString("REPLY_ID") <> "" and isNumeric(Request.QueryString("REPLY_ID")) then < |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 25 August 2006 : 04:57:52
|
Shaggy if the reply id is not numeric, what happens then? Seems to me your code changes would continue the rest of the script. So the check would need to be higher up.
Just bumping this so I can come back to it later.< |
Support Snitz Forums
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 August 2006 : 05:17:42
|
I'll have look at that later on today
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 August 2006 : 06:26:34
|
Davio, that shouldn't be an issue using this code; if the REPLY_ID in the quesrystring is not numeric, it's ignored and it jumps to the last reply in the topic instead. In fact, if you're using that code, you can ignore both these changes completely.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 25 August 2006 06:28:00 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 25 August 2006 : 08:49:47
|
Oh ok. You have code all over the place contradicting with one another! < |
Support Snitz Forums
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 August 2006 : 08:50:46
|
Confusing l'il git, ain't I?!
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
|
Topic |
|