mirror of https://github.com/BOINC/boinc.git
Minor fix to user ignore function. When removing a user this no longer removes all users in the list.
svn path=/trunk/boinc/; revision=5002
This commit is contained in:
parent
b77be2204b
commit
9a005d90ca
|
@ -71,17 +71,17 @@ $answer_sort = $HTTP_POST_VARS["answer_sort"];
|
||||||
$forum_sorting=mysql_escape_string(implode("|",array($forum_sort,$thread_sort,$faq_sort,$answer_sort)));
|
$forum_sorting=mysql_escape_string(implode("|",array($forum_sort,$thread_sort,$faq_sort,$answer_sort)));
|
||||||
$has_prefs=mysql_query("select * from forum_preferences where userid='".$user->id."'");
|
$has_prefs=mysql_query("select * from forum_preferences where userid='".$user->id."'");
|
||||||
|
|
||||||
|
$ignorelist = $user->ignorelist;
|
||||||
if ($add_user_to_filter){ //see if we should add any users to the ignorelist
|
if ($add_user_to_filter){ //see if we should add any users to the ignorelist
|
||||||
$user_to_add = $HTTP_POST_VARS["forum_filter_user"];
|
$user_to_add = $HTTP_POST_VARS["forum_filter_user"];
|
||||||
if ($user_to_add!="" and $user_to_add==strval(intval($user_to_add))){
|
if ($user_to_add!="" and $user_to_add==strval(intval($user_to_add))){
|
||||||
$ignorelist = $user->ignorelist."|".$user_to_add;
|
$ignorelist.="|".$user_to_add;
|
||||||
} else {
|
|
||||||
$ignorelist = $user->ignorelist;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ignored_users = explode("|",$ignorelist);
|
$ignored_users = explode("|",$ignorelist);
|
||||||
for ($i=1;$i<sizeof($ignored_users);$i++){
|
for ($i=1;$i<sizeof($ignored_users);$i++){
|
||||||
if ($HTTP_POST_VARS["remove".$ignored_users[$i]]!=""){
|
if ($ignored_users[$i]!="" and $HTTP_POST_VARS["remove".$ignored_users[$i]]!=""){
|
||||||
//this user will be removed
|
//this user will be removed
|
||||||
} else {
|
} else {
|
||||||
//the user should be in the new list
|
//the user should be in the new list
|
||||||
|
|
Loading…
Reference in New Issue