From 714d08d1d7ed97160b24e7d88125d043ea481e51 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 2 Mar 2008 15:03:33 +0000 Subject: [PATCH] Merged MDL-13475 from 1.9: treat shortname fields as 100 chars --- admin/roles/manage.html | 2 +- admin/roles/manage.php | 4 ++-- backup/restorelib.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/roles/manage.html b/admin/roles/manage.html index b98689babb..5d6845359d 100755 --- a/admin/roles/manage.html +++ b/admin/roles/manage.html @@ -58,7 +58,7 @@ shortname).'" />'; + echo ''; if (isset($errors["shortname"])) formerr($errors["shortname"]); ?> diff --git a/admin/roles/manage.php b/admin/roles/manage.php index 6e955ac828..c362ecebfe 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -349,8 +349,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("role","name",addslashes($currentfullname)); $courseshort = get_record("role","shortname",addslashes($currentshortname)); $counter++; diff --git a/backup/restorelib.php b/backup/restorelib.php index 734bc07f5d..68048d74ff 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -7850,8 +7850,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3); $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("role","name",addslashes($currentfullname)); $courseshort = get_record("role","shortname",addslashes($currentshortname)); $counter++; -- 2.39.5