Merge pull request #65 from HFO4/dev

Dev
pull/87/head
AaronLiu 8 years ago committed by GitHub
commit f93edcc82b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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