summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_Helper.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-08-20 14:08:18 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-20 16:35:38 +0200
commitb09620651cbb72e5a623d47ed409e949b114c7cf (patch)
tree7ebae0d2f95477044de84c666f07b341da7b5efd /lib/private/legacy/OC_Helper.php
parent420a3762cba2f8ef300f95f7c9de188bcbef65bb (diff)
downloadnextcloud-server-b09620651cbb72e5a623d47ed409e949b114c7cf.tar.gz
nextcloud-server-b09620651cbb72e5a623d47ed409e949b114c7cf.zip
Don't use deprecated getIniWrapper() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/legacy/OC_Helper.php')
-rw-r--r--lib/private/legacy/OC_Helper.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 8cd492de117..4e9c5cffe98 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -44,6 +44,7 @@
*
*/
+use bantu\IniGetWrapper\IniGetWrapper;
use Symfony\Component\Process\ExecutableFinder;
/**
@@ -220,7 +221,7 @@ class OC_Helper {
// Default check will be done with $path directories :
$dirs = explode(PATH_SEPARATOR, $path);
// WARNING : We have to check if open_basedir is enabled :
- $obd = OC::$server->getIniWrapper()->getString('open_basedir');
+ $obd = OC::$server->get(IniGetWrapper::class)->getString('open_basedir');
if ($obd != "none") {
$obd_values = explode(PATH_SEPARATOR, $obd);
if (count($obd_values) > 0 and $obd_values[0]) {
@@ -414,7 +415,7 @@ class OC_Helper {
* @return int PHP upload file size limit
*/
public static function uploadLimit() {
- $ini = \OC::$server->getIniWrapper();
+ $ini = \OC::$server->get(IniGetWrapper::class);
$upload_max_filesize = OCP\Util::computerFileSize($ini->get('upload_max_filesize'));
$post_max_size = OCP\Util::computerFileSize($ini->get('post_max_size'));
if ((int)$upload_max_filesize === 0 and (int)$post_max_size === 0) {
@@ -436,7 +437,7 @@ class OC_Helper {
if (!function_exists($function_name)) {
return false;
}
- $ini = \OC::$server->getIniWrapper();
+ $ini = \OC::$server->get(IniGetWrapper::class);
$disabled = explode(',', $ini->get('disable_functions') ?: '');
$disabled = array_map('trim', $disabled);
if (in_array($function_name, $disabled)) {