From 0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 24 Mar 2024 09:58:21 +0000 Subject: Deprecate *_config() functions in core. --- Zotlabs/Storage/Directory.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Storage/Directory.php') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 333251f69..b62f268d3 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -3,6 +3,7 @@ namespace Zotlabs\Storage; use Sabre\DAV; +use Zotlabz\Lib\Config; use Zotlabs\Lib\Libsync; /** @@ -89,7 +90,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo logger('children for ' . $this->ext_path, LOGGER_DATA); $this->log(); - if (get_config('system', 'block_public') && (! $this->auth->channel_id) && (! $this->auth->observer)) { + if (Config::Get('system', 'block_public') && (! $this->auth->channel_id) && (! $this->auth->observer)) { throw new DAV\Exception\Forbidden('Permission denied.'); } @@ -111,7 +112,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo public function getChild($name) { logger($name, LOGGER_DATA); - if (get_config('system', 'block_public') && (! $this->auth->channel_id) && (! $this->auth->observer)) { + if (Config::Get('system', 'block_public') && (! $this->auth->channel_id) && (! $this->auth->observer)) { throw new DAV\Exception\Forbidden('Permission denied.'); } @@ -360,7 +361,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo intval($c[0]['channel_id']) ); - $maxfilesize = get_config('system', 'maxfilesize'); + $maxfilesize = Config::Get('system', 'maxfilesize'); if (($maxfilesize) && ($size > $maxfilesize)) { attach_delete($c[0]['channel_id'], $hash); return; @@ -776,7 +777,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo function ChannelList(&$auth) { $ret = []; - if (intval(get_config('system','cloud_disable_siteroot'))) { + if (intval(Config::Get('system','cloud_disable_siteroot'))) { return $ret; } -- cgit v1.2.3 From 01c6fd03b7e82d89967b4e348b75d90310375de9 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 25 Mar 2024 14:15:28 +0000 Subject: fix typo after get_config -> Confi::Get conversion --- Zotlabs/Storage/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage/Directory.php') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index b62f268d3..a68fdcf26 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -3,7 +3,7 @@ namespace Zotlabs\Storage; use Sabre\DAV; -use Zotlabz\Lib\Config; +use Zotlabs\Lib\Config; use Zotlabs\Lib\Libsync; /** -- cgit v1.2.3