mirror of
https://github.com/friendica/friendica
synced 2025-05-09 20:24:10 +02:00
Merge pull request #8142 from nupplaphil/task/di_config
CleanUp Config namespace
This commit is contained in:
commit
04d620fc2f
207 changed files with 1276 additions and 1439 deletions
|
@ -14,7 +14,6 @@ use Friendica\Content\Feature;
|
|||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\Cache\Duration;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
|
@ -91,7 +90,7 @@ class Diaspora
|
|||
$serverlist = [];
|
||||
|
||||
// Fetching relay servers
|
||||
$serverdata = Config::get("system", "relay_server");
|
||||
$serverdata = DI::config()->get("system", "relay_server");
|
||||
|
||||
if (!empty($serverdata)) {
|
||||
$servers = explode(",", $serverdata);
|
||||
|
@ -100,7 +99,7 @@ class Diaspora
|
|||
}
|
||||
}
|
||||
|
||||
if (Config::get("system", "relay_directly", false)) {
|
||||
if (DI::config()->get("system", "relay_directly", false)) {
|
||||
// We distribute our stuff based on the parent to ensure that the thread will be complete
|
||||
$parent = Item::selectFirst(['parent'], ['id' => $item_id]);
|
||||
if (!DBA::isResult($parent)) {
|
||||
|
@ -668,7 +667,7 @@ class Diaspora
|
|||
*/
|
||||
public static function dispatchPublic($msg)
|
||||
{
|
||||
$enabled = intval(Config::get("system", "diaspora_enabled"));
|
||||
$enabled = intval(DI::config()->get("system", "diaspora_enabled"));
|
||||
if (!$enabled) {
|
||||
Logger::log("diaspora is disabled");
|
||||
return false;
|
||||
|
@ -3133,7 +3132,7 @@ class Diaspora
|
|||
*/
|
||||
private static function transmit(array $owner, array $contact, $envelope, $public_batch, $guid = "")
|
||||
{
|
||||
$enabled = intval(Config::get("system", "diaspora_enabled"));
|
||||
$enabled = intval(DI::config()->get("system", "diaspora_enabled"));
|
||||
if (!$enabled) {
|
||||
return 200;
|
||||
}
|
||||
|
@ -3160,7 +3159,7 @@ class Diaspora
|
|||
|
||||
Logger::log("transmit: ".$logid."-".$guid." ".$dest_url);
|
||||
|
||||
if (!intval(Config::get("system", "diaspora_test"))) {
|
||||
if (!intval(DI::config()->get("system", "diaspora_test"))) {
|
||||
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
|
||||
|
||||
$postResult = Network::post($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
|
||||
|
@ -3772,7 +3771,7 @@ class Diaspora
|
|||
if (
|
||||
$item['author-id'] != $thread_parent_item['author-id']
|
||||
&& (empty($item['uid']) || !Feature::isEnabled($item['uid'], 'explicit_mentions'))
|
||||
&& !Config::get('system', 'disable_implicit_mentions')
|
||||
&& !DI::config()->get('system', 'disable_implicit_mentions')
|
||||
) {
|
||||
$body = self::prependParentAuthorMention($body, $thread_parent_item['author-link']);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue