Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
69d52388
Commit
69d52388
authored
Jun 23, 2008
by
Nigel McNie
Browse files
Prevent crash if a user edits a group and gives it the same name as an existing group.
parent
f2f05f54
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/group/edit.php
View file @
69d52388
...
...
@@ -89,7 +89,7 @@ function editgroup_validate(Pieform $form, $values) {
global
$USER
;
global
$SESSION
;
$cid
=
get_field
(
'group'
,
'id'
,
'owner'
,
$USER
->
get
(
'id'
),
'name'
,
$values
[
'name'
]);
$cid
=
get_field
(
'group'
,
'id'
,
'name'
,
$values
[
'name'
]);
if
(
$cid
&&
$cid
!=
$values
[
'id'
])
{
$form
->
set_error
(
'name'
,
get_string
(
'groupalreadyexists'
,
'group'
));
...
...
Write
Preview
Supports
Markdown
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