diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-07 10:20:59 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-07 10:20:59 +0100 |
commit | f3d49a89fe99e2d47779b42f9c74a10a67213b0f (patch) | |
tree | 0a8da6371692be98f168ecb11188d06a6d52cee7 /apps | |
parent | 0c3d97921fef6f0c831b1ba8da98933a8e9c87ae (diff) | |
parent | 728648ad77ba3d96d8e61f95a748702df3d615bd (diff) | |
download | nextcloud-server-f3d49a89fe99e2d47779b42f9c74a10a67213b0f.tar.gz nextcloud-server-f3d49a89fe99e2d47779b42f9c74a10a67213b0f.zip |
Merge pull request #11131 from owncloud/use-phpini-wrapper
Replacing ini_get instances with inigetwrapper usages
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'), |