PMC-402
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
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user