add maxUploadSize

This commit is contained in:
Uwe Steinmann 2017-03-15 16:39:05 +01:00
parent 9fad3765e3
commit 2e3b9f474b
3 changed files with 10 additions and 1 deletions

View File

@ -162,8 +162,10 @@ class Settings { /* {{{ */
var $_logFileRotation = "d"; var $_logFileRotation = "d";
// Enable file upload by jumploader // Enable file upload by jumploader
var $_enableLargeFileUpload = false; var $_enableLargeFileUpload = false;
// size of partitions for file upload by jumploader // size of partitions for file uploaded by fine-loader
var $_partitionSize = 2000000; var $_partitionSize = 2000000;
// max size of files uploaded by fine-uploader, set to 0 for unlimited
var $_maxUploadSize = 0;
// enable/disable users images // enable/disable users images
var $_enableUserImage = false; var $_enableUserImage = false;
// enable/disable calendar // enable/disable calendar
@ -440,6 +442,7 @@ class Settings { /* {{{ */
$this->_logFileRotation = strval($tab["logFileRotation"]); $this->_logFileRotation = strval($tab["logFileRotation"]);
$this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]); $this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]);
$this->_partitionSize = strval($tab["partitionSize"]); $this->_partitionSize = strval($tab["partitionSize"]);
$this->_maxUploadSize = strval($tab["maxUploadSize"]);
// XML Path: /configuration/system/authentication // XML Path: /configuration/system/authentication
$node = $xml->xpath('/configuration/system/authentication'); $node = $xml->xpath('/configuration/system/authentication');
@ -741,6 +744,7 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation); $this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation);
$this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload); $this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload);
$this->setXMLAttributValue($node, "partitionSize", $this->_partitionSize); $this->setXMLAttributValue($node, "partitionSize", $this->_partitionSize);
$this->setXMLAttributValue($node, "maxUploadSize", $this->_maxUploadSize);
// XML Path: /configuration/system/authentication // XML Path: /configuration/system/authentication
$node = $this->getXMLNode($xml, '/configuration/system', 'authentication'); $node = $this->getXMLNode($xml, '/configuration/system', 'authentication');

View File

@ -110,6 +110,7 @@ if ($action == "saveSettings")
$settings->_logFileRotation = $_POST["logFileRotation"]; $settings->_logFileRotation = $_POST["logFileRotation"];
$settings->_enableLargeFileUpload = getBoolValue("enableLargeFileUpload"); $settings->_enableLargeFileUpload = getBoolValue("enableLargeFileUpload");
$settings->_partitionSize = $_POST["partitionSize"]; $settings->_partitionSize = $_POST["partitionSize"];
$settings->_maxUploadSize = $_POST["maxUploadSize"];
// SETTINGS - SYSTEM - AUTHENTICATION // SETTINGS - SYSTEM - AUTHENTICATION
$settings->_enableGuestLogin = getBoolValue("enableGuestLogin"); $settings->_enableGuestLogin = getBoolValue("enableGuestLogin");

View File

@ -390,6 +390,10 @@ if(!is_writeable($settings->_configFilePath)) {
<td><?php printMLText("settings_partitionSize");?>:</td> <td><?php printMLText("settings_partitionSize");?>:</td>
<td><?php $this->showTextField("partitionSize", $settings->_partitionSize); ?></td> <td><?php $this->showTextField("partitionSize", $settings->_partitionSize); ?></td>
</tr> </tr>
<tr title="<?php printMLText("settings_maxUploadSize_desc");?>">
<td><?php printMLText("settings_maxUploadSize");?>:</td>
<td><?php $this->showTextField("maxUploadSize", $settings->_maxUploadSize); ?></td>
</tr>
<!-- <!--
-- SETTINGS - SYSTEM - AUTHENTICATION -- SETTINGS - SYSTEM - AUTHENTICATION
--> -->