summaryrefslogtreecommitdiffstats
path: root/apps/files/index.php
diff options
context:
space:
mode:
authorraghunayyar <me@iraghu.com>2014-01-16 14:42:37 +0530
committerraghunayyar <me@iraghu.com>2014-01-16 14:42:37 +0530
commit775e08e0ee4125cc7b2a594771437686f6a21b56 (patch)
tree362f84449171898335dd3e8511b65c97c150e9e1 /apps/files/index.php
parent4687d2dd0bde3f689eb57c90d0c4341cd00991bd (diff)
parentbd643c47f32ba6d7b3ba6a18ed1591aab0b81be8 (diff)
downloadnextcloud-server-775e08e0ee4125cc7b2a594771437686f6a21b56.tar.gz
nextcloud-server-775e08e0ee4125cc7b2a594771437686f6a21b56.zip
Merge branch 'master' into core-em-to-px
Conflicts: apps/files_sharing/css/public.css apps/user_ldap/css/settings.css core/css/multiselect.css core/css/share.css
Diffstat (limited to 'apps/files/index.php')
-rw-r--r--apps/files/index.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 8d877be8ac9..8f6838aa0d9 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -36,6 +36,7 @@ OCP\Util::addscript('files', 'filelist');
OCP\App::setActiveNavigationEntry('files_index');
// Load the files
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
+$dir = \OC\Files\Filesystem::normalizePath($dir);
// Redirect if directory does not exist
if (!\OC\Files\Filesystem::is_dir($dir . '/')) {
header('Location: ' . OCP\Util::getScriptName() . '');
@@ -107,7 +108,6 @@ if ($needUpgrade) {
// if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code)
$encryptionInitStatus = 2;
if (OC_App::isEnabled('files_encryption')) {
- $publicUploadEnabled = 'no';
$session = new \OCA\Encryption\Session(new \OC\Files\View('/'));
$encryptionInitStatus = $session->getInitialized();
}
@@ -118,14 +118,18 @@ if ($needUpgrade) {
$trashEmpty = \OCA\Files_Trashbin\Trashbin::isEmpty($user);
}
+ $isCreatable = \OC\Files\Filesystem::isCreatable($dir . '/');
+ $fileHeader = (!isset($files) or count($files) > 0);
+ $emptyContent = ($isCreatable and !$fileHeader) or $ajaxLoad;
+
OCP\Util::addscript('files', 'fileactions');
OCP\Util::addscript('files', 'files');
OCP\Util::addscript('files', 'keyboardshortcuts');
$tmpl = new OCP\Template('files', 'index', 'user');
$tmpl->assign('fileList', $list->fetchPage());
$tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage());
- $tmpl->assign('dir', \OC\Files\Filesystem::normalizePath($dir));
- $tmpl->assign('isCreatable', \OC\Files\Filesystem::isCreatable($dir . '/'));
+ $tmpl->assign('dir', $dir);
+ $tmpl->assign('isCreatable', $isCreatable);
$tmpl->assign('permissions', $permissions);
$tmpl->assign('files', $files);
$tmpl->assign('trash', $trashEnabled);
@@ -138,9 +142,12 @@ if ($needUpgrade) {
$tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
$tmpl->assign("encryptedFiles", \OCP\Util::encryptedFiles());
$tmpl->assign("mailNotificationEnabled", \OC_Appconfig::getValue('core', 'shareapi_allow_mail_notification', 'yes'));
+ $tmpl->assign("allowShareWithLink", \OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
$tmpl->assign("encryptionInitStatus", $encryptionInitStatus);
$tmpl->assign('disableSharing', false);
$tmpl->assign('ajaxLoad', $ajaxLoad);
+ $tmpl->assign('emptyContent', $emptyContent);
+ $tmpl->assign('fileHeader', $fileHeader);
$tmpl->printPage();
}