Opened 17 years ago
Last modified 17 years ago
#505 closed Defect
ignore function broken or add and remove users. — at Initial Version
Reported by: | Ageless | Owned by: | davea |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | Web - Forums | Version: | |
Keywords: | forums preferences | Cc: |
Description
Both adding to filter and removing from filter is broken. David did add !'s to the add_to_ignore code, but in [14289] it's still broken. When I tested this on Cosmology@Home by adding users to ignore, or with users already on ignore changing preferences and saving them, the screen would reload and at the top of it it says "Missing user xx", where xx is the user's ID number.
Removing from filter in edit_forum_preferences_action.php is now:
$ignored_users = get_ignored_list($user); for ($i=0;$i<sizeof($ignored_users);$i++){ if ($_POST["remove".trim($ignored_users[$i])]!=""){ $other_user = BoincUser::lookup_id($user_to_add); if (!$other_user) { echo "No such user: $other_user"; } else { remove_ignored_user($user, $other_user); } } }
With help of TJM of Enigma, this should be
$ignored_users = get_ignored_list($user); for ($i=0;$i<sizeof($ignored_users);$i++){ if ($_POST["remove".trim($ignored_users[$i])]!=""){ $other_user = BoincUser::lookup_id($ignored_users[$i]); if (!$other_user) { echo "No such user: $other_user"; } else { remove_ignored_user($user, $other_user); } } }