Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2012-10-10 11:41:19 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2012-10-10 11:41:19 +0400
commit29fa9dfb79e6f4a792fd012c33fec43965238aca (patch)
tree8aa081c7d23b355eea68221fd9b042751719e64e /apps
parenta0c53619ff9da35cc02b0c09beba7ecd756a0d7e (diff)
parent7f2208b9a11f608e7d726bf426fe4c2a672e058a (diff)
Merge pull request #25 from visit1985/uploadfilesize
fixed max possible upload size for files app in admin screen
Diffstat (limited to 'apps')
-rw-r--r--apps/files/admin.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files/admin.php b/apps/files/admin.php
index a8f2deffc92..547f2bd7ddb 100644
--- a/apps/files/admin.php
+++ b/apps/files/admin.php
@@ -30,8 +30,11 @@ OCP\User::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
+$upload_max_filesize_possible = OCP\Util::computerFileSize(get_cfg_var('upload_max_filesize'));
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
+$post_max_size_possible = OCP\Util::computerFileSize(get_cfg_var('post_max_size'));
$maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size));
+$maxUploadFilesizePossible = OCP\Util::humanFileSize(min($upload_max_filesize_possible, $post_max_size_possible));
if($_POST) {
if(isset($_POST['maxUploadSize'])) {
if(($setMaxSize = OC_Files::setUploadLimit(OCP\Util::computerFileSize($_POST['maxUploadSize']))) !== false) {
@@ -56,7 +59,8 @@ $htaccessWritable=is_writable(OC::$SERVERROOT.'/.htaccess');
$tmpl = new OCP\Template( 'files', 'admin' );
$tmpl->assign( 'uploadChangable', $htaccessWorking and $htaccessWritable );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
-$tmpl->assign( 'maxPossibleUploadSize', OCP\Util::humanFileSize(PHP_INT_MAX));
+$tmpl->assign( 'maxPossibleUploadSize', $maxUploadFilesizePossible);
$tmpl->assign( 'allowZipDownload', $allowZipDownload);
$tmpl->assign( 'maxZipInputSize', $maxZipInputSize);
-return $tmpl->fetchPage(); \ No newline at end of file
+return $tmpl->fetchPage();
+