Skip to content

Commit

Permalink
Merge pull request #38861 from owncloud/release-10.8.0
Browse files Browse the repository at this point in the history
Merge back Release 10.8.0
  • Loading branch information
micbar authored Jul 21, 2021
2 parents 79d3c63 + 871196b commit ba8e48e
Show file tree
Hide file tree
Showing 74 changed files with 331 additions and 258 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ vendor-bin/**/composer.lock

# Tests - auto-generated files
/data-autotest
/tests/.phpunit.result.cache
/tests/coverage*
/tests/karma-coverage
/tests/acceptance/server_tmp
Expand All @@ -138,7 +137,7 @@ vendor-bin/**/composer.lock
clover.xml
/tests/output
.php-cs-fixer.cache

.phpunit.result.cache
# old php-cs-fixer v2 files
.php_cs.cache
.php_cs
Expand Down
1 change: 1 addition & 0 deletions apps/files/css/files.css
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ table td.filename .nametext {
text-overflow: clip;
max-width: 800px;
height: 100%;
width: 100%;
}

.has-favorites #fileList td.filename a.name {
Expand Down
9 changes: 8 additions & 1 deletion apps/files/lib/Command/VerifyChecksums.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,14 @@ private function verifyChecksumsForFile($file, InputInterface $input, OutputInte
return;
}

if (!self::fileExistsOnDisk($file)) {
try {
$fileExistsOnDisk = self::fileExistsOnDisk($file);
} catch (StorageNotAvailableException $e) {
$output->writeln("Skipping $storageId/$path => Storage is not available", OutputInterface::VERBOSITY_VERBOSE);
return;
}

if (!$fileExistsOnDisk) {
$output->writeln("Skipping $storageId/$path => File is in file-cache but doesn't exist on storage/disk", OutputInterface::VERBOSITY_VERBOSE);
return;
}
Expand Down
5 changes: 3 additions & 2 deletions apps/files_sharing/lib/ExpireSharesJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,19 @@ public function run($argument) {

$shares = $qb->execute();
while ($share = $shares->fetch()) {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
try {
/*
* The type of $share['id'] changes depends on the db type. (int for pgsql, string for others)
* This situation led to problem when stubbing method in tests.
* $share['id'] has been casted to string to ensure consistency.
*/
$shareObject = $this->defaultShareProvider->getShareById((string)$share['id']);
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
$this->shareManager->deleteShare($shareObject);
$this->activityManager->restoreAgentAuthor();
} catch (ShareNotFound $ex) {
//already deleted
} finally {
$this->activityManager->restoreAgentAuthor();
}
}
$shares->closeCursor();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ were triggered by an automation (like the workflow app e.g.).

https://github.com/owncloud/core/pull/38605
https://github.com/owncloud/core/pull/38630
https://github.com/owncloud/core/pull/38970
https://github.com/owncloud/enterprise/issues/4222
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Implemented an action to resend the invitation email for a user that has
never been logged in yet.

https://github.com/owncloud/core/pull/38774
https://github.com/owncloud/core/pull/38963
https://github.com/owncloud/enterprise/issues/4577
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ The command now skips files with exceptions instead of crashing.
A proper message will be displayed to the user who fires the command.

https://github.com/owncloud/core/pull/38785
https://github.com/owncloud/core/pull/39005
https://github.com/owncloud/core/issues/38782
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions changelog/10.8.0_2021-07-15/38962
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change: Update url for sync client button and docs


https://github.com/owncloud/core/pull/38962
https://github.com/owncloud/core/issues/38957
3 changes: 2 additions & 1 deletion core/css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@
opacity: .7;
box-sizing: border-box;
}
#expanddiv a img, .icon {
#expanddiv a img,
#expanddiv a .icon {
display: inline-block;
margin-bottom: -3px;
margin-right: 6px;
Expand Down
34 changes: 22 additions & 12 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1263,12 +1263,13 @@ public function getAllSharesBy($userId, $shareTypes, $nodeIDs, $reshares = false
$queriedShares = $provider->getAllSharesBy($userId, $shareTypeArray, $nodeIDs, $reshares);
foreach ($queriedShares as $queriedShare) {
if (self::shareHasExpired($queriedShare)) {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
try {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
$this->deleteShare($queriedShare);
$this->activityManager->restoreAgentAuthor();
} catch (NotFoundException $e) {
//Ignore since this basically means the share is deleted
} finally {
$this->activityManager->restoreAgentAuthor();
}
continue;
}
Expand Down Expand Up @@ -1304,12 +1305,13 @@ public function getSharesBy($userId, $shareType, $path = null, $reshares = false
foreach ($shares as $share) {
// Check if the share is expired and if so delete it
if (self::shareHasExpired($share)) {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
try {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
$this->deleteShare($share);
$this->activityManager->restoreAgentAuthor();
} catch (NotFoundException $e) {
//Ignore since this basically means the share is deleted
} finally {
$this->activityManager->restoreAgentAuthor();
}
continue;
}
Expand Down Expand Up @@ -1365,12 +1367,13 @@ public function getSharedWith($userId, $shareType, $node = null, $limit = 50, $o
foreach ($shares as $share) {
// Check if the share is expired and if so delete it
if (self::shareHasExpired($share)) {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
try {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
$this->deleteShare($share);
$this->activityManager->restoreAgentAuthor();
} catch (NotFoundException $e) {
//Ignore since this basically means the share is deleted
} finally {
$this->activityManager->restoreAgentAuthor();
}
continue;
}
Expand Down Expand Up @@ -1424,12 +1427,13 @@ public function getAllSharedWith($userId, $shareTypes, $node = null) {
$queriedShares = $provider->getAllSharedWith($userId, $node);
foreach ($queriedShares as $queriedShare) {
if (self::shareHasExpired($queriedShare)) {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
try {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
$this->deleteShare($queriedShare);
$this->activityManager->restoreAgentAuthor();
} catch (NotFoundException $e) {
//Ignore since this basically means the share is deleted
} finally {
$this->activityManager->restoreAgentAuthor();
}
continue;
}
Expand All @@ -1456,8 +1460,11 @@ public function getShareById($id, $recipient = null) {
// Validate shares expiration date
if (self::shareHasExpired($share)) {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
$this->deleteShare($share);
$this->activityManager->restoreAgentAuthor();
try {
$this->deleteShare($share);
} finally {
$this->activityManager->restoreAgentAuthor();
}
throw new ShareNotFound();
}

Expand Down Expand Up @@ -1514,8 +1521,11 @@ public function getShareByToken($token) {

if (self::shareHasExpired($share)) {
$this->activityManager->setAgentAuthor(IEvent::AUTOMATION_AUTHOR);
$this->deleteShare($share);
$this->activityManager->restoreAgentAuthor();
try {
$this->deleteShare($share);
} finally {
$this->activityManager->restoreAgentAuthor();
}
throw new ShareNotFound();
}

Expand Down
Loading

0 comments on commit ba8e48e

Please sign in to comment.