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
integration
prechecker
Commits
57caaace
Commit
57caaace
authored
Sep 16, 2015
by
David Monllaó
Browse files
Merge branch 'MDL-46705-28' of
git://github.com/dkns/moodle
into MOODLE_28_STABLE
parents
42ba6f01
5d9bc0ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/adminlib.php
View file @
57caaace
...
...
@@ -3969,10 +3969,14 @@ class admin_setting_sitesettext extends admin_setting_configtext {
* @return mixed true or message string
*/
public
function
validate
(
$data
)
{
global
$DB
;
$cleaned
=
clean_param
(
$data
,
PARAM_TEXT
);
if
(
$cleaned
===
''
)
{
return
get_string
(
'required'
);
}
if
(
$this
->
name
===
'shortname'
&&
$DB
->
record_exists
(
'course'
,
array
(
'shortname'
=>
$data
)))
{
return
get_string
(
'shortnametaken'
,
'error'
,
$data
);
}
if
(
"
$data
"
==
"
$cleaned
"
)
{
// implicit conversion to string is needed to do exact comparison
return
true
;
}
else
{
...
...
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