From 2e85107ff67c0d85ff6b3982921b963b70e11aff Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 7 Apr 2010 22:21:44 +0000 Subject: [PATCH] - admin web: "User privileges" didn't work if the project had set forum_preferences.special_user to "0000000", as had been done in SETI@home for some reason. Also, show user ID as well as name; name is not unique. svn path=/trunk/boinc/; revision=21143 --- checkin_notes | 10 ++++++++++ html/ops/manage_special_users.php | 28 +++++++++++++++------------- html/ops/profile_screen_form.php | 2 -- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/checkin_notes b/checkin_notes index 93d90868f4..dbda25484b 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2618,3 +2618,13 @@ David 7 Apr 2010 log_flags.cpp,h main.cpp sim.h + +David 7 Apr 2010 + - admin web: "User privileges" didn't work if the project + had set forum_preferences.special_user to "0000000", + as had been done in SETI@home for some reason. + Also, show user ID as well as name; name is not unique. + + html/ops/ + manage_special_users.php + profile_screen_form.php diff --git a/html/ops/manage_special_users.php b/html/ops/manage_special_users.php index d6e4960b19..cb12448bfc 100644 --- a/html/ops/manage_special_users.php +++ b/html/ops/manage_special_users.php @@ -27,20 +27,23 @@ start_table("align=\"center\""); row1("Current special users", '9'); echo "User"; -for($i=0;$i<=6;$i++) { +for ($i=0;$i<=6;$i++) { echo "" . $special_user_bitfield[$i] . "\n"; } echo ""; -$result = mysql_query("SELECT prefs.userid, prefs.special_user, user.name - FROM forum_preferences as prefs, user - WHERE special_user > '0' and prefs.userid=user.id"); -for($i=1;$i<=mysql_num_rows($result);$i++){ +$result = mysql_query( + "SELECT prefs.userid, prefs.special_user, user.id, user.name + FROM forum_preferences as prefs, user + WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id" +); +for ($i=1; $i<=mysql_num_rows($result); $i++){ $foo = mysql_fetch_object($result); echo "
\n"; echo "userid\" - $foo->name"; - for ($j=0;$j<=6;$j++) { + $foo->name ($foo->id) + "; + for ($j=0; $j<=6; $j++) { $bit = substr($foo->special_user, $j, 1); echo "\n"; echo "Add UserID:"; for ($j=0;$j<=6;$j++) { - echo "\n"; - } - echo "
"; - echo "\n"; - + echo "\n"; +} +echo ""; +echo "\n"; end_table(); diff --git a/html/ops/profile_screen_form.php b/html/ops/profile_screen_form.php index 756a2b57f3..9b8a46f8bd 100644 --- a/html/ops/profile_screen_form.php +++ b/html/ops/profile_screen_form.php @@ -24,8 +24,6 @@ require_once("../project/project.inc"); db_init(); -$logged_in_user = get_logged_in_user(); - function buttons($i) { echo " skip