diff options
author | PhieF <phie@phie.ovh> | 2020-10-08 00:10:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 00:10:28 +0300 |
commit | c4b91c736e7d360402ba44e555684aa1ca55cd5b (patch) | |
tree | 89a9acf61fac83cba289d46562e289df3418c873 | |
parent | 711d515e680101f0c94d782a2e17da75a661e04d (diff) | |
parent | 72e1e83bc567c211bf38757b5373f2a037f0dd82 (diff) |
Merge pull request #127 from vacy/patch-1
take nextcloud installation directory into account
-rwxr-xr-x | lib/Controller/NoteController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index cb4b3cf..d7c47d3 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -1203,8 +1203,12 @@ public function getOpusEncoder(){ * @NoCSRFRequired */ public function downloadArchive(){ - - return new RedirectResponse("../../../../../index.php/apps/files/ajax/download.php?files=".$this->getNotePath()); + $tmp = substr($_SERVER['REQUEST_URI'],1); + $tmp = strchr($tmp,"/", "true"); + if ($tmp == "index.php") { + $tmp = ""; + } + return new RedirectResponse("../../../../../".$tmp."/index.php/apps/files/ajax/download.php?files=".$this->getNotePath()); } |