Found bug: "Deleting just any posts in this board is not allowed"

Started by Kazakh, February 15, 2005, 09:48:05 PM

Previous topic - Next topic

Kazakh

After I upgraded from RC1 to RC2, my users couldn't delete other people's messages inside their topics anymore. They got the error: "Deleting just any posts in this board is not allowed", even though they had this permission set by both the board, and their user group. I double-checked that, by viewing their profile -> "Show Permissions":
remove_replies
Delete replies to own topics    Given by: Junior Member
Boards: All

This bug is also present in 1.0.1.

I fixed (temporarily patched?) this bug, by going into RemoveTopic.php's function removeMessage, and changing some code back:

This is how it was in RC1 (it works):
if (!$remove_own)
{
   $remove_replies = boardsAllowedTo('remove_replies');
   $remove_replies = in_array(0, $remove_replies) || in_array($row['ID_BOARD'], $remove_replies);
}

This is how it is in RC2 and 1.0.1 (has the bug):
$remove_replies = boardsAllowedTo('remove_replies');
$remove_replies = in_array(0, $remove_replies) || in_array($row['ID_BOARD'], $remove_replies);

I hope someone checks this out! :)

ago-stino

I agree.

I'm trying to set up a board where people can post their resumes.  They should be able to delete replies on their topic, because this is serious stuff.  All the other boards in my forum are set up so people cannot delete other replies. But in that board they must have this possibility.
I wanted also they be able to lock their topic, in case they didn't want comments on their resumes. Ok. This works. They can lock their topics. But they can delete other replies only if I set also (I'm talking about local permission, here, obviously) "can delete any other post"; but in this way everybody can delete every post, no matter where in the board.

Now I'll try to apply the fix suggested by Kazakhstan Coder.

bye

ago-stino



wait a minute... RemoveTopic.php .it's already fixed.  What's wrong then? D..n

Mayeb it has something  to do with the "permission by member MOD" that installed?
http://3d-wip.org [nofollow]

Advertisement: