Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
info
mahara-museum
Commits
97d1ad65
Commit
97d1ad65
authored
Jan 10, 2008
by
Nigel McNie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent a crash when adding an institution with the same name as an existing one. Fixes #1851.
parent
b1dcb7a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
htdocs/admin/users/institutions.php
htdocs/admin/users/institutions.php
+6
-0
htdocs/lang/en.utf8/admin.php
htdocs/lang/en.utf8/admin.php
+1
-0
No files found.
htdocs/admin/users/institutions.php
View file @
97d1ad65
...
...
@@ -250,6 +250,12 @@ else {
$smarty
->
assign
(
'institutions'
,
$institutions
);
}
function
institution_validate
(
Pieform
$form
,
$values
)
{
if
(
!
$form
->
get_error
(
'name'
)
&&
record_exists
(
'institution'
,
'name'
,
$values
[
'name'
]))
{
$form
->
set_error
(
'name'
,
get_string
(
'institutionnamealreadytaken'
,
'admin'
));
}
}
function
institution_submit
(
Pieform
$form
,
$values
)
{
global
$SESSION
,
$institution
,
$add
,
$instancearray
;
...
...
htdocs/lang/en.utf8/admin.php
View file @
97d1ad65
...
...
@@ -256,6 +256,7 @@ $string['deleteinstitutionconfirm'] = 'Are you really sure you wish to delete th
$string
[
'institutionaddedsuccessfully'
]
=
'Institution added successfully. Please configure an authentication plugin for this institution.'
;
$string
[
'institutiondeletedsuccessfully'
]
=
'Institution deleted successfully'
;
$string
[
'institutionname'
]
=
'Institution name'
;
$string
[
'institutionnamealreadytaken'
]
=
'This institution name is already taken'
;
$string
[
'institutiondisplayname'
]
=
'Institution display name'
;
$string
[
'institutionupdatedsuccessfully'
]
=
'Institution updated successfully'
;
$string
[
'registrationallowed'
]
=
'Registration allowed?'
;
...
...
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