try fix: sharepoint name is non english

pull/187/head
qkqpttgf 2021-01-15 18:32:32 +08:00 committed by GitHub
parent 894121d0c6
commit 1102d4234f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -740,11 +740,14 @@ class Onedrive {
//$sharepointSite = getConfig('sharepointSite', $this->disktag); //$sharepointSite = getConfig('sharepointSite', $this->disktag);
while (substr($sharepointSite, -1)=='/') $sharepointSite = substr($sharepointSite, 0, -1); while (substr($sharepointSite, -1)=='/') $sharepointSite = substr($sharepointSite, 0, -1);
$tmp = splitlast($sharepointSite, '/'); $tmp = splitlast($sharepointSite, '/');
$sharepointname = urlencode($tmp[1]); if ($tmp[1]==urldecode($tmp[1])) {
$sharepointname = urlencode($tmp[1]);
} else {
$sharepointname = $tmp[1];
}
$tmp = splitlast($tmp[0], '/'); $tmp = splitlast($tmp[0], '/');
$sharepointname = $tmp[1] . '/' . $sharepointname; if (getConfig('Driver', $this->disktag)=='Onedrive') $url = 'https://graph.microsoft.com/v1.0/sites/root:/' . $tmp[1] . '/' . $sharepointname;
if (getConfig('Driver', $this->disktag)=='Onedrive') $url = 'https://graph.microsoft.com/v1.0/sites/root:/' . $sharepointname; if (getConfig('Driver', $this->disktag)=='OnedriveCN') $url = 'https://microsoftgraph.chinacloudapi.cn/v1.0/sites/root:/' . $tmp[1] . '/' . $sharepointname;
if (getConfig('Driver', $this->disktag)=='OnedriveCN') $url = 'https://microsoftgraph.chinacloudapi.cn/v1.0/sites/root:/' . $sharepointname;
$i=0; $i=0;
$response = []; $response = [];