summaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-09-29 21:23:45 +0200
committerRobin Appelman <robin@icewind.nl>2022-11-08 17:13:37 +0100
commit1be1c23c056e899a06cb2830d94a5d84db772a0a (patch)
tree5b0f58552ab60fcf3c4d3f98970c26aff168a28b /core/Command
parent3d68a526e7ede5e2db13ffa69177a933a278b806 (diff)
downloadnextcloud-server-1be1c23c056e899a06cb2830d94a5d84db772a0a.tar.gz
nextcloud-server-1be1c23c056e899a06cb2830d94a5d84db772a0a.zip
More verbose output for repair share ownership cmd
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Maintenance/RepairShareOwnership.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Command/Maintenance/RepairShareOwnership.php b/core/Command/Maintenance/RepairShareOwnership.php
index 351f2b9b0ed..1175ff469b7 100644
--- a/core/Command/Maintenance/RepairShareOwnership.php
+++ b/core/Command/Maintenance/RepairShareOwnership.php
@@ -92,7 +92,7 @@ class RepairShareOwnership extends Command {
protected function repairWrongShareOwnershipForUser(IUser $user, bool $dryRun = true): array {
$qb = $this->dbConnection->getQueryBuilder();
$brokenShare = $qb
- ->select('s.id', 'm.user_id', 's.uid_owner', 's.uid_initiator', 's.share_with', 's.share_type')
+ ->select('s.id', 'm.user_id', 's.uid_owner', 's.uid_initiator', 's.share_with', 's.share_type', 's.file_target')
->from('share', 's')
->join('s', 'filecache', 'f', $qb->expr()->eq('s.item_source', $qb->expr()->castColumn('f.fileid', IQueryBuilder::PARAM_STR)))
->join('s', 'mounts', 'm', $qb->expr()->eq('f.storage', 'm.storage_id'))
@@ -107,12 +107,13 @@ class RepairShareOwnership extends Command {
foreach ($brokenShare as $queryResult) {
$shareId = (int) $queryResult['id'];
$shareType = (int) $queryResult['share_type'];
+ $fileTarget = $queryResult['file_target'];
$initiator = $queryResult['uid_initiator'];
$receiver = $queryResult['share_with'];
$owner = $queryResult['uid_owner'];
$mountOwner = $queryResult['user_id'];
- $found[] = "Found share from $initiator to $receiver, owned by $owner, that should be owned by $mountOwner";
+ $found[] = "Found share with id $shareId from \"$initiator\" to \"$receiver\" (target mount \"$fileTarget\"), owned by \"$owner\", that should be owned by \"$mountOwner\"";
if ($dryRun) {
continue;