Topic: Double view when pressing [ New posts ]

Found a bug I think smile

If you view a post by pressing the "[ New posts ]"-button, the number-of-views counter will increase two steps instead of one...

Re: Double view when pressing [ New posts ]

Yeah, you're right. What the hell? :)

Edit: I found the error. I always though sending the "Location: blaha" header would result in an immediate redirect to that page. Apparently PHP continues execution of the script. The solution is to just insert an exit; at line 84 in viewtopic.php.

Who knows, maybe there will be a 1.1.2 :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Double view when pressing [ New posts ]

Exactly my thought smile

There's only one update-query in viewtopic: "UPDATE ...topics SET num_views=num_views+1..." Interesting to se what's wrong smile