diff --git a/disk/Onedrive.php b/disk/Onedrive.php index 3ae42a0..35c2158 100644 --- a/disk/Onedrive.php +++ b/disk/Onedrive.php @@ -446,7 +446,7 @@ class Onedrive { $envs = ''; foreach ($EnvConfigs as $env => $v) if (isCommonEnv($env)) $envs .= '\'' . $env . '\', '; - $url = path_format($_SERVER['PHP_SELF'] . '/'); + $url = path_format($_SERVER['base_path'] . '/'); //$this->api_url = splitfirst($_SERVER['api_url'], '/v1.0')[0] . '/v1.0'; if (isset($_GET['Finish'])) { @@ -478,8 +478,8 @@ class Onedrive { } else { return message($arr['stat'] . $arr['body'], 'Get User ID', $arr['stat']); }*/ - if (get_class($this)=='Sharepoint') $tmp['Driver'] = 'Onedrive'; - elseif (get_class($this)=='SharepointCN') $tmp['Driver'] = 'OnedriveCN'; + if ($tmp['Driver']=='Sharepoint') $tmp['Driver'] = 'Onedrive'; + elseif ($tmp['Driver']=='SharepointCN') $tmp['Driver'] = 'OnedriveCN'; $tmp['sharepointSite'] = ''; $tmp['siteid'] = ''; } elseif ($_POST['DriveType']=='Custom') { @@ -492,14 +492,14 @@ class Onedrive { //if ($arr['stat']!=200) return message($arr['stat'] . $arr['body'], 'Get Sharepoint Drive ID ' . $_POST['DriveType'], $arr['stat']); $tmp['siteid'] = $siteid; $tmp['sharepointSite'] = $_POST['sharepointSite']; - if (get_class($this)=='Onedrive') $tmp['Driver'] = 'Sharepoint'; - elseif (get_class($this)=='OnedriveCN') $tmp['Driver'] = 'SharepointCN'; + if ($tmp['Driver']=='Onedrive') $tmp['Driver'] = 'Sharepoint'; + elseif ($tmp['Driver']=='OnedriveCN') $tmp['Driver'] = 'SharepointCN'; } else { // 直接是siteid $tmp['siteid'] = $_POST['DriveType']; $tmp['sharepointSite'] = $_POST['sharepointSiteUrl']; - if (get_class($this)=='Onedrive') $tmp['Driver'] = 'Sharepoint'; - elseif (get_class($this)=='OnedriveCN') $tmp['Driver'] = 'SharepointCN'; + if ($tmp['Driver']=='Onedrive') $tmp['Driver'] = 'Sharepoint'; + elseif ($tmp['Driver']=='OnedriveCN') $tmp['Driver'] = 'SharepointCN'; } $response = setConfigResponse( setConfig($tmp, $this->disktag) ); @@ -520,11 +520,11 @@ class Onedrive { console.log(i++); } else { clearInterval(uploadList); - location.href = "' . $url . '"; + location.href = "' . $url . '?setup&disktag=' . $_GET['disktag'] . '"; } }, 1000); '; - return message($html, getconstStr('WaitJumpIndex'), 201, 1); + return message($html, getconstStr('Wait'), 201, 1); } } @@ -554,12 +554,13 @@ class Onedrive { $title = 'Select Driver'; $html = '