Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
17fb22a2
Commit
17fb22a2
authored
16 years ago
by
Robert Anderson
Browse files
Options
Downloads
Patches
Plain Diff
Remove users from group and delete group
parent
c5bf3693
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webui/group-delete.php
+9
-10
9 additions, 10 deletions
webui/group-delete.php
with
9 additions
and
10 deletions
webui/group-delete.php
+
9
−
10
View file @
17fb22a2
...
...
@@ -16,7 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#FIXME
#FIXME
-> delete groups
include_once
(
"includes/header.php"
);
include_once
(
"includes/footer.php"
);
...
...
@@ -75,28 +75,28 @@ if ($_POST['frmaction'] == "delete") {
if
(
$_POST
[
'confirm'
]
==
"yes"
)
{
$db
->
beginTransaction
();
$res
=
$db
->
exec
(
"DELETE FROM ${DB_TABLE_PREFIX}
policy_group_member
s WHERE
Policy
GroupID = "
.
$db
->
quote
(
$_POST
[
'
policy_
group_id'
]));
$res
=
$db
->
exec
(
"DELETE FROM ${DB_TABLE_PREFIX}
users_to_group
s WHERE GroupID = "
.
$db
->
quote
(
$_POST
[
'group_id'
]));
if
(
$res
!==
FALSE
)
{
?>
<div
class=
"notice"
>
Policy group members delet
ed
</div>
<div
class=
"notice"
>
Users remov
ed
</div>
<?php
}
else
{
?>
<div
class=
"warning"
>
Error
deleting policy group memb
ers
!
</div>
<div
class=
"warning"
>
Error
removing us
ers
</div>
<div
class=
"warning"
>
<?php
print_r
(
$db
->
errorInfo
())
?>
</div>
<?php
$db
->
rollback
();
}
if
(
$res
!==
FALSE
)
{
$res
=
$db
->
exec
(
"DELETE FROM ${DB_TABLE_PREFIX}
policy_
groups WHERE ID = "
.
$db
->
quote
(
$_POST
[
'
policy_
group_id'
]));
$res
=
$db
->
exec
(
"DELETE FROM ${DB_TABLE_PREFIX}groups WHERE ID = "
.
$db
->
quote
(
$_POST
[
'group_id'
]));
if
(
$res
)
{
?>
<div
class=
"notice"
>
Policy g
roup deleted
</div>
<div
class=
"notice"
>
G
roup deleted
</div>
<?php
}
else
{
?>
<div
class=
"warning"
>
Error deleting
policy
group!
</div>
<div
class=
"warning"
>
Error deleting group!
</div>
<div
class=
"warning"
>
<?php
print_r
(
$db
->
errorInfo
())
?>
</div>
<?php
$db
->
rollback
();
...
...
@@ -108,14 +108,14 @@ if ($_POST['frmaction'] == "delete") {
}
}
else
{
?>
<div
class=
"notice"
>
Policy g
roup not deleted, aborted by user
</div>
<div
class=
"notice"
>
G
roup not deleted, aborted by user
</div>
<?php
}
# Warn
}
else
{
?>
<div
class=
"warning"
>
Invocation error, no
policy
group ID
</div>
<div
class=
"warning"
>
Invocation error, no group ID
</div>
<?php
}
...
...
@@ -133,4 +133,3 @@ printFooter();
# vim: ts=4
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment