Skip to content

Commit

Permalink
fix backport
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Nov 28, 2024
1 parent 3a6a46e commit 04d4079
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 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
4 changes: 3 additions & 1 deletion lib/Migration/Version0031Date20241105133904.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Closure;
use Doctrine\DBAL\Schema\SchemaException;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\Attributes\AddIndex;
use OCP\Migration\Attributes\IndexType;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
use Psr\Log\LoggerInterface;
Expand All @@ -30,7 +32,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
3 changes: 2 additions & 1 deletion lib/MountManager/CircleMountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public function __construct(
private MountRequest $mountRequest,
private MountPointRequest $mountPointRequest,
private FederatedUserService $federatedUserService,
private ConfigService $configService
private ConfigService $configService,
private LoggerInterface $logger,
) {
}

Expand Down

0 comments on commit 04d4079

Please sign in to comment.