Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
fbb46ce5
Commit
fbb46ce5
authored
Mar 05, 2007
by
Leigh B. Stoller
Browse files
Fix a couple of errors caused by the change to unregister-globals.
parent
dc881a55
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/approveuser.php3
View file @
fbb46ce5
...
...
@@ -175,11 +175,10 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
# Create and indirect through post var for subgroup approval value.
#
$foo
=
"
$user
\$\$
approval-
$project
/
$gid
"
;
$subgroup_approval
=
$$foo
;
if
(
!
$subgroup_approval
||
(
strcmp
(
$subgroup_approval
,
"deny"
)
&&
strcmp
(
$subgroup_approval
,
"nuke"
)))
{
if
(
!
isset
(
$HTTP_POST_VARS
[
$foo
])
||
(
$HTTP_POST_VARS
[
$foo
]
!=
"deny"
&&
$HTTP_POST_VARS
[
$foo
]
!=
"nuke"
))
{
USERERROR
(
"If you wish to deny/nuke user
$target_uid
in "
.
"project
$project
then you must deny/nuke in all "
.
"of the subgroups
$target_uid
is attempting to "
.
...
...
@@ -211,25 +210,24 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
#
$foo
=
"U${user}
\$\$
approval-
$project
/
$project
"
;
$bar
=
"U${user}
\$\$
trust-
$project
/
$project
"
;
$default_approval
=
$HTTP_POST_VARS
[
$foo
];
$default_approval
=
(
isset
(
$HTTP_POST_VARS
[
$foo
])
?
$HTTP_POST_VARS
[
$foo
]
:
""
);
if
(
!
$default_approval
||
strcmp
(
$default_approval
,
""
)
==
0
)
{
if
(
$default_approval
==
""
)
{
# Implicit group approval as user.
# Short circuit all the perms-checking, and squeeze it in
# all the appropriate places.
# 1. For our benefit
$$foo
=
$approval
;
# 2. For the strcmp below.
# 1. For the strcmp below.
$default_approval
=
$approval
;
#
3
. For the sanity check
#
2
. For the sanity check
$projectchecks
[
$user
][]
=
array
(
$project
,
$project
,
"user"
);
# 4. For the while loop which does the actual work
$POST_VARS_COPY
[
$foo
]
=
$approval
;
$$bar
=
"user"
;
# 3. For the while loop which does the actual work
$POST_VARS_COPY
[
$foo
]
=
$approval
;
$HTTP_POST_VARS
[
$foo
]
=
$approval
;
$HTTP_POST_VARS
[
$bar
]
=
"user"
;
}
if
(
strcmp
(
$approval
,
"approve"
)
==
0
&&
strcmp
(
$default_approval
,
"approve"
))
{
...
...
@@ -350,6 +348,11 @@ while (list ($header, $value) = each ($POST_VARS_COPY)) {
# Email info for the proj/group leaders too.
#
$leaders
=
$target_group
->
LeaderMailList
();
if
(
1
)
{
echo
"
$user_uid
,
$project
,
$group
,
$approval
,
$newtrust
<br>
\n
"
;
continue
;
}
#
# Well, looks like everything is okay. Change the project membership
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment