From 413817d77e39016a1e60510e64a9a0ef621a55ed Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Wed, 4 Nov 2020 14:54:25 +0100 Subject: [PATCH] Fixed image blur --- .../modules/admin/models/forms/FileSettingsForm.php | 12 +----------- .../humhub/modules/admin/views/setting/file.php | 12 ------------ protected/humhub/modules/file/Module.php | 12 ++++++++++++ .../humhub/modules/file/converter/PreviewImage.php | 9 +++++---- .../humhub/modules/installer/libs/InitialData.php | 2 -- 5 files changed, 18 insertions(+), 29 deletions(-) diff --git a/protected/humhub/modules/admin/models/forms/FileSettingsForm.php b/protected/humhub/modules/admin/models/forms/FileSettingsForm.php index a240076812..ca9d63e2e2 100644 --- a/protected/humhub/modules/admin/models/forms/FileSettingsForm.php +++ b/protected/humhub/modules/admin/models/forms/FileSettingsForm.php @@ -7,8 +7,6 @@ use Yii; /** * FileSettingsForm * @property integer $maxFileSize - * @property integer $maxPreviewImageWidth - * @property integer $maxPreviewImageHeight * @property integer $excludeMediaFilesPreview Exclude media files from stream attachment list * @property integer $useXSendfile * @property string $allowedExtensions @@ -19,8 +17,6 @@ class FileSettingsForm extends \yii\base\Model { public $maxFileSize; - public $maxPreviewImageWidth; - public $maxPreviewImageHeight; public $excludeMediaFilesPreview; public $useXSendfile; public $allowedExtensions; @@ -35,8 +31,6 @@ class FileSettingsForm extends \yii\base\Model $settingsManager = Yii::$app->getModule('file')->settings; $this->maxFileSize = $settingsManager->get('maxFileSize') / 1024 / 1024; - $this->maxPreviewImageWidth = $settingsManager->get('maxPreviewImageWidth'); - $this->maxPreviewImageHeight = $settingsManager->get('maxPreviewImageHeight'); $this->excludeMediaFilesPreview = $settingsManager->get('excludeMediaFilesPreview'); $this->useXSendfile = $settingsManager->get('useXSendfile'); $this->allowedExtensions = $settingsManager->get('allowedExtensions'); @@ -49,7 +43,7 @@ class FileSettingsForm extends \yii\base\Model { return [ [['allowedExtensions'], 'match', 'pattern' => '/^[A-Za-z0-9_,]+$/u'], - [['maxFileSize', 'useXSendfile', 'maxPreviewImageWidth', 'maxPreviewImageHeight', 'excludeMediaFilesPreview'], 'integer'], + [['maxFileSize', 'useXSendfile', 'excludeMediaFilesPreview'], 'integer'], ]; } @@ -61,8 +55,6 @@ class FileSettingsForm extends \yii\base\Model return [ 'maxFileSize' => Yii::t('AdminModule.settings', 'Maximum upload file size (in MB)'), 'useXSendfile' => Yii::t('AdminModule.settings', 'Use X-Sendfile for File Downloads'), - 'maxPreviewImageWidth' => Yii::t('AdminModule.settings', 'Maximum preview image width (in pixels, optional)'), - 'maxPreviewImageHeight' => Yii::t('AdminModule.settings', 'Maximum preview image height (in pixels, optional)'), 'excludeMediaFilesPreview' => Yii::t('AdminModule.settings', 'Exclude media files from stream attachment list'), 'allowedExtensions' => Yii::t('AdminModule.settings', 'Allowed file extensions'), ]; @@ -78,8 +70,6 @@ class FileSettingsForm extends \yii\base\Model { $settingsManager = Yii::$app->getModule('file')->settings; $settingsManager->set('maxFileSize', $this->maxFileSize * 1024 * 1024); - $settingsManager->set('maxPreviewImageWidth', $this->maxPreviewImageWidth); - $settingsManager->set('maxPreviewImageHeight', $this->maxPreviewImageHeight); $settingsManager->set('excludeMediaFilesPreview', $this->excludeMediaFilesPreview); $settingsManager->set('useXSendfile', $this->useXSendfile); $settingsManager->set('allowedExtensions', strtolower($this->allowedExtensions)); diff --git a/protected/humhub/modules/admin/views/setting/file.php b/protected/humhub/modules/admin/views/setting/file.php index 6065fb6d36..2e84bd89d5 100644 --- a/protected/humhub/modules/admin/views/setting/file.php +++ b/protected/humhub/modules/admin/views/setting/file.php @@ -38,18 +38,6 @@ $fileModule = Yii::$app->getModule('file'); -
- labelEx($model, 'maxPreviewImageWidth'); ?> - textField($model, 'maxPreviewImageWidth', ['class' => 'form-control', 'readonly' => $fileModule->settings->isFixed('maxPreviewImageWidth')]); ?> -

-
- -
- labelEx($model, 'maxPreviewImageHeight'); ?> - textField($model, 'maxPreviewImageHeight', ['class' => 'form-control', 'readonly' => $fileModule->settings->isFixed('maxPreviewImageHeight')]); ?> -

-
-