diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-02-19 09:40:11 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-02-19 09:40:11 +0100 |
commit | e517e642befa119b77521a2e15571ee6932046ad (patch) | |
tree | 9f0cdebce503b801682eb18d4e9dd23a6bbc1971 /apps/files/index.php | |
parent | 1e321406ee2d973e937637ab090cbd83a6eb40cf (diff) | |
parent | d18b9f6ea43b2a9b7bf9d2a71710edc67ec7f705 (diff) | |
download | nextcloud-server-e517e642befa119b77521a2e15571ee6932046ad.tar.gz nextcloud-server-e517e642befa119b77521a2e15571ee6932046ad.zip |
Merge pull request #7257 from owncloud/filelist-fileinfo
use a FileInfo object of the directory when generting the filelist
Diffstat (limited to 'apps/files/index.php')
-rw-r--r-- | apps/files/index.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/index.php b/apps/files/index.php index c9eea6a4174..ad7a2e210ed 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -37,8 +37,9 @@ OCP\App::setActiveNavigationEntry('files_index'); // Load the files $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : ''; $dir = \OC\Files\Filesystem::normalizePath($dir); +$dirInfo = \OC\Files\Filesystem::getFileInfo($dir); // Redirect if directory does not exist -if (!\OC\Files\Filesystem::is_dir($dir . '/')) { +if (!$dirInfo->getType() === 'dir') { header('Location: ' . OCP\Util::getScriptName() . ''); exit(); } @@ -94,7 +95,7 @@ $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb); $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir='); -$permissions = \OCA\Files\Helper::getDirPermissions($dir); +$permissions = $dirInfo->getPermissions(); if ($needUpgrade) { OCP\Util::addscript('files', 'upgrade'); |