Use $max_length parameter in getClonedProjectName.

This commit is contained in:
Colin Williams 2015-01-31 15:04:32 +00:00
parent b24b1e7e4e
commit c2ff3b2d69
1 changed files with 2 additions and 2 deletions

View File

@ -23,8 +23,8 @@ class ProjectDuplication extends Base
{
$suffix = ' ('.t('Clone').')';
if (strlen($name.$suffix) > 50) {
$name = substr($name, 0, 50 - strlen($suffix));
if (strlen($name.$suffix) > $max_length) {
$name = substr($name, 0, $max_length - strlen($suffix));
}
return $name.$suffix;