From 666d0d418fb86b5de708b6b092c17cbff6c82243 Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Wed, 17 Feb 2021 10:54:17 +0100 Subject: [PATCH] Rename MAX_SIZE_FOR_PREVIEW const to DEFAULT_MAX_SIZE_FOR_PREVIEW --- .../2.x/itop-attachments/renderers.itop-attachments.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datamodels/2.x/itop-attachments/renderers.itop-attachments.php b/datamodels/2.x/itop-attachments/renderers.itop-attachments.php index 679fd63e2..f9261d0d9 100644 --- a/datamodels/2.x/itop-attachments/renderers.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/renderers.itop-attachments.php @@ -70,9 +70,9 @@ class AttachmentsRendererFactory abstract class AbstractAttachmentsRenderer { /** - * If size (in bits) is above this, then we will display a file icon instead of preview + * If size (in bits) is above this, then we will display a file icon instead of preview. Overloaded by 'icon_preview_max_size' conf param */ - const MAX_SIZE_FOR_PREVIEW = 500000; + const DEFAULT_MAX_SIZE_FOR_PREVIEW = 500000; /** * Attachments list container HTML id, that must be generated in {@link RenderEditAttachmentsList} @@ -506,7 +506,7 @@ class TableDetailsAttachmentsRenderer extends AbstractAttachmentsRenderer $sAttachmentThumbUrl = utils::GetAbsoluteUrlAppRoot().AttachmentPlugIn::GetFileIcon($sFileName); $sIconClass = ''; $iMaxWidth = MetaModel::GetModuleSetting('itop-attachments', 'preview_max_width', 290); - $iMaxSizeForPreview = MetaModel::GetModuleSetting('itop-attachments', 'icon_preview_max_size', self::MAX_SIZE_FOR_PREVIEW); + $iMaxSizeForPreview = MetaModel::GetModuleSetting('itop-attachments', 'icon_preview_max_size', self::DEFAULT_MAX_SIZE_FOR_PREVIEW); $sPreviewNotAvailable = Dict::S('Attachments:PreviewNotAvailable'); $sPreviewMarkup = $sPreviewNotAvailable;