try fix: add Aliyundrive will instead current disk
parent
bdedf7a4b0
commit
0b6adc077c
|
@ -604,8 +604,7 @@ class Aliyundrive {
|
||||||
document.cookie=\'disktag=; path=/; \'+expires;
|
document.cookie=\'disktag=; path=/; \'+expires;
|
||||||
</script>', 'Error', 201);
|
</script>', 'Error', 201);
|
||||||
}
|
}
|
||||||
$tmp['refresh_token'] = $_POST['refresh_token'];
|
$res = curl('POST', $this->auth_url, json_encode([ 'refresh_token' => $_POST['refresh_token'] ]), ["content-type"=>"application/json; charset=utf-8"]);
|
||||||
$res = curl('POST', $this->auth_url, json_encode($tmp), ["content-type"=>"application/json; charset=utf-8"]);
|
|
||||||
//return output($res['body']);
|
//return output($res['body']);
|
||||||
if ($res['stat']!=200) {
|
if ($res['stat']!=200) {
|
||||||
return message($res['body'], $res['stat'], $res['stat']);
|
return message($res['body'], $res['stat'], $res['stat']);
|
||||||
|
@ -623,6 +622,7 @@ class Aliyundrive {
|
||||||
$tmp['Driver'] = 'Aliyundrive';
|
$tmp['Driver'] = 'Aliyundrive';
|
||||||
$tmp['disktag_add'] = $_POST['disktag_add'];
|
$tmp['disktag_add'] = $_POST['disktag_add'];
|
||||||
$tmp['diskname'] = $_POST['diskname'];
|
$tmp['diskname'] = $_POST['diskname'];
|
||||||
|
//error_log(json_encode($tmp));
|
||||||
|
|
||||||
$response = setConfigResponse( setConfig($tmp, $this->disktag) );
|
$response = setConfigResponse( setConfig($tmp, $this->disktag) );
|
||||||
if (api_error($response)) {
|
if (api_error($response)) {
|
||||||
|
@ -684,11 +684,11 @@ class Aliyundrive {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("form1").action="?install0&AddDisk=Aliyundrive";
|
document.getElementById("form1").action="?install0&disktag=" + t.disktag_add.value + "&AddDisk=Aliyundrive";
|
||||||
var expd = new Date();
|
//var expd = new Date();
|
||||||
expd.setTime(expd.getTime()+(2*60*60*1000));
|
//expd.setTime(expd.getTime()+(2*60*60*1000));
|
||||||
var expires = "expires="+expd.toGMTString();
|
//var expires = "expires="+expd.toGMTString();
|
||||||
document.cookie=\'disktag=\'+t.disktag_add.value+\'; path=/; \'+expires;
|
//document.cookie=\'disktag=\'+t.disktag_add.value+\'; path=/; \'+expires;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
|
Loading…
Reference in New Issue