From: moodler Date: Sun, 2 Mar 2008 15:03:33 +0000 (+0000) Subject: Merged MDL-13475 from 1.9: treat shortname fields as 100 chars X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=714d08d1d7ed97160b24e7d88125d043ea481e51;p=moodle.git Merged MDL-13475 from 1.9: treat shortname fields as 100 chars --- 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++;