aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
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
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')
-rw-r--r--lib/private/legacy/OC_Files.php3
-rw-r--r--lib/private/legacy/OC_Helper.php7
-rw-r--r--lib/private/legacy/OC_Util.php5
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index ddb824cd6cd..f5f91fc9958 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -41,6 +41,7 @@
*
*/
+use bantu\IniGetWrapper\IniGetWrapper;
use OC\Files\View;
use OC\Streamer;
use OCP\Lock\ILockingProvider;
@@ -164,7 +165,7 @@ class OC_Files {
OC_Util::obEnd();
$streamer->sendHeaders($name);
- $executionTime = (int)OC::$server->getIniWrapper()->getNumeric('max_execution_time');
+ $executionTime = (int)OC::$server->get(IniGetWrapper::class)->getNumeric('max_execution_time');
if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
@set_time_limit(0);
}
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)) {
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index f2aa0545afd..caae862ad41 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -62,6 +62,7 @@
*
*/
+use bantu\IniGetWrapper\IniGetWrapper;
use OC\AppFramework\Http\Request;
use OC\Files\Storage\LocalRootStorage;
use OCP\IConfig;
@@ -738,7 +739,7 @@ class OC_Util {
$webServerRestart = false;
$setup = new \OC\Setup(
$config,
- \OC::$server->getIniWrapper(),
+ \OC::$server->get(IniGetWrapper::class),
\OC::$server->getL10N('lib'),
\OC::$server->query(\OCP\Defaults::class),
\OC::$server->getLogger(),
@@ -863,7 +864,7 @@ class OC_Util {
$missingDependencies = [];
$invalidIniSettings = [];
- $iniWrapper = \OC::$server->getIniWrapper();
+ $iniWrapper = \OC::$server->get(IniGetWrapper::class);
foreach ($dependencies['classes'] as $class => $module) {
if (!class_exists($class)) {
$missingDependencies[] = $module;