From 5ba3928959940bc687994d551fc44e194e924a9e Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 8 Aug 2007 19:39:56 +0000 Subject: [PATCH] Fixed two places where course->shortname was harcoded to 15. MDL-10026 --- backup/restorelib.php | 4 ++-- enrol/database/enrol.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backup/restorelib.php b/backup/restorelib.php index c198454c2f..cb1e8a22df 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -521,8 +521,8 @@ $suffixshort = ""; } $currentfullname = $fullname.$suffixfull; - // Limit the size of shortname - database column accepts <= 15 chars - $currentshortname = substr($shortname, 0, 15 - strlen($suffixshort)).$suffixshort; + // Limit the size of shortname - database column accepts <= 100 chars + $currentshortname = substr($shortname, 0, 100 - strlen($suffixshort)).$suffixshort; $coursefull = get_record("course","fullname",addslashes($currentfullname)); $courseshort = get_record("course","shortname",addslashes($currentshortname)); $counter++; diff --git a/enrol/database/enrol.php b/enrol/database/enrol.php index 1b3a22af17..f51c7127ff 100644 --- a/enrol/database/enrol.php +++ b/enrol/database/enrol.php @@ -581,8 +581,8 @@ function create_course ($course,$skip_fix_course_sortorder=0){ // truncate a few key fields $course->idnumber = substr($course->idnumber, 0, 100); - $course->shortname = substr($course->shortname, 0, 15); - + $course->shortname = substr($course->shortname, 0, 100); + // store it and log if ($newcourseid = insert_record("course", addslashes_object($course))) { // Set up new course $section = NULL; -- 2.39.5