Skip to content

Commit

Permalink
fix backport
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Nov 28, 2024
1 parent 3a6a46e commit a9041a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/Db/MountRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public function save(Mount $mount): void {
->setValue('single_id', $qb->createNamedParameter($mount->getOwner()->getSingleId()))
->setValue('token', $qb->createNamedParameter($mount->getToken()))
->setValue('parent', $qb->createNamedParameter($mount->getParent()))
->setValue('mountpoint', $qb->createNamedParameter($mount->getMountPoint()))
->setValue('mountpoint_hash', $qb->createNamedParameter(md5($mount->getMountPoint())));
->setValue('mountpoint', $qb->createNamedParameter($mount->getOriginalMountPoint()))
->setValue('mountpoint_hash', $qb->createNamedParameter(md5($mount->getOriginalMountPoint())));

$qb->execute();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version0031Date20241105133904.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt

try {
$table = $schema->getTable('circles_mountpoint');
if (!$table->hasIndex('dname')) {
if (!$table->hasIndex('mp_sid_hash')) {
$table->addUniqueIndex(['single_id', 'mountpoint_hash'], 'mp_sid_hash');
}
} catch (SchemaException $e) {
Expand Down
7 changes: 3 additions & 4 deletions lib/MountManager/CircleMountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
class CircleMountProvider implements IMountProvider {
use TArrayTools;

public const EXTERNAL_STORAGE = ExternalStorage::class;

public function __construct(
private IClientService $clientService,
private IRootFolder $rootFolder,
Expand All @@ -72,7 +70,8 @@ public function __construct(
private MountRequest $mountRequest,
private MountPointRequest $mountPointRequest,
private FederatedUserService $federatedUserService,
private ConfigService $configService
private ConfigService $configService,
private LoggerInterface $logger,
) {
}

Expand Down Expand Up @@ -129,7 +128,7 @@ public function generateCircleMount(Mount $mount, IStorageFactory $storageFactor

return new CircleMount(
$mount,
self::EXTERNAL_STORAGE,
ExternalStorage::class,
$storageFactory
);
}
Expand Down

0 comments on commit a9041a8

Please sign in to comment.