summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/index.php')
-rw-r--r--apps/files_trashbin/index.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index d0b3030dbf8..4615df3586f 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -1,6 +1,6 @@
<?php
-// Check if we are a user
+// Check if we are a user
OCP\User::checkLoggedIn();
OCP\Util::addScript('files_trashbin', 'trash');
@@ -19,7 +19,7 @@ $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
$result = array();
if ($dir) {
$dirlisting = true;
- $view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_trashbin');
+ $view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_trashbin');
$fullpath = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath($dir);
$dirContent = opendir($fullpath);
$i = 0;
@@ -36,10 +36,10 @@ if ($dir) {
'type' => $view->is_dir($dir.'/'.$entryName) ? 'dir' : 'file',
'location' => $dir,
);
- }
+ }
}
closedir($dirContent);
-
+
} else {
$dirlisting = false;
$query = \OC_DB::prepare('SELECT id,location,timestamp,type,mime FROM *PREFIX*files_trash WHERE user=?');
@@ -67,28 +67,28 @@ foreach ($result as $r) {
$files[] = $i;
}
-// Make breadcrumb
+// Make breadcrumb
$pathtohere = '';
-$breadcrumb = array();
-foreach (explode('/', $dir) as $i) {
+$breadcrumb = array();
+foreach (explode('/', $dir) as $i) {
if ($i != '') {
if ( preg_match('/^(.+)\.d[0-9]+$/', $i, $match) ) {
$name = $match[1];
} else {
$name = $i;
- }
- $pathtohere .= '/' . $i;
- $breadcrumb[] = array('dir' => $pathtohere, 'name' => $name);
- }
+ }
+ $pathtohere .= '/' . $i;
+ $breadcrumb[] = array('dir' => $pathtohere, 'name' => $name);
+ }
}
-$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
-$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
+$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
+$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php') . '?dir=', false);
$list = new OCP\Template('files_trashbin', 'part.list', '');
$list->assign('files', $files, false);
-$list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$dir, false);
+$list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$dir, false);
$list->assign('downloadURL', OCP\Util::linkTo('files_trashbin', 'download.php') . '?file='.$dir, false);
$list->assign('disableSharing', true);
$list->assign('dirlisting', $dirlisting);