diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-01-10 12:11:26 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-01-10 12:13:05 +0100 |
commit | 22079347ea8798bcec80d56793e87adae1de499b (patch) | |
tree | 2b4b05fd40e77f3d1bef10f9f1667e70ccef5a29 | |
parent | 4b28da1dd9a6acf4f04b69474f18ce883323caa3 (diff) | |
download | nextcloud-server-22079347ea8798bcec80d56793e87adae1de499b.tar.gz nextcloud-server-22079347ea8798bcec80d56793e87adae1de499b.zip |
Fix webdav url
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 2 | ||||
-rw-r--r-- | apps/files/templates/appnavigation.php | 2 | ||||
-rw-r--r-- | apps/files/tests/Controller/ViewControllerTest.php | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index ed3fff223f7..688db41f8b0 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -248,6 +248,8 @@ class ViewController extends Controller { $nav->assign('quota', $storageInfo['quota']); $nav->assign('usage_relative', $storageInfo['relative']); + $nav->assign('webdav_url', \OCP\Util::linkToRemote('dav/files/' . $user)); + $contentItems = []; // render the container content for every navigation item diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php index b4436714985..aaf62f1d6b6 100644 --- a/apps/files/templates/appnavigation.php +++ b/apps/files/templates/appnavigation.php @@ -42,7 +42,7 @@ </div> <label for="webdavurl"><?php p($l->t('WebDAV')); ?></label> <input id="webdavurl" type="text" readonly="readonly" - value="<?php p(\OCP\Util::linkToRemote('webdav')); ?>"/> + value="<?php p($_['webdav_url']); ?>"/> <em><?php print_unescaped($l->t('Use this address to <a href="%s" target="_blank" rel="noreferrer noopener">access your Files via WebDAV</a>', array(link_to_docs('user-webdav')))); ?></em> </div> </div> diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index f07af2a2fe5..30d7bdfdc6d 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -147,7 +147,7 @@ class ViewControllerTest extends TestCase { $nav->assign('usage', '123 B'); $nav->assign('quota', 100); $nav->assign('total_space', '100 B'); - //$nav->assign('webdavurl', ''); + $nav->assign('webdav_url', 'http://localhost/remote.php/dav/files/testuser1/'); $nav->assign('navigationItems', [ 'files' => [ 'id' => 'files', |