fix maximum 2GB storage

This commit is contained in:
HFO4 2018-04-19 19:44:22 +08:00
parent f5d69ebdae
commit 487f4e3139
3 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ return [
// 应用命名空间
'app_namespace' => 'app',
// 应用调试模式
'app_debug' => false,
'app_debug' => true,
// 应用Trace
'app_trace' => false,
// 应用模式状态

View file

@ -64,7 +64,7 @@ class Aria2 extends Model{
$this->pid = $respondData["result"];
}else{
$this->reqStatus = 0;
$this->reqMsg = $respondData["error"]["message"];
$this->reqMsg = isset($respondData["error"]["message"]) ? $respondData["error"]["message"] : $this->reqMsg;
}
}
@ -253,7 +253,7 @@ class Aria2 extends Model{
$this->Remove($sqlData["pid"],$sqlData);
$this->removeDownloadResult($sqlData["pid"],$sqlData);
if($delete){
if(file_exists($quenInfo["files"][$sqlData["file_index"]]["path"])){
if(isset($quenInfo["files"][$sqlData["file_index"]]["path"]) && file_exists($quenInfo["files"][$sqlData["file_index"]]["path"])){
@unlink($quenInfo["files"][$sqlData["file_index"]]["path"]);
@self::remove_directory(dirname($quenInfo["files"][$sqlData["file_index"]]["path"]));
}

View file

@ -308,8 +308,8 @@ class User extends Model{
public function getMemory($notEcho = false){
$usedMemory = $this->userSQLData["used_storage"];
$groupStorage = (int)$this->groupData["max_storage"];
$packetStorage = (int)Db::name('storage_pack')
$groupStorage = $this->groupData["max_storage"];
$packetStorage = Db::name('storage_pack')
->where('uid',$this->uid)
->where('dlay_time',">",time())
->sum('pack_size');