mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Course restore - Restrict shortname to <= 15 characters, like the database table.
Author: Donal McMullan <donal@catalyst.net.nz>
This commit is contained in:
parent
23458f0d30
commit
cb6f407365
@ -480,7 +480,8 @@
|
||||
$suffixshort = "";
|
||||
}
|
||||
$currentfullname = $fullname.$suffixfull;
|
||||
$currentshortname = $shortname.$suffixshort;
|
||||
// Limit the size of shortname - database column accepts <= 15 chars
|
||||
$currentshortname = substr($shortname, 0, 15 - strlen($suffixshort)).$suffixshort;
|
||||
$coursefull = get_record("course","fullname",addslashes($currentfullname));
|
||||
$courseshort = get_record("course","shortname",addslashes($currentshortname));
|
||||
$counter++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user