summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/index.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-25 12:14:51 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-25 12:14:51 +0100
commit4dea6a6228390713c0296dd6a447b9f60a211767 (patch)
treee5f7840770ab4ea67f0a58d6642b6b75cfa05fda /apps/files_trashbin/index.php
parent6aed7abfbe4a58cec822bdd16d8c71d4bac14c28 (diff)
parent9ee5069f2a1d76c899eeef6cec0f06387764fabd (diff)
downloadnextcloud-server-4dea6a6228390713c0296dd6a447b9f60a211767.tar.gz
nextcloud-server-4dea6a6228390713c0296dd6a447b9f60a211767.zip
Merge branch 'master' into trashbin_encryption
Conflicts: apps/files_trashbin/index.php apps/files_trashbin/lib/trash.php
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 2276fee2f81..2f1fb32f8ce 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');
@@ -18,7 +18,7 @@ $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
$result = array();
if ($dir) {
- $dirlisting = true;
+ $dirlisting = true;
$fullpath = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath($dir);
$dirContent = opendir($fullpath);
$i = 0;
@@ -35,10 +35,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=?');
@@ -66,28 +66,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);