summaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/Controller
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 /apps/settings/lib/Controller
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 'apps/settings/lib/Controller')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 476b58e564a..6d237e04c1c 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -98,6 +98,8 @@ class CheckSetupController extends Controller {
private $memoryInfo;
/** @var ISecureRandom */
private $secureRandom;
+ /** @var IniGetWrapper */
+ private $iniGetWrapper;
public function __construct($AppName,
IRequest $request,
@@ -112,7 +114,8 @@ class CheckSetupController extends Controller {
ILockingProvider $lockingProvider,
IDateTimeFormatter $dateTimeFormatter,
MemoryInfo $memoryInfo,
- ISecureRandom $secureRandom) {
+ ISecureRandom $secureRandom,
+ IniGetWrapper $iniGetWrapper) {
parent::__construct($AppName, $request);
$this->config = $config;
$this->clientService = $clientService;
@@ -126,6 +129,7 @@ class CheckSetupController extends Controller {
$this->dateTimeFormatter = $dateTimeFormatter;
$this->memoryInfo = $memoryInfo;
$this->secureRandom = $secureRandom;
+ $this->iniGetWrapper = $iniGetWrapper;
}
/**
@@ -407,25 +411,23 @@ Raw output
* @return bool
*/
protected function isOpcacheProperlySetup() {
- $iniWrapper = new IniGetWrapper();
-
- if (!$iniWrapper->getBool('opcache.enable')) {
+ if (!$this->iniGetWrapper->getBool('opcache.enable')) {
return false;
}
- if (!$iniWrapper->getBool('opcache.save_comments')) {
+ if (!$this->iniGetWrapper->getBool('opcache.save_comments')) {
return false;
}
- if ($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) {
+ if ($this->iniGetWrapper->getNumeric('opcache.max_accelerated_files') < 10000) {
return false;
}
- if ($iniWrapper->getNumeric('opcache.memory_consumption') < 128) {
+ if ($this->iniGetWrapper->getNumeric('opcache.memory_consumption') < 128) {
return false;
}
- if ($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) {
+ if ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < 8) {
return false;
}