$can_edit_title broken in forum_edit.php

Message boards : Web interfaces : $can_edit_title broken in forum_edit.php
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile Ananas

Send message
Joined: 27 Jun 06
Posts: 305
Germany
Message 5147 - Posted: 29 Jul 2006, 18:00:32 UTC
Last modified: 29 Jul 2006, 18:05:11 UTC

The feature to block editing of a thread title seems to be broken :

$can_edit_title = ($post->getParentPostID()==0 and $thread_owner->getID()==$logged_in_user->getID());

The bold part seems not to work, I can still edit a thread title when I edit an entry that I added much later.

Maybe that is because parent_post is NULL, which is not the same as 0 for all PHP comparisons. A possible fix should be to use

!($post->getParentPostID()>0)

or just

$post->getParentPostID() (as an implicite boolean expression)

instead of

$post->getParentPostID()==0

��u�
ID: 5147 · Report as offensive

Message boards : Web interfaces : $can_edit_title broken in forum_edit.php

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.