Fix maxFileSize
This commit is contained in:
21
cmpUtil.php
21
cmpUtil.php
@@ -8,6 +8,7 @@
|
|||||||
var $gitCommit = "";
|
var $gitCommit = "";
|
||||||
var $gitComment = "";
|
var $gitComment = "";
|
||||||
|
|
||||||
|
var $maxFileSize = 104856;
|
||||||
|
|
||||||
function toArray($obj) {
|
function toArray($obj) {
|
||||||
$re = array();
|
$re = array();
|
||||||
@@ -149,7 +150,7 @@
|
|||||||
false , // bool $use_include_path
|
false , // bool $use_include_path
|
||||||
null , // ?resource $context
|
null , // ?resource $context
|
||||||
0 , // int $offset
|
0 , // int $offset
|
||||||
$this->parm["maxFileSize"] , // ?int $length
|
$this->maxFileSize , // ?int $length
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,9 +199,21 @@
|
|||||||
date_default_timezone_set($this->parm["timezone"]);
|
date_default_timezone_set($this->parm["timezone"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!@$this->parm["maxFileSize"])
|
do {
|
||||||
$this->parm["maxFileSize"] = 1048576;
|
if(!isset($this->parm["maxFileSize"]))
|
||||||
$this->d("Set maxFileSize '" . $this->parm["maxFileSize"] . "'");
|
break;
|
||||||
|
|
||||||
|
if(!$this->parm["maxFileSize"])
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(!is_numeric($this->parm["maxFileSize"])) {
|
||||||
|
$this->d("Not numeric maxFileSize");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->maxFileSize = 1*$this->parm["maxFileSize"];
|
||||||
|
$this->d("Set maxFileSize '" . $this->maxFileSize . "'");
|
||||||
|
} while(0);
|
||||||
|
|
||||||
if(isset($this->parm["php_ini"]) && is_array($this->parm["php_ini"])) {
|
if(isset($this->parm["php_ini"]) && is_array($this->parm["php_ini"])) {
|
||||||
foreach($this->parm["php_ini"] as $k => $v) {
|
foreach($this->parm["php_ini"] as $k => $v) {
|
||||||
|
Reference in New Issue
Block a user