From 0da4c42976a851518fe9725fb6aacd21ecf09ae3 Mon Sep 17 00:00:00 2001 From: "Janus B. Kristensen" Date: Sun, 5 Oct 2008 12:45:33 +0000 Subject: [PATCH] Having variables called 1, 2, 3... etc is really bad coding style and causes buckloads of issues in associative arrays. Instead call them stuff like "role1", "role2" and so on. svn path=/trunk/boinc/; revision=16132 --- html/ops/manage_special_users.php | 4 ++-- html/ops/manage_special_users_action.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html/ops/manage_special_users.php b/html/ops/manage_special_users.php index 820b9ea9da..d6e4960b19 100644 --- a/html/ops/manage_special_users.php +++ b/html/ops/manage_special_users.php @@ -42,7 +42,7 @@ for($i=1;$i<=mysql_num_rows($result);$i++){ $foo->name"; 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 "
"; diff --git a/html/ops/manage_special_users_action.php b/html/ops/manage_special_users_action.php index dd1ddd758f..82d1f8b3e7 100644 --- a/html/ops/manage_special_users_action.php +++ b/html/ops/manage_special_users_action.php @@ -26,7 +26,7 @@ admin_page_head("Manage special users action"); $bitset = ''; for ($i=0;$i<=6;$i++) { - if (post_int($i, TRUE) == '1') { + if (post_int("role".$i, TRUE) == '1') { $bitset = str_pad($bitset, $i+1, '1'); } else { $bitset = str_pad($bitset, $i+1, '0');