fix maximum 2GB storage

pull/65/head
HFO4 8 years ago
parent f5d69ebdae
commit 487f4e3139

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

@ -64,7 +64,7 @@ class Aria2 extends Model{
$this->pid = $respondData["result"]; $this->pid = $respondData["result"];
}else{ }else{
$this->reqStatus = 0; $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->Remove($sqlData["pid"],$sqlData);
$this->removeDownloadResult($sqlData["pid"],$sqlData); $this->removeDownloadResult($sqlData["pid"],$sqlData);
if($delete){ 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"]); @unlink($quenInfo["files"][$sqlData["file_index"]]["path"]);
@self::remove_directory(dirname($quenInfo["files"][$sqlData["file_index"]]["path"])); @self::remove_directory(dirname($quenInfo["files"][$sqlData["file_index"]]["path"]));
} }

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

Loading…
Cancel
Save