diff options
author | Joas Schilling <coding@schilljs.com> | 2020-08-20 14:08:18 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-20 16:35:38 +0200 |
commit | b09620651cbb72e5a623d47ed409e949b114c7cf (patch) | |
tree | 7ebae0d2f95477044de84c666f07b341da7b5efd /lib/private/TempManager.php | |
parent | 420a3762cba2f8ef300f95f7c9de188bcbef65bb (diff) | |
download | nextcloud-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/TempManager.php')
-rw-r--r-- | lib/private/TempManager.php | 16 |
1 files changed, 8 insertions, 8 deletions
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')) { |