mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
new parameter xsendfile
This commit is contained in:
parent
dcb0a746a0
commit
bcfde858d8
|
@ -174,6 +174,8 @@ class Settings { /* {{{ */
|
|||
var $_partitionSize = 2000000;
|
||||
// max size of files uploaded by fine-uploader, set to 0 for unlimited
|
||||
var $_maxUploadSize = 0;
|
||||
// enable/disables xsendfile
|
||||
var $_enableXsendfile = true;
|
||||
// enable/disable users images
|
||||
var $_enableUserImage = false;
|
||||
// enable/disable replacing documents by webdav
|
||||
|
@ -512,6 +514,7 @@ class Settings { /* {{{ */
|
|||
$this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]);
|
||||
$this->_partitionSize = strval($tab["partitionSize"]);
|
||||
$this->_maxUploadSize = strval($tab["maxUploadSize"]);
|
||||
$this->_enableXsendfile = Settings::boolVal($tab["enableXsendfile"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/system/authentication
|
||||
|
@ -847,6 +850,7 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload);
|
||||
$this->setXMLAttributValue($node, "partitionSize", $this->_partitionSize);
|
||||
$this->setXMLAttributValue($node, "maxUploadSize", $this->_maxUploadSize);
|
||||
$this->setXMLAttributValue($node, "enableXsendfile", $this->_enableXsendfile);
|
||||
|
||||
// XML Path: /configuration/system/authentication
|
||||
$node = $this->getXMLNode($xml, '/configuration/system', 'authentication');
|
||||
|
|
|
@ -563,7 +563,8 @@ function addDirSep($str) { /* {{{ */
|
|||
* @param string $filename
|
||||
*/
|
||||
function sendFile($filename) { /* {{{ */
|
||||
if(function_exists('apache_get_modules') && in_array('mod_xsendfile',apache_get_modules())) {
|
||||
global $settings;
|
||||
if($settings->_enableXsendfile && function_exists('apache_get_modules') && in_array('mod_xsendfile',apache_get_modules())) {
|
||||
header("X-Sendfile: ".$filename);
|
||||
} else {
|
||||
/* Make sure output buffering is off */
|
||||
|
|
Loading…
Reference in New Issue
Block a user