Skip to content

Commit 9fa5357

Browse files
authored
Merge pull request #4736 from nextcloud/fix/share-user-settings
fix applying time zone for shares
2 parents ffd3b56 + 39b9997 commit 9fa5357

58 files changed

Lines changed: 84 additions & 100 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/Activity/PollChanges.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* SPDX-FileCopyrightText: 2021 Nextcloud contributors
66
* SPDX-License-Identifier: AGPL-3.0-or-later
77
*/
8+
89
namespace OCA\Polls\Activity;
910

1011
use OCA\Polls\AppInfo\Application;

lib/Controller/BaseApiV2OCSController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* SPDX-FileCopyrightText: 2024 Nextcloud contributors
66
* SPDX-License-Identifier: AGPL-3.0-or-later
77
*/
8+
89
namespace OCA\Polls\Controller;
910

1011
use Closure;
@@ -45,10 +46,8 @@ public function __construct(
4546
protected function response(Closure $callback, int $successStatus = Http::STATUS_OK): DataResponse {
4647
try {
4748
return new DataResponse($callback(), $successStatus);
48-
4949
} catch (DoesNotExistException $e) {
5050
throw new OCSNotFoundException($e->getMessage());
51-
5251
} catch (Exception $e) {
5352
throw match ($e->getStatus()) {
5453
Http::STATUS_NOT_MODIFIED => new OCSException($e->getMessage(), Http::STATUS_NOT_MODIFIED),

lib/Controller/PublicController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public function getSession(): JSONResponse {
121121
});
122122
}
123123

124-
125124
/**
126125
* Watch poll for updates
127126
* @param string $mode the mode of watching, e.g. 'longPolling'
@@ -448,7 +447,6 @@ public function setDisplayName(string $token, string $displayName): JSONResponse
448447
]);
449448
}
450449

451-
452450
/**
453451
* Set EmailAddress
454452
* @param string $token Share token
@@ -507,9 +505,10 @@ public function register(string $token, string $displayName, string $emailAddres
507505
#[FrontpageRoute(verb: 'POST', url: '/s/{token}/resend')]
508506
public function resendInvitation(string $token): JSONResponse {
509507
$share = $this->shareService->getEffectiveShare($token);
508+
$sentResult = new SentResult();
510509
return $this->response(fn () => [
511510
'share' => $share,
512-
'sentResult' => $this->mailService->sendInvitation($share, new SentResult()),
511+
'sentResult' => $this->mailService->sendInvitation($share, $sentResult),
513512
]);
514513
}
515514
}

lib/Cron/JanitorCron.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ protected function run($argument) {
102102
$this->logger->info('JanitorCron: ' . $message);
103103
}
104104

105-
106105
// archive polls after defined days after closing date
107106
$autoArchiveOffset = $this->appSettings->getAutoArchiveOffsetDays();
108107

lib/Cron/UserDeletedJob.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use OCA\Polls\Db\LogMapper;
1414
use OCA\Polls\Db\OptionMapper;
1515
use OCA\Polls\Db\PollMapper;
16-
1716
use OCA\Polls\Db\PreferencesMapper;
1817
use OCA\Polls\Db\Share;
1918
use OCA\Polls\Db\ShareMapper;

lib/Db/CommentMapper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public function purgeDeletedComments(int $offset): int {
9494
$query->setMaxResults(999);
9595

9696
return $query->executeStatement();
97-
9897
}
9998

10099
/**

lib/Db/Log.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
namespace OCA\Polls\Db;
1010

1111
use JsonSerializable;
12-
1312
use OCP\AppFramework\Db\Entity;
1413

1514
/**

lib/Db/OptionMapper.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ public function getMinDate(int $pollId): int|false {
134134
return $qb->executeQuery()->fetchOne();
135135
}
136136

137-
138137
/**
139138
* Get the maximum date of all options in a poll
140139
*
@@ -207,15 +206,13 @@ protected function buildQuery(bool $hideResults = false): IQueryBuilder {
207206
->groupBy(self::TABLE . '.id')
208207
->orderBy('order', 'ASC');
209208

210-
211209
$this->joinVotesCount($qb, self::TABLE, hideResults: $hideResults);
212210
$this->joinPollForLimits($qb, self::TABLE);
213211
$this->joinCurrentUserVote($qb, self::TABLE, $currentUserId);
214212
$this->joinCurrentUserVoteCount($qb, self::TABLE, $currentUserId);
215213
$this->joinAnon($qb, self::TABLE);
216214
$this->joinShareRole($qb, self::TABLE, $currentUserId);
217215

218-
219216
return $qb;
220217
}
221218

lib/Db/Poll.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ private function getMaxDate(): int {
611611
return $this->maxDate;
612612
}
613613

614-
615614
private function setMiscSettingsArray(array $value): void {
616615
$this->setMiscSettings(json_encode($value));
617616
}
@@ -926,7 +925,6 @@ public function getIsPollOwner(): bool {
926925
return ($this->getUserRole() === Poll::ROLE_OWNER);
927926
}
928927

929-
930928
/**
931929
* Permission checks
932930
*/
@@ -1044,5 +1042,4 @@ private function getAllowShowResults(): bool {
10441042
return $this->getShowResults() === Poll::SHOW_RESULTS_ALWAYS;
10451043
}
10461044

1047-
10481045
}

lib/Db/PollGroupMapper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public function add(PollGroup $pollGroup): PollGroup {
9898
$pollGroup->setCreated(time());
9999
$pollGroup->setOwner($this->userSession->getCurrentUserId());
100100
return $this->insert($pollGroup);
101-
102101
}
103102

104103
/**

0 commit comments

Comments
 (0)