PDA

View Full Version : [fixed] postings.php error when splitting threads and deleting posts


Paul
Mon 23rd Sep '02, 6:51pm
Another problem with postings.php:

When splitting a thread, the usernames of guests are not displayed. Only the usernames of registered users.

It appears $post[username] isn't grabbing all the names for some reason. I suppose this is insignificant as I can't think of an instance in which a moderator would want to split a thread with guests posting in it. :rolleyes:

Paul

Edit: While, I'm not sure, it appears the problem is within the query:

$posts=$DB_site->query("SELECT post.*,user.* FROM post LEFT JOIN user ON user.userid=post.userid WHERE post.threadid='$threadid' ORDER BY dateline");


It looks like that's only grabbing usernames that are in the user table.

Scott MacVicar
Mon 23rd Sep '02, 7:30pm
Paul no need to take offence to it, that is an actual bug which could happen.

What you were 'experiencing' was the users fault, they logged out then hit back or simply changed login which would change the sessionid. It would also be impossible to fix as the form would have to be changed to a GET request and not a POST.

I also noticed a similar issue will happen if you select delete thread from the admin select and then click the selectively delete posts options.