aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-03-24 09:58:21 +0000
committerMario <mario@mariovavti.com>2024-03-24 09:58:21 +0000
commit0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 (patch)
tree4ad4413b0c00d1a478111b031d9de46218f31a89 /Zotlabs/Module/Settings
parentacc1834b0dc4804703610101fa95a3375649bc45 (diff)
downloadvolse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.gz
volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.bz2
volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.zip
Deprecate *_config() functions in core.
Diffstat (limited to 'Zotlabs/Module/Settings')
-rw-r--r--Zotlabs/Module/Settings/Account.php4
-rw-r--r--Zotlabs/Module/Settings/Channel.php7
-rw-r--r--Zotlabs/Module/Settings/Display.php7
-rw-r--r--Zotlabs/Module/Settings/Privacy.php3
4 files changed, 13 insertions, 8 deletions
diff --git a/Zotlabs/Module/Settings/Account.php b/Zotlabs/Module/Settings/Account.php
index 85e7c793f..0266cee12 100644
--- a/Zotlabs/Module/Settings/Account.php
+++ b/Zotlabs/Module/Settings/Account.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Config;
+
class Account {
function post() {
@@ -19,7 +21,7 @@ class Account {
if (strpos($email, '@') > 0) {
if(! validate_email($email))
$errs[] = t('Not valid email.');
- $adm = trim(get_config('system','admin_email'));
+ $adm = trim(Config::Get('system','admin_email'));
if(($adm) && (strcasecmp($email,$adm) == 0)) {
$errs[] = t('Protected email address. Cannot change to that email.');
$email = \App::$account['account_email'];
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index 1e0c2a2db..b46208879 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -7,6 +7,7 @@ use Zotlabs\Access\PermissionLimits;
use Zotlabs\Access\PermissionRoles;
use Zotlabs\Daemon\Master;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Config;
use Zotlabs\Lib\Libsync;
require_once('include/selectors.php');
@@ -183,11 +184,11 @@ class Channel {
$subdir = ((strlen(App::get_path())) ? '<br />' . t('or') . ' ' . z_root() . '/channel/' . $nickname : '');
$webbie = $nickname . '@' . App::get_hostname();
$intl_nickname = unpunify($nickname) . '@' . unpunify(App::get_hostname());
- $disable_discover_tab = intval(get_config('system', 'disable_discover_tab', 1)) == 1;
- $site_firehose = intval(get_config('system', 'site_firehose', 0)) == 1;
+ $disable_discover_tab = intval(Config::Get('system', 'disable_discover_tab', 1)) == 1;
+ $site_firehose = intval(Config::Get('system', 'site_firehose', 0)) == 1;
$expire = $channel['channel_expire_days'];
- $sys_expire = get_config('system', 'default_expire_days');
+ $sys_expire = Config::Get('system', 'default_expire_days');
$tpl_addr = get_markup_template("settings_nick_set.tpl");
$prof_addr = replace_macros($tpl_addr, [
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php
index ee9692014..a7fccea47 100644
--- a/Zotlabs/Module/Settings/Display.php
+++ b/Zotlabs/Module/Settings/Display.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Config;
use Zotlabs\Lib\Libsync;
class Display {
@@ -85,7 +86,7 @@ class Display {
$yes_no = array(t('No'),t('Yes'));
- $default_theme = get_config('system','theme');
+ $default_theme = Config::Get('system','theme');
if(! $default_theme)
$default_theme = 'redbasic';
@@ -95,7 +96,7 @@ class Display {
$theme = (($existing_theme) ? $existing_theme : $default_theme);
- $allowed_themes_str = get_config('system','allowed_themes');
+ $allowed_themes_str = Config::Get('system','allowed_themes');
$allowed_themes_raw = explode(',',$allowed_themes_str);
$allowed_themes = array();
if(count($allowed_themes_raw))
@@ -121,7 +122,7 @@ class Display {
$unsupported = file_exists('view/theme/' . $th . '/unsupported');
$is_library = file_exists('view/theme/'. $th . '/library');
- if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){
+ if (!$is_experimental or ($is_experimental && (Config::Get('experimentals','exp_themes')==1 or Config::Get('experimentals','exp_themes')===false))){
$theme_name = (($is_experimental) ? sprintf(t('%s - (Experimental)'), $f) : $f);
if (! $is_library) {
$themes[$f] = $theme_name;
diff --git a/Zotlabs/Module/Settings/Privacy.php b/Zotlabs/Module/Settings/Privacy.php
index 316b1306e..ed14fa94c 100644
--- a/Zotlabs/Module/Settings/Privacy.php
+++ b/Zotlabs/Module/Settings/Privacy.php
@@ -6,6 +6,7 @@ use App;
use Zotlabs\Access\PermissionLimits;
use Zotlabs\Access\Permissions;
use Zotlabs\Daemon\Master;
+use Zotlabs\Lib\Config;
use Zotlabs\Lib\Group;
use Zotlabs\Lib\Libsync;
@@ -81,7 +82,7 @@ class Privacy {
$help_txt = t('Advise: set to "Anybody on the internet" and use privacy groups to restrict access');
$limits = PermissionLimits::Get(local_channel());
- $anon_comments = get_config('system', 'anonymous_comments', true);
+ $anon_comments = Config::Get('system', 'anonymous_comments', true);
foreach ($global_perms as $k => $perm) {
$options = [];