diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-04-05 14:51:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 14:51:52 +0200 |
commit | 6ea444b24387e9b516a44000df0db0f6af786f95 (patch) | |
tree | 2acc17d1899f59dcf8467cc27a177a484daaf56c /apps/files | |
parent | 1f605cb8410076d9c59aecb3eab6ce74e5ab6e06 (diff) | |
parent | 9b05413bcbbaa69ec6587ade1d3566552e0f3eb3 (diff) | |
download | nextcloud-server-6ea444b24387e9b516a44000df0db0f6af786f95.tar.gz nextcloud-server-6ea444b24387e9b516a44000df0db0f6af786f95.zip |
Merge pull request #9082 from nextcloud/feature/8795/new_webdav_url_in_web
Show the new dav url in the web UI
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 6 | ||||
-rw-r--r-- | apps/files/templates/appnavigation.php | 2 | ||||
-rw-r--r-- | apps/files/tests/Controller/ViewControllerTest.php | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index fa8243822a8..7cb0f112f72 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -175,6 +175,12 @@ class ViewController extends Controller { }); $nav->assign('navigationItems', $navItems); + $webdavurl = $this->urlGenerator->linkTo('', 'remote.php') . + '/dav/files/' . + $this->userSession->getUser()->getUID() . + '/'; + $webdavurl = $this->urlGenerator->getAbsoluteURL($webdavurl); + $nav->assign('webdavurl', $webdavurl); $nav->assign('usage', \OC_Helper::humanFileSize($storageInfo['used'])); if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) { diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php index 5d270914ff1..a85e2515a92 100644 --- a/apps/files/templates/appnavigation.php +++ b/apps/files/templates/appnavigation.php @@ -41,7 +41,7 @@ <label for="showhiddenfilesToggle"><?php p($l->t('Show hidden files')); ?></label> </div> <label for="webdavurl"><?php p($l->t('WebDAV'));?></label> - <input id="webdavurl" type="text" readonly="readonly" value="<?php p(\OCP\Util::linkToRemote('webdav')); ?>" /> + <input id="webdavurl" type="text" readonly="readonly" value="<?php p($_['webdavurl']); ?>" /> <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 b4f07b65e76..a739e26bd90 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -138,6 +138,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('navigationItems', [ [ 'id' => 'files', |