fix aria2 array index error
This commit is contained in:
parent
f93edcc82b
commit
91c9870f49
2 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,7 @@ class RemoteDownload extends Controller{
|
|||
public function addUrl(){
|
||||
$policyData = Db::name("policy")->where("id",$this->userObj->groupData["policy_name"])->find();
|
||||
if(!$this->checkPerimission(0) || $policyData["policy_type"] != "local"){
|
||||
return json(['error'=>1,'message'=>'您当前的无用户无法执行此操作']);
|
||||
return json(["result"=>['success'=>false,'error'=>"您当前的无用户无法执行此操作"]]);
|
||||
}
|
||||
$aria2Options = Option::getValues(["aria2"]);
|
||||
$aria2 = new Aria2($aria2Options);
|
||||
|
|
|
@ -172,6 +172,7 @@ class AdminHandler extends Model{
|
|||
unset($options["id"]);
|
||||
$options["max_storage"] = $options["max_storage"]*$options["sizeTimes"];
|
||||
unset($options["sizeTimes"]);
|
||||
$options["aria2"] = $options["aria2"] ? "1,1,1" : "0,0,0";
|
||||
try {
|
||||
Db::name("groups")->where("id",$groupId)->update($options);
|
||||
} catch (Exception $e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue