ci: make remote.php default

docs: add documentation

test: rename uniquePath to suffixPath
This commit is contained in:
Saw-jan
2024-10-21 12:24:50 +05:45
parent f86d137f87
commit 766ad4b40c
15 changed files with 151 additions and 109 deletions

View File

@@ -235,13 +235,13 @@ trait WebDav {
}
$davPathVersion = $this->getDavPathVersion();
$uniquePath = $user;
$suffixPath = $user;
if ($davPathVersion === WebDavHelper::DAV_VERSION_SPACES) {
$uniquePath = $spaceId;
$suffixPath = $spaceId;
}
$davPath = WebDavHelper::getDavPath($davPathVersion, $uniquePath);
$path = "{$this->getBasePath()}/{$davPath}";
$davPath = WebDavHelper::getDavPath($davPathVersion, $suffixPath);
$path = "{$this->getBasePath()}/$davPath";
$path = WebDavHelper::sanitizeUrl($path);
return \ltrim($path, "/");
}
@@ -253,7 +253,7 @@ trait WebDav {
*/
public function getPublicLinkDavPath(string $token):string {
$davPath = WebDavHelper::getDavPath($this->getDavPathVersion(), $token, "public-files");
$path = "{$this->getBasePath()}/{$davPath}";
$path = "{$this->getBasePath()}/$davPath";
$path = WebDavHelper::sanitizeUrl($path);
return \ltrim($path, "/");
}
@@ -484,12 +484,12 @@ trait WebDav {
}
$davPathVersion = $this->getDavPathVersion();
$uniquePath = $user;
$suffixPath = $user;
if ($davPathVersion === WebDavHelper::DAV_VERSION_SPACES) {
$uniquePath = $spaceId;
$suffixPath = $spaceId;
}
$davPath = WebDavHelper::getDavPath($davPathVersion, $uniquePath);
$davPath = WebDavHelper::getDavPath($davPathVersion, $suffixPath);
$fullUrl = $this->getBaseUrl() . "/$davPath";
return \rtrim($fullUrl, '/') . '/' . $fileDestination;
}
@@ -1114,7 +1114,7 @@ trait WebDav {
public function publicGetsSizeOfLastSharedPublicLinkUsingTheWebdavApi():void {
$token = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedLinkShareToken() : $this->getLastCreatedPublicShareToken();
$davPath = WebDavHelper::getDavPath($this->getDavPathVersion(), $token, "public-files");
$url = "{$this->getBaseUrl()}/{$davPath}";
$url = "{$this->getBaseUrl()}/$davPath";
$this->response = HttpRequestHelper::sendRequest(
$url,
$this->getStepLineRef(),
@@ -3849,13 +3849,13 @@ trait WebDav {
}
$davPathVersion = $this->getDavPathVersion();
$uniquePath = $user;
$suffixPath = $user;
if ($davPathVersion === WebDavHelper::DAV_VERSION_SPACES) {
$uniquePath = $this->getSharesMountPath($user, $path);
$suffixPath = $this->getSharesMountPath($user, $path);
$path = "";
}
$path = \ltrim($path, "/");
$davPath = WebDavHelper::getDavPath($this->getDavPathVersion(), $uniquePath);
$davPath = WebDavHelper::getDavPath($this->getDavPathVersion(), $suffixPath);
$davPath = \rtrim($davPath, "/");
$fullUrl = $this->getBaseUrl() . "/$davPath/$path?$urlParameter";