mirror of
https://github.com/humhub/humhub.git
synced 2025-03-14 20:19:47 +01:00
fixed humhub/humhub/issues/2388
This commit is contained in:
parent
693d8ee978
commit
2629b5200a
@ -8,6 +8,7 @@
|
||||
|
||||
namespace humhub\modules\admin\controllers;
|
||||
|
||||
use humhub\libs\Helpers;
|
||||
use Yii;
|
||||
use humhub\libs\ThemeHelper;
|
||||
use humhub\models\UrlOembed;
|
||||
@ -185,10 +186,10 @@ class SettingController extends Controller
|
||||
}
|
||||
|
||||
// Determine PHP Upload Max FileSize
|
||||
$maxUploadSize = \humhub\libs\Helpers::GetBytesOfPHPIniValue(ini_get('upload_max_filesize'));
|
||||
$maxUploadSize = Helpers::getBytesOfIniValue(ini_get('upload_max_filesize'));
|
||||
$fileSizeKey = 'upload_max_filesize';
|
||||
if ($maxUploadSize > \humhub\libs\Helpers::GetBytesOfPHPIniValue(ini_get('post_max_size'))) {
|
||||
$maxUploadSize = \humhub\libs\Helpers::GetBytesOfPHPIniValue(ini_get('post_max_size'));
|
||||
if ($maxUploadSize > Helpers::getBytesOfIniValue(ini_get('post_max_size'))) {
|
||||
$maxUploadSize = Helpers::getBytesOfIniValue(ini_get('post_max_size'));
|
||||
$fileSizeKey = 'post_max_size';
|
||||
}
|
||||
|
||||
@ -196,15 +197,20 @@ class SettingController extends Controller
|
||||
$maxUploadSizeText = "(" . $fileSizeKey . "): " . $maxUploadSize;
|
||||
|
||||
// Determine currently used ImageLibary
|
||||
$currentImageLibary = 'GD';
|
||||
$currentImageLibrary = 'GD';
|
||||
if (Yii::$app->getModule('file')->settings->get('imageMagickPath')) {
|
||||
$currentImageLibary = 'ImageMagick';
|
||||
$currentImageLibrary = 'ImageMagick';
|
||||
}
|
||||
|
||||
return $this->render('file', ['model' => $form,
|
||||
'maxUploadSize' => $maxUploadSize,
|
||||
'maxUploadSizeText' => $maxUploadSizeText,
|
||||
'currentImageLibary' => $currentImageLibary]);
|
||||
return $this->render(
|
||||
'file',
|
||||
[
|
||||
'model' => $form,
|
||||
'maxUploadSize' => $maxUploadSize,
|
||||
'maxUploadSizeText' => $maxUploadSizeText,
|
||||
'currentImageLibrary' => $currentImageLibrary,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user