diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/admin.php | 5 | ||||
-rw-r--r-- | apps/files/ajax/upload.php | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/apps/files/admin.php b/apps/files/admin.php index 786a8edf2a6..f23f9b52698 100644 --- a/apps/files/admin.php +++ b/apps/files/admin.php @@ -30,9 +30,8 @@ OCP\User::checkAdminUser(); $htaccessWorking=(getenv('htaccessWorking')=='true'); - -$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); -$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); +$upload_max_filesize = OC::$server->getIniWrapper()->getBytes('upload_max_filesize'); +$post_max_size = OC::$server->getIniWrapper()->getBytes('post_max_size'); $maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size)); if($_POST && OC_Util::isCallRegistered()) { if(isset($_POST['maxUploadSize'])) { diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 18e9cfe6117..14f56a24b4b 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -114,7 +114,7 @@ foreach ($_FILES['files']['error'] as $error) { $errors = array( UPLOAD_ERR_OK => $l->t('There is no error, the file uploaded with success'), UPLOAD_ERR_INI_SIZE => $l->t('The uploaded file exceeds the upload_max_filesize directive in php.ini: ') - . ini_get('upload_max_filesize'), + . OC::$server->getIniWrapper()->getNumeric('upload_max_filesize'), UPLOAD_ERR_FORM_SIZE => $l->t('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'), UPLOAD_ERR_PARTIAL => $l->t('The uploaded file was only partially uploaded'), UPLOAD_ERR_NO_FILE => $l->t('No file was uploaded'), |