summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-07-30 00:34:36 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-07-30 00:34:36 +0200
commit7425efade78a04f20cb3cc83f964c6a00094b6ce (patch)
tree967aa50e8873c88f0adf6f91d0285ab1c54b7189 /apps/files/index.php
parentb4a523927823ab8bc80c5f1fc0d5bd5ef61f8eb8 (diff)
parent7c6246fa451c4646dfaa1396dd37e0b3eb9706ba (diff)
downloadnextcloud-server-7425efade78a04f20cb3cc83f964c6a00094b6ce.tar.gz
nextcloud-server-7425efade78a04f20cb3cc83f964c6a00094b6ce.zip
Merge branch 'master' into oc_preview
Conflicts: 3rdparty lib/template.php
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 156febd87f4..e2ea8802d0d 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -122,7 +122,17 @@ if ($needUpgrade) {
// information about storage capacities
$storageInfo=OC_Helper::getStorageInfo();
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
+ $publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
+ if (OC_App::isEnabled('files_encryption')) {
+ $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');
@@ -133,11 +143,13 @@ 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)));
$tmpl->assign('usedSpacePercent', (int)$storageInfo['relative']);
$tmpl->assign('isPublic', false);
+ $tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
$tmpl->printPage();
}