N°330 Improve \ormDocument::GetFormattedSize

* Fix typo in method name (many thanks @jbostoen !)
* Use \utils::BytesToFriendlyFormat
This commit is contained in:
Pierre Goiffon
2019-12-17 09:58:35 +01:00
parent d4dc739b30
commit 47d8e35639
5 changed files with 19 additions and 16 deletions

View File

@@ -1164,7 +1164,7 @@ class ObjectController extends BrickController
$aData['icon'] = utils::GetAbsoluteUrlAppRoot().'env-'.utils::GetCurrentEnvironment().'/itop-attachments/icons/image.png';
$aData['att_id'] = $iAttId;
$aData['preview'] = $oDocument->IsPreviewAvailable() ? 'true' : 'false';
$aData['file_size'] = $oDocument->GetFormatedSize();
$aData['file_size'] = $oDocument->GetFormattedSize();
$aData['creation_date'] = $oAttachment->Get('creation_date');
$aData['user_id_friendlyname'] = $oAttachment->Get('user_id_friendlyname');
$aData['file_type'] = $oDocument->GetMimeType();