aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r--Zotlabs/Web/HTTPSig.php5
-rw-r--r--Zotlabs/Web/Router.php5
-rw-r--r--Zotlabs/Web/Session.php13
3 files changed, 13 insertions, 10 deletions
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index 793b8cb45..7c289ff5f 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -5,6 +5,7 @@ namespace Zotlabs\Web;
use DateTime;
use DateTimeZone;
use Zotlabs\Lib\Activity;
+use Zotlabs\Lib\Config;
use Zotlabs\Lib\Crypto;
use Zotlabs\Lib\Keyutils;
use Zotlabs\Lib\Webfinger;
@@ -528,7 +529,7 @@ class HTTPSig {
// TODO: should we default to hs2019? cavage-http-signatures-12 is not very wide spread yet
- if (get_config('system', 'use_hs2019', false) && $algorithm === 'rsa-sha256') {
+ if (Config::Get('system', 'use_hs2019', false) && $algorithm === 'rsa-sha256') {
$algorithm = 'hs2019';
}
@@ -673,7 +674,7 @@ class HTTPSig {
$iv = $key = $alg = $data = null;
if (!$prvkey) {
- $prvkey = get_config('system', 'prvkey');
+ $prvkey = Config::Get('system', 'prvkey');
}
$matches = [];
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index 2876fcc3c..f2604b95d 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -4,6 +4,7 @@ namespace Zotlabs\Web;
use App;
use Zotlabs\Extend\Route;
+use Zotlabs\Lib\Config;
use Exception;
/**
@@ -154,7 +155,7 @@ class Router {
// make the file read-only so letsencrypt doesn't modify it
if(strpos($_SERVER['REQUEST_URI'],'/.well-known/') === 0) {
- if(file_exists('.well-known/.htaccess') && get_config('system','fix_apache_acme',true)) {
+ if(file_exists('.well-known/.htaccess') && Config::Get('system','fix_apache_acme',true)) {
rename('.well-known/.htaccess','.well-known/.htaccess.old');
}
}
@@ -173,7 +174,7 @@ class Router {
killme();
}
- if(get_config('system','log_404',true)) {
+ if(Config::Get('system','log_404',true)) {
logger("Module {$module} not found.", LOGGER_DEBUG, LOG_WARNING);
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI']
. ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: '
diff --git a/Zotlabs/Web/Session.php b/Zotlabs/Web/Session.php
index 14c054d20..ec26e6b0d 100644
--- a/Zotlabs/Web/Session.php
+++ b/Zotlabs/Web/Session.php
@@ -10,6 +10,7 @@ namespace Zotlabs\Web;
* session info.
*/
+use Zotlabs\Lib\Config;
class Session {
@@ -24,7 +25,7 @@ class Session {
ini_set('session.use_only_cookies', 1);
ini_set('session.cookie_httponly', 1);
- $this->custom_handler = boolval(get_config('system', 'session_custom', false));
+ $this->custom_handler = boolval(Config::Get('system', 'session_custom', false));
/*
* Set our session storage functions.
@@ -33,8 +34,8 @@ class Session {
if($this->custom_handler) {
/* Custom handler (files, memached, redis..) */
- $session_save_handler = strval(get_config('system', 'session_save_handler', Null));
- $session_save_path = strval(get_config('system', 'session_save_path', Null));
+ $session_save_handler = strval(Config::Get('system', 'session_save_handler', Null));
+ $session_save_path = strval(Config::Get('system', 'session_save_path', Null));
if(is_null($session_save_handler) || is_null($session_save_path)) {
logger('Session save handler or path not set', LOGGER_NORMAL, LOG_ERR);
@@ -48,8 +49,8 @@ class Session {
else {
ini_set('session.save_handler', $session_save_handler);
ini_set('session.save_path', $session_save_path);
- ini_set('session.gc_probability', intval(get_config('system', 'session_gc_probability', 1)));
- ini_set('session.gc_divisor', intval(get_config('system', 'session_gc_divisor', 100)));
+ ini_set('session.gc_probability', intval(Config::Get('system', 'session_gc_probability', 1)));
+ ini_set('session.gc_divisor', intval(Config::Get('system', 'session_gc_divisor', 100)));
}
}
}
@@ -212,7 +213,7 @@ class Session {
$paranoia = intval(get_pconfig($_SESSION['uid'], 'system', 'paranoia'));
if(! $paranoia)
- $paranoia = intval(get_config('system', 'paranoia'));
+ $paranoia = intval(Config::Get('system', 'paranoia'));
switch($paranoia) {
case 0: