summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2013-10-15 22:49:37 +0200
committerMichael Tänzer <neo@nhng.de>2013-10-15 22:49:37 +0200
commitfcb9c638f44c9d20353c7364716fa342fa0b8c1a (patch)
treeaaeb6caffe78ba9f31507d6720073149828683cb
parent44067b03a51274398945293213785ae21c6ae7e7 (diff)
downloadcacert-devel-fcb9c638f44c9d20353c7364716fa342fa0b8c1a.tar.gz
cacert-devel-fcb9c638f44c9d20353c7364716fa342fa0b8c1a.tar.xz
cacert-devel-fcb9c638f44c9d20353c7364716fa342fa0b8c1a.zip
bug 1003: Revert the addition of the "level" flag property and use the parsed value
instead to avoid inconsistencies Signed-off-by: Michael Tänzer <neo@nhng.de>
-rwxr-xr-xscripts/cron/permissionreview.php31
1 files changed, 11 insertions, 20 deletions
diff --git a/scripts/cron/permissionreview.php b/scripts/cron/permissionreview.php
index 6d9b94c..d1c67f1 100755
--- a/scripts/cron/permissionreview.php
+++ b/scripts/cron/permissionreview.php
@@ -33,8 +33,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => false,
- 'oao' => false,
- 'level' =>1
+ 'oao' => false
),
'orgadmin=1' => array(
@@ -43,8 +42,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => true,
- 'oao' => true,
- 'level' =>1
+ 'oao' => true
),
'board=1' => array(
@@ -53,8 +51,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => true,
- 'oao' => false,
- 'level' =>1
+ 'oao' => false
),
'ttpadmin=1' => array(
@@ -63,8 +60,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => true,
- 'oao' => true,
- 'level' =>1
+ 'oao' => true
),
'ttpadmin=2' => array(
@@ -73,8 +69,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => true,
- 'oao' => true,
- 'level' =>2
+ 'oao' => true
),
'tverify=1' => array(
@@ -83,8 +78,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => true,
- 'oao' => false,
- 'level' =>1
+ 'oao' => false
),
'locadmin=1' => array(
@@ -93,8 +87,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => false,
- 'oao' => false,
- 'level' =>1
+ 'oao' => false
),
'adadmin=1' => array(
@@ -103,8 +96,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => false,
- 'oao' => false,
- 'level' =>1
+ 'oao' => false
),
'adadmin=2' => array(
@@ -113,8 +105,7 @@ $flags = array(
'board' => true,
'support' => true,
'ao' => false,
- 'oao' => false,
- 'level' =>2
+ 'oao' => false
),
@@ -124,8 +115,8 @@ $flags = array(
// Build up list of various admins
$adminlist = array();
foreach ($flags as $flag => $flag_properties) {
- $flagname=explode('=', $flag, 2 );
- $query = "select `fname`, `lname`, `email` from `users` where `$flagname[0]` = $flag_properties[level]";
+ $flagname = explode('=', $flag, 2 );
+ $query = "select `fname`, `lname`, `email` from `users` where `$flagname[0]` = '$flagname[1]'";
if(! $res = mysql_query($query) ) {
fwrite(STDERR,
"MySQL query for flag $flag failed:\n".