Skip to content

Commit 420d395

Browse files
authored
Merge pull request #27415 from nextcloud/backport/26494/stable21
2 parents 82d1bc2 + 9f3824b commit 420d395

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

apps/files/lib/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public static function getFiles($dir, $sortAttribute = 'name', $sortDescending =
217217
* @param ITagManager $tagManager
218218
* @return array file list populated with tags
219219
*/
220-
public static function populateTags(array $fileList, $fileIdentifier = 'fileid', ITagManager $tagManager) {
220+
public static function populateTags(array $fileList, $fileIdentifier, ITagManager $tagManager) {
221221
$ids = [];
222222
foreach ($fileList as $fileData) {
223223
$ids[] = $fileData[$fileIdentifier];

core/Controller/PreviewController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ private function fetchPreview(
156156
Node $node,
157157
int $x,
158158
int $y,
159-
bool $a = false,
160-
bool $forceIcon = true,
159+
bool $a,
160+
bool $forceIcon,
161161
string $mode) : Http\Response {
162162
if (!($node instanceof File) || (!$forceIcon && !$this->preview->isAvailable($node))) {
163163
return new DataResponse([], Http::STATUS_NOT_FOUND);

lib/private/Files/Config/CachedMountFileInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CachedMountFileInfo extends CachedMountInfo implements ICachedMountFileInf
3131
/** @var string */
3232
private $internalPath;
3333

34-
public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId = null, $rootInternalPath = '', $internalPath) {
34+
public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath, $internalPath) {
3535
parent::__construct($user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath);
3636
$this->internalPath = $internalPath;
3737
}

lib/private/Files/View.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,9 @@ public function filesize($path) {
422422
*/
423423
public function readfile($path) {
424424
$this->assertPathLength($path);
425-
@ob_end_clean();
425+
if (ob_get_level()) {
426+
ob_end_clean();
427+
}
426428
$handle = $this->fopen($path, 'rb');
427429
if ($handle) {
428430
$chunkSize = 524288; // 512 kB chunks
@@ -446,7 +448,9 @@ public function readfile($path) {
446448
*/
447449
public function readfilePart($path, $from, $to) {
448450
$this->assertPathLength($path);
449-
@ob_end_clean();
451+
if (ob_get_level()) {
452+
ob_end_clean();
453+
}
450454
$handle = $this->fopen($path, 'rb');
451455
if ($handle) {
452456
$chunkSize = 524288; // 512 kB chunks

lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function setHeaderActions(array $actions) {
9797
$this->headerActions[] = $action;
9898
}
9999
usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) {
100-
return $a->getPriority() > $b->getPriority();
100+
return $a->getPriority() <=> $b->getPriority();
101101
});
102102
}
103103

0 commit comments

Comments
 (0)