summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-07-05 23:15:41 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-07-08 12:35:23 +0200
commitf0b9eba9c2a2615ccdc53e2f36fa49473c3bbaf1 (patch)
treeace04835d5d366664c9b58346737a773d915c8c3 /apps
parent8f84c99e3f4455867d588eaeba29603e44ab1c31 (diff)
downloadnextcloud-server-f0b9eba9c2a2615ccdc53e2f36fa49473c3bbaf1.tar.gz
nextcloud-server-f0b9eba9c2a2615ccdc53e2f36fa49473c3bbaf1.zip
dont overwrite a variable with a different type
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/Controllers/ShareController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controllers/ShareController.php b/apps/files_sharing/lib/Controllers/ShareController.php
index 56f94b91c80..c439735c065 100644
--- a/apps/files_sharing/lib/Controllers/ShareController.php
+++ b/apps/files_sharing/lib/Controllers/ShareController.php
@@ -291,7 +291,7 @@ class ShareController extends Controller {
$rootFolder = $share->getNode();
try {
- $path = $rootFolder->get($path);
+ $folderNode = $rootFolder->get($path);
} catch (\OCP\Files\NotFoundException $e) {
$this->emitAccessShareHook($share, 404, 'Share not found');
throw new NotFoundException();
@@ -316,7 +316,7 @@ class ShareController extends Controller {
// Show file list
$hideFileList = false;
if ($share->getNode() instanceof \OCP\Files\Folder) {
- $shareTmpl['dir'] = $rootFolder->getRelativePath($path->getPath());
+ $shareTmpl['dir'] = $rootFolder->getRelativePath($folderNode->getPath());
/*
* The OC_Util methods require a view. This just uses the node API
@@ -333,7 +333,7 @@ class ShareController extends Controller {
$hideFileList = $share->getPermissions() & \OCP\Constants::PERMISSION_READ ? false : true;
$folder = new Template('files', 'list', '');
- $folder->assign('dir', $rootFolder->getRelativePath($path->getPath()));
+ $folder->assign('dir', $rootFolder->getRelativePath($folderNode->getPath()));
$folder->assign('dirToken', $token);
$folder->assign('permissions', \OCP\Constants::PERMISSION_READ);
$folder->assign('isPublic', true);