check if partitionsize is greater the max upload size

This commit is contained in:
Uwe Steinmann 2021-06-26 11:56:25 +02:00
parent bc50f2f8b6
commit 1eb2c3ed9f

View File

@ -201,7 +201,10 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
<?php <?php
$users = $dms->getAllUsers(); $users = $dms->getAllUsers();
if($users) { if($users) {
$selections = explode(',', $settings->{"_".$name}); if(is_array($settings->{"_".$name}))
$selections = $settings->{"_".$name};
else
$selections = explode(',', $settings->{"_".$name});
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$name.($multiple ? "[]" : "")."\"".($multiple ? " multiple" : "").($size ? " size=\"".$size."\"" : "")." data-placeholder=\"".getMLText("select_user")."\">"; echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$name.($multiple ? "[]" : "")."\"".($multiple ? " multiple" : "").($size ? " size=\"".$size."\"" : "")." data-placeholder=\"".getMLText("select_user")."\">";
if($allowempty) if($allowempty)
echo "<option value=\"\"></option>"; echo "<option value=\"\"></option>";
@ -681,6 +684,11 @@ if(is_writeable($settings->_configFilePath)) {
$this->warningMsg(getMLText("settings_guestid_is_admin")); $this->warningMsg(getMLText("settings_guestid_is_admin"));
} }
} }
$mus2 = SeedDMS_Core_File::parse_filesize(ini_get("upload_max_filesize"));
$mus1 = SeedDMS_Core_File::parse_filesize($settings->_partitionSize);
if($settings->_enableLargeFileUpload && $mus2 < $mus1) {
$this->warningMsg(getMLText("settings_partionsize_below_max_filesize"));
}
$this->columnEnd(4); $this->columnEnd(4);
$this->rowEnd(4); $this->rowEnd(4);
$this->contentEnd(); $this->contentEnd();