Ticket #505 (closed Defect: fixed)

Opened 2 years ago

Last modified 2 years ago

ignore function broken on add and remove users.

Reported by: Ageless Assigned to: davea
Priority: Minor Milestone: Undetermined
Component: Web - Forums Version:
Keywords: forums preferences Cc:

Description (Last modified by Ageless)

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 my 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); 
        } 
    } 
}

Change History

11/22/07 15:14:40 changed by Ageless

  • description changed.

11/22/07 15:15:24 changed by Ageless

  • summary changed from ignore function broken or add and remove users. to ignore function broken on add and remove users..

fixing title.

11/22/07 16:19:50 changed by davea

  • status changed from new to closed.
  • resolution set to fixed.

(In [14290]) - user web: fix bug in user filter; fixes #505


If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.