$permissions |= OCP\PERMISSION_SHARE;
}
- // information about storage capacities
- $storageInfo=OC_Helper::getStorageInfo();
+ if ($needUpgrade) {
+ OCP\Util::addscript('files', 'upgrade');
+ $tmpl = new OCP\Template('files', 'upgrade', 'user');
+ $tmpl->printPage();
+ } else {
+ // information about storage capacities
+ $storageInfo=OC_Helper::getStorageInfo();
+ $maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
- $tmpl = new OCP\Template('files', 'index', 'user');
- $tmpl->assign('fileList', $list->fetchPage(), false);
- $tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
- $tmpl->assign('dir', OC_Filesystem::normalizePath($dir));
- $tmpl->assign('isCreatable', OC_Filesystem::isCreatable($dir . '/'));
- $tmpl->assign('permissions', $permissions);
- $tmpl->assign('files', $files);
- $tmpl->assign('trash', \OCP\App::isEnabled('files_trashbin'));
- $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->printPage();
+ 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(), false);
+ $tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
+ $tmpl->assign('dir', \OC\Files\Filesystem::normalizePath($dir));
+ $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('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->printPage();
-}
++}