diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-03-24 09:58:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-24 09:58:21 +0000 |
commit | 0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 (patch) | |
tree | 4ad4413b0c00d1a478111b031d9de46218f31a89 /include/text.php | |
parent | acc1834b0dc4804703610101fa95a3375649bc45 (diff) | |
download | volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.gz volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.bz2 volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.zip |
Deprecate *_config() functions in core.
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/text.php b/include/text.php index 713911af2..b9ec90e92 100644 --- a/include/text.php +++ b/include/text.php @@ -9,6 +9,7 @@ use Michelf\MarkdownExtra; use Ramsey\Uuid\Uuid; use Ramsey\Uuid\Exception\UnableToBuildUuidException; +use Zotlabs\Lib\Config; use Zotlabs\Lib\Crypto; use Zotlabs\Lib\SvgSanitizer; use Zotlabs\Lib\Libzot; @@ -741,9 +742,9 @@ function logger($msg, $level = LOGGER_NORMAL, $priority = LOG_INFO) { $loglevel = LOGGER_ALL; } else { - $debugging = get_config('system', 'debugging'); - $loglevel = intval(get_config('system', 'loglevel')); - $logfile = get_config('system', 'logfile'); + $debugging = Config::Get('system', 'debugging'); + $loglevel = intval(Config::Get('system', 'loglevel')); + $logfile = Config::Get('system', 'logfile'); } if((! $debugging) || (! $logfile) || ($level > $loglevel)) @@ -846,9 +847,9 @@ function dlogger($msg, $level = 0) { if(App::$module == 'setup') return; - $debugging = get_config('system','debugging'); - $loglevel = intval(get_config('system','loglevel')); - $logfile = get_config('system','dlogfile'); + $debugging = Config::Get('system','debugging'); + $loglevel = intval(Config::Get('system','loglevel')); + $logfile = Config::Get('system','dlogfile'); if((! $debugging) || (! $logfile) || ($level > $loglevel)) return; @@ -1253,7 +1254,7 @@ function sslify($s) { // The downside is that http: media files will likely be blocked by your browser // Complain to your browser maker - $allow = get_config('system','sslify_everything'); + $allow = Config::Get('system','sslify_everything'); $pattern = (($allow) ? "/\<(.*?)src=[\"|'](http\:.*?)[\"|'](.*?)\>/" : "/\<img(.*?)src=[\"|'](http\:.*?)[\"|'](.*?)\>/" ); $matches = null; @@ -1407,7 +1408,7 @@ function list_smilies($default_only = false) { */ function smilies($s, $sample = false) { - if(intval(get_config('system', 'no_smilies')) + if(intval(Config::Get('system', 'no_smilies')) || (local_channel() && intval(get_pconfig(local_channel(), 'system', 'no_smilies')))) return $s; @@ -2113,7 +2114,7 @@ function create_export_photo_body(&$item) { * @return string */ function feed_hublinks() { - $hub = get_config('system', 'huburl'); + $hub = Config::Get('system', 'huburl'); $hubxml = ''; if(strlen($hub)) { @@ -2496,7 +2497,7 @@ function check_webbie($arr) { // These names conflict with the CalDAV server $taken = [ 'principals', 'addressbooks', 'calendars' ]; - $reservechan = get_config('system','reserved_channels'); + $reservechan = Config::Get('system','reserved_channels'); if(strlen($reservechan)) { $taken = array_merge($taken,explode(',', $reservechan)); } |