Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
dont overwrite a variable with a different type
  • Loading branch information
icewind1991 authored and LukasReschke committed Jul 8, 2016
commit f0b9eba9c2a2615ccdc53e2f36fa49473c3bbaf1
6 changes: 3 additions & 3 deletions apps/files_sharing/lib/Controllers/ShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public function showShare($token, $path = '') {
$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();
Expand All @@ -316,7 +316,7 @@ public function showShare($token, $path = '') {
// 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
Expand All @@ -333,7 +333,7 @@ public function showShare($token, $path = '') {
$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);
Expand Down