This commit is contained in:
Paula Quispe
2019-07-10 08:43:16 -04:00
parent a07867510d
commit 1f83aab20e
10 changed files with 82 additions and 12 deletions

23
workflow/engine/src/ProcessMaker/Util/helpers.php Normal file → Executable file
View File

@@ -450,6 +450,29 @@ function replacePrefixes($outDocFilename, $prefix = '@=')
return $outDocFile;
}
/**
* Change the abbreviation of directives used in the php.ini configuration
*
* @param string $size
*
* @return string
*/
function changeAbbreviationOfDirectives($size)
{
$sizeValue = (int)$size;
switch (substr($size, -1)) {
case 'K':
return $sizeValue . 'KB';
case 'M':
return $sizeValue . 'MB';
case 'G':
return $sizeValue . 'GB';
default:
return $sizeValue . 'Bytes';
}
}
/**
* Encoding header filename used in Content-Disposition
*