]> git.mjollnir.org Git - moodle.git/commitdiff
Merged MDL-13475 from 1.9: treat shortname fields as 100 chars
authormoodler <moodler>
Sun, 2 Mar 2008 15:03:33 +0000 (15:03 +0000)
committermoodler <moodler>
Sun, 2 Mar 2008 15:03:33 +0000 (15:03 +0000)
admin/roles/manage.html
admin/roles/manage.php
backup/restorelib.php

index b98689babb4878ab02a547f40c01fff7be267583..5d6845359d85fd4c5a8c65d36a9a50679b9d9a2c 100755 (executable)
@@ -58,7 +58,7 @@
     <tr valign="top">
         <td align="right"><label for="shortname"><?php print_string('shortname') ?></label></td>
         <td><?php
-            echo '<input type="text" id="shortname" name="shortname" maxlength="20" size="15" value="'.s($role->shortname).'" />';
+            echo '<input type="text" id="shortname" name="shortname" maxlength="100" size="15" value="'.s($role->shortname).'" />';
             if (isset($errors["shortname"])) formerr($errors["shortname"]);
             ?>
         </td>
index 6e955ac8285d3750c51104a7fa39b32776dcfdf4..c362ecebfe5b9522c67f6ad3a6cc998466932f5e 100755 (executable)
                     $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++;
index 734bc07f5d9a36e8b6b722027bf8ede966968231..68048d74ffafa08e7c23b2963819658f442433f3 100644 (file)
@@ -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++;