Merged in bugfix/PMC-402 (pull request #6966)
PMC-402 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
23
workflow/engine/src/ProcessMaker/Util/helpers.php
Normal file → Executable file
23
workflow/engine/src/ProcessMaker/Util/helpers.php
Normal file → Executable file
@@ -451,6 +451,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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user