From b09620651cbb72e5a623d47ed409e949b114c7cf Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 20 Aug 2020 14:08:18 +0200 Subject: Don't use deprecated getIniWrapper() anymore Signed-off-by: Joas Schilling --- lib/private/TempManager.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/private/TempManager.php') diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php index 49d4ee94cf6..b4db44f6b1c 100644 --- a/lib/private/TempManager.php +++ b/lib/private/TempManager.php @@ -31,30 +31,30 @@ namespace OC; +use bantu\IniGetWrapper\IniGetWrapper; use OCP\IConfig; -use OCP\ILogger; use OCP\ITempManager; +use Psr\Log\LoggerInterface; class TempManager implements ITempManager { /** @var string[] Current temporary files and folders, used for cleanup */ protected $current = []; /** @var string i.e. /tmp on linux systems */ protected $tmpBaseDir; - /** @var ILogger */ + /** @var LoggerInterface */ protected $log; /** @var IConfig */ protected $config; + /** @var IniGetWrapper */ + protected $iniGetWrapper; /** Prefix */ public const TMP_PREFIX = 'oc_tmp_'; - /** - * @param \OCP\ILogger $logger - * @param \OCP\IConfig $config - */ - public function __construct(ILogger $logger, IConfig $config) { + public function __construct(LoggerInterface $logger, IConfig $config, IniGetWrapper $iniGetWrapper) { $this->log = $logger; $this->config = $config; + $this->iniGetWrapper = $iniGetWrapper; $this->tmpBaseDir = $this->getTempBaseDir(); } @@ -218,7 +218,7 @@ class TempManager implements ITempManager { if ($temp = $this->config->getSystemValue('tempdirectory', null)) { $directories[] = $temp; } - if ($temp = \OC::$server->getIniWrapper()->get('upload_tmp_dir')) { + if ($temp = $this->iniGetWrapper->get('upload_tmp_dir')) { $directories[] = $temp; } if ($temp = getenv('TMP')) { -- cgit v1.2.3