diff options
Diffstat (limited to 'lib/private/legacy/OC_Helper.php')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 7 |
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)) { |