summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-07-26 11:13:43 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-07-26 11:14:29 +0200
commita00cff7c0543a8860b839a0bf345478e99bc6c18 (patch)
treea4d256f02dca12026d021db1b46363157c5689da /apps/files/index.php
parent96e175ffbf6f209274395309e5b55ed724c5c2da (diff)
downloadnextcloud-server-a00cff7c0543a8860b839a0bf345478e99bc6c18.tar.gz
nextcloud-server-a00cff7c0543a8860b839a0bf345478e99bc6c18.zip
disable "deleted files" button if trash bin is empty
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 2f005391509..4f9e881eb2d 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -126,6 +126,12 @@ if ($needUpgrade) {
$publicUploadEnabled = 'no';
}
+ $trashEnabled = \OCP\App::isEnabled('files_trashbin');
+ $trashEmpty = true;
+ if ($trashEnabled) {
+ $trashEmpty = \OCA\Files_Trashbin\Trashbin::isEmpty($user);
+ }
+
OCP\Util::addscript('files', 'fileactions');
OCP\Util::addscript('files', 'files');
OCP\Util::addscript('files', 'keyboardshortcuts');
@@ -136,7 +142,8 @@ if ($needUpgrade) {
$tmpl->assign('isCreatable', \OC\Files\Filesystem::isCreatable($dir . '/'));
$tmpl->assign('permissions', $permissions);
$tmpl->assign('files', $files);
- $tmpl->assign('trash', \OCP\App::isEnabled('files_trashbin'));
+ $tmpl->assign('trash', $trashEnabled);
+ $tmpl->assign('trashEmpty', $trashEmpty);
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
$tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));