mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-18413 limit coursedata strings before db
Conflicts: enrol/mnet/enrol.php Author: Peter Bulmer <peter.bulmer@catalyst.net.nz>
This commit is contained in:
parent
d429d4837b
commit
11b9852e4e
@ -455,14 +455,14 @@ class enrolment_plugin_mnet {
|
||||
// sanitise strings for DB NOTE - these are not sane
|
||||
// for printing, so we'll use a different object
|
||||
$dbcourse = clone($course);
|
||||
$dbcourse->cat_name = $dbcourse->cat_name;
|
||||
$dbcourse->cat_name = substr($dbcourse->cat_name,0,255);
|
||||
$dbcourse->cat_description = $dbcourse->cat_description;
|
||||
$dbcourse->fullname = $dbcourse->fullname;
|
||||
$dbcourse->shortname = $dbcourse->shortname;
|
||||
$dbcourse->idnumber = $dbcourse->idnumber;
|
||||
$dbcourse->fullname = substr($dbcourse->fullname,0,254);
|
||||
$dbcourse->shortname = substr($dbcourse->shortname,0,15);
|
||||
$dbcourse->idnumber = substr($dbcourse->idnumber,0,100);
|
||||
$dbcourse->summary = $dbcourse->summary;
|
||||
$dbcourse->currency = $dbcourse->currency;
|
||||
$dbcourse->defaultrolename = $dbcourse->defaultrolename;
|
||||
$dbcourse->currency = substr($dbcourse->currency,0,3);
|
||||
$dbcourse->defaultrolename = substr($dbcourse->defaultrolename,0,255);
|
||||
|
||||
// insert or update
|
||||
if (empty($cachedcourses[$course->remoteid])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user