Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvacy <vacy@users.noreply.github.com>2020-09-20 12:45:35 +0300
committerGitHub <noreply@github.com>2020-09-20 12:45:35 +0300
commit72e1e83bc567c211bf38757b5373f2a037f0dd82 (patch)
tree881a0ccc08d2e0987fa62458b52aaaab576f8150
parent60c5cc5c146fd6d97af3ac8db657909d0524868f (diff)
take nextcloud installation directory into account
https://github.com/CarnetApp/CarnetNextcloud/issues/125
-rwxr-xr-xlib/Controller/NoteController.php8
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());
}