Skip to content

Commit

Permalink
Merge pull request #27415 from nextcloud/backport/26494/stable21
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Jun 14, 2021
2 parents 82d1bc2 + 9f3824b commit 420d395
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/files/lib/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public static function getFiles($dir, $sortAttribute = 'name', $sortDescending =
* @param ITagManager $tagManager
* @return array file list populated with tags
*/
public static function populateTags(array $fileList, $fileIdentifier = 'fileid', ITagManager $tagManager) {
public static function populateTags(array $fileList, $fileIdentifier, ITagManager $tagManager) {
$ids = [];
foreach ($fileList as $fileData) {
$ids[] = $fileData[$fileIdentifier];
Expand Down
4 changes: 2 additions & 2 deletions core/Controller/PreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ private function fetchPreview(
Node $node,
int $x,
int $y,
bool $a = false,
bool $forceIcon = true,
bool $a,
bool $forceIcon,
string $mode) : Http\Response {
if (!($node instanceof File) || (!$forceIcon && !$this->preview->isAvailable($node))) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Config/CachedMountFileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CachedMountFileInfo extends CachedMountInfo implements ICachedMountFileInf
/** @var string */
private $internalPath;

public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId = null, $rootInternalPath = '', $internalPath) {
public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath, $internalPath) {
parent::__construct($user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath);
$this->internalPath = $internalPath;
}
Expand Down
8 changes: 6 additions & 2 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,9 @@ public function filesize($path) {
*/
public function readfile($path) {
$this->assertPathLength($path);
@ob_end_clean();
if (ob_get_level()) {
ob_end_clean();
}
$handle = $this->fopen($path, 'rb');
if ($handle) {
$chunkSize = 524288; // 512 kB chunks
Expand All @@ -446,7 +448,9 @@ public function readfile($path) {
*/
public function readfilePart($path, $from, $to) {
$this->assertPathLength($path);
@ob_end_clean();
if (ob_get_level()) {
ob_end_clean();
}
$handle = $this->fopen($path, 'rb');
if ($handle) {
$chunkSize = 524288; // 512 kB chunks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function setHeaderActions(array $actions) {
$this->headerActions[] = $action;
}
usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) {
return $a->getPriority() > $b->getPriority();
return $a->getPriority() <=> $b->getPriority();
});
}

Expand Down

0 comments on commit 420d395

Please sign in to comment.