Skip to content

Commit

Permalink
Keep older php version supported
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Nov 10, 2023
1 parent f116f52 commit 8b8b8a1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,16 @@ public function checkFileInfo(string $fileId, string $access_token): JSONRespons
'IsUserLocked' => $this->permissionManager->userIsFeatureLocked($wopi->getEditorUid()),
'EnableRemoteLinkPicker' => (bool)$wopi->getCanwrite() && !$isPublic && !$wopi->getDirect(),
'HideUserList' => '',
...$this->watermarkService->getWopiParams($wopi),
...$this->templateManager->getWopiParams($wopi),
...$this->watermarkService->getWopiParams($wopi),
...$this->checkFileInfoUserExtraInfo($wopi),
...$this->setFederationFileInfo($wopi),
...$this->checkFileInfoHideDownload($wopi),
...$this->watermarkService->getWopiParams($wopi),
];
$response = array_merge(
$response,
// TODO: Once PHP is >= 8.1 we can use array unpacking with string-keyed arrays
$this->templateManager->getWopiParams($wopi),
$this->watermarkService->getWopiParams($wopi),
$this->checkFileInfoUserExtraInfo($wopi),
$this->setFederationFileInfo($wopi),
$this->checkFileInfoHideDownload($wopi),
);

$enableZotero = $this->config->getAppValue(Application::APPNAME, 'zoteroEnabled', 'yes') === 'yes';
if (!$isPublic && $enableZotero) {
Expand Down

0 comments on commit 8b8b8a1

Please sign in to comment.