From 22079347ea8798bcec80d56793e87adae1de499b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Fri, 10 Jan 2020 12:11:26 +0100 Subject: [PATCH] Fix webdav url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/lib/Controller/ViewController.php | 2 ++ apps/files/templates/appnavigation.php | 2 +- 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 ed3fff223f..688db41f8b 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 b443671498..aaf62f1d6b 100644 --- a/apps/files/templates/appnavigation.php +++ b/apps/files/templates/appnavigation.php @@ -42,7 +42,7 @@ + value=""/> t('Use this address to access your Files via WebDAV', array(link_to_docs('user-webdav')))); ?> diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index f07af2a2fe..30d7bdfdc6 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',