Skip to content

Commit 1024558

Browse files
committed
fixup! perf(external-sharing): Port to Entity and SnowflakeId
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
1 parent 86f5418 commit 1024558

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

apps/files_sharing/lib/External/ExternalShare.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* @method void setUser(string $user)
4141
* @method string getMountpoint()
4242
* @method string getMountpointHash()
43-
* @method void setMountPointHash(string $mountPointHash)
43+
* @method void setMountpointHash(string $mountPointHash)
4444
* @method int getAccepted()
4545
* @method void setAccepted(int $accepted)
4646
*
@@ -106,7 +106,7 @@ public function jsonSerialize(): array {
106106
'owner' => $this->getOwner(),
107107
'user' => $this->getUser(),
108108
'mountpoint' => $this->getMountpoint(),
109-
'accepted' => $this->getAccepted(),
109+
'accepted' => $this->getAccepted() ? true : false,
110110

111111
// Added later on
112112
'file_id' => null,

apps/files_sharing/lib/External/Manager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function addShare(ExternalShare $shareExternal, IUser|IGroup|null $userOr
8080
// mount point name will be generated when accepting the share,
8181
// using the original share item name.
8282
$tmpMountPointName = '{{TemporaryMountPointName#' . $shareExternal->getName() . '}}';
83-
$shareExternal->setMountPoint($tmpMountPointName);
83+
$shareExternal->setMountpoint($tmpMountPointName);
8484
$shareExternal->setUserOrGroup($userOrGroup);
8585

8686
$i = 1;
@@ -90,7 +90,7 @@ public function addShare(ExternalShare $shareExternal, IUser|IGroup|null $userOr
9090
break;
9191
} catch (Exception $e) {
9292
if ($e->getReason() === Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
93-
$shareExternal->setMountPoint($tmpMountPointName . '-' . $i);
93+
$shareExternal->setMountpoint($tmpMountPointName . '-' . $i);
9494
$i++;
9595
} else {
9696
throw $e;
@@ -107,7 +107,7 @@ public function addShare(ExternalShare $shareExternal, IUser|IGroup|null $userOr
107107
$mountPoint = $userFolder->getNonExistingName($shareExternal->getName());
108108

109109
$mountPoint = Filesystem::normalizePath('/' . $mountPoint);
110-
$shareExternal->setMountPoint($mountPoint);
110+
$shareExternal->setMountpoint($mountPoint);
111111
$shareExternal->setUserOrGroup($user);
112112
$this->externalShareMapper->insert($shareExternal);
113113

build/integration/features/bootstrap/Sharing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ public function checkShareFields($body) {
524524
$value = str_replace('LOCAL', substr($this->localBaseUrl, 0, -4), $value);
525525
}
526526
if (!$this->isFieldInResponse($field, $value)) {
527-
Assert::fail("$field" . " doesn't have value " . "$value" . " but has value " . $this->getFieldValueInResponse($field));
527+
Assert::fail("$field" . " doesn't have value " . "$value" . ' but has value ' . $this->getFieldValueInResponse($field));
528528
}
529529
}
530530
}

0 commit comments

Comments
 (0)