Move Config::get() to DI::config()->get()

This commit is contained in:
nupplaPhil 2020-01-19 21:21:13 +01:00
parent 5d294e8be8
commit 6c36fd9e01
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
126 changed files with 581 additions and 596 deletions

View file

@ -43,13 +43,13 @@ class GContact
}
// check supported networks
if (Config::get('system', 'diaspora_enabled')) {
if (DI::config()->get('system', 'diaspora_enabled')) {
$diaspora = Protocol::DIASPORA;
} else {
$diaspora = Protocol::DFRN;
}
if (!Config::get('system', 'ostatus_disabled')) {
if (!DI::config()->get('system', 'ostatus_disabled')) {
$ostatus = Protocol::OSTATUS;
} else {
$ostatus = Protocol::DFRN;
@ -424,11 +424,11 @@ class GContact
$network = [Protocol::DFRN, Protocol::ACTIVITYPUB];
if (Config::get('system', 'diaspora_enabled')) {
if (DI::config()->get('system', 'diaspora_enabled')) {
$network[] = Protocol::DIASPORA;
}
if (!Config::get('system', 'ostatus_disabled')) {
if (!DI::config()->get('system', 'ostatus_disabled')) {
$network[] = Protocol::OSTATUS;
}
@ -508,7 +508,7 @@ class GContact
$done[] = DI::baseUrl() . '/poco';
if (strlen(Config::get('system', 'directory'))) {
if (strlen(DI::config()->get('system', 'directory'))) {
$x = Network::fetchUrl(Search::getGlobalDirectory() . '/pubsites');
if (!empty($x)) {
$j = json_decode($x);
@ -1235,7 +1235,7 @@ class GContact
*/
public static function discoverGsUsers()
{
$requery_days = intval(Config::get('system', 'poco_requery_days'));
$requery_days = intval(DI::config()->get('system', 'poco_requery_days'));
$last_update = date("c", time() - (60 * 60 * 24 * $requery_days));