Merge 7990f95558
into 46dbc8fa98
This commit is contained in:
commit
a08a199391
|
@ -217,7 +217,7 @@ class Helper {
|
||||||
* @param ITagManager $tagManager
|
* @param ITagManager $tagManager
|
||||||
* @return array file list populated with tags
|
* @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 = [];
|
$ids = [];
|
||||||
foreach ($fileList as $fileData) {
|
foreach ($fileList as $fileData) {
|
||||||
$ids[] = $fileData[$fileIdentifier];
|
$ids[] = $fileData[$fileIdentifier];
|
||||||
|
|
|
@ -156,8 +156,8 @@ class PreviewController extends Controller {
|
||||||
Node $node,
|
Node $node,
|
||||||
int $x,
|
int $x,
|
||||||
int $y,
|
int $y,
|
||||||
bool $a = false,
|
bool $a,
|
||||||
bool $forceIcon = true,
|
bool $forceIcon,
|
||||||
string $mode) : Http\Response {
|
string $mode) : Http\Response {
|
||||||
if (!($node instanceof File) || (!$forceIcon && !$this->preview->isAvailable($node))) {
|
if (!($node instanceof File) || (!$forceIcon && !$this->preview->isAvailable($node))) {
|
||||||
return new DataResponse([], Http::STATUS_NOT_FOUND);
|
return new DataResponse([], Http::STATUS_NOT_FOUND);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CachedMountFileInfo extends CachedMountInfo implements ICachedMountFileInf
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $internalPath;
|
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);
|
parent::__construct($user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath);
|
||||||
$this->internalPath = $internalPath;
|
$this->internalPath = $internalPath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -422,7 +422,9 @@ class View {
|
||||||
*/
|
*/
|
||||||
public function readfile($path) {
|
public function readfile($path) {
|
||||||
$this->assertPathLength($path);
|
$this->assertPathLength($path);
|
||||||
@ob_end_clean();
|
if (ob_get_level()) {
|
||||||
|
ob_end_clean();
|
||||||
|
}
|
||||||
$handle = $this->fopen($path, 'rb');
|
$handle = $this->fopen($path, 'rb');
|
||||||
if ($handle) {
|
if ($handle) {
|
||||||
$chunkSize = 524288; // 512 kB chunks
|
$chunkSize = 524288; // 512 kB chunks
|
||||||
|
@ -446,7 +448,9 @@ class View {
|
||||||
*/
|
*/
|
||||||
public function readfilePart($path, $from, $to) {
|
public function readfilePart($path, $from, $to) {
|
||||||
$this->assertPathLength($path);
|
$this->assertPathLength($path);
|
||||||
@ob_end_clean();
|
if (ob_get_level()) {
|
||||||
|
ob_end_clean();
|
||||||
|
}
|
||||||
$handle = $this->fopen($path, 'rb');
|
$handle = $this->fopen($path, 'rb');
|
||||||
if ($handle) {
|
if ($handle) {
|
||||||
$chunkSize = 524288; // 512 kB chunks
|
$chunkSize = 524288; // 512 kB chunks
|
||||||
|
|
|
@ -97,7 +97,7 @@ class PublicTemplateResponse extends TemplateResponse {
|
||||||
$this->headerActions[] = $action;
|
$this->headerActions[] = $action;
|
||||||
}
|
}
|
||||||
usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) {
|
usort($this->headerActions, function (IMenuAction $a, IMenuAction $b) {
|
||||||
return $a->getPriority() > $b->getPriority();
|
return $a->getPriority() <=> $b->getPriority();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue