use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Cache\Duration;
-use Friendica\Core\Config;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\System;
$serverlist = [];
// Fetching relay servers
- $serverdata = Config::get("system", "relay_server");
+ $serverdata = DI::config()->get("system", "relay_server");
if (!empty($serverdata)) {
$servers = explode(",", $serverdata);
}
}
- 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)) {
}
/**
- * @brief: Decodes incoming Diaspora message in the new format
+ * Decodes incoming Diaspora message in the new format
*
* @param string $raw raw post message
* @param string $privKey The private key of the importer
}
/**
- * @brief: Decodes incoming Diaspora message in the deprecated format
+ * Decodes incoming Diaspora message in the deprecated format
*
* @param string $xml urldecoded Diaspora salmon
* @param string $privKey The private key of the importer
*/
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;
*/
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;
}
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]);
if ($item["attach"]) {
$cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism', $item["attach"], $matches, PREG_SET_ORDER);
if ($cnt) {
- $body .= "\n".L10n::t("Attachments:")."\n";
+ $body .= "\n".DI::l10n()->t("Attachments:")."\n";
foreach ($matches as $mtch) {
$body .= "[".$mtch[3]."](".$mtch[1].")\n";
}
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']);
}
FROM `profile`
INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
INNER JOIN `contact` ON `profile`.`uid` = `contact`.`uid`
- WHERE `user`.`uid` = %d AND `profile`.`is-default` AND `contact`.`self` LIMIT 1",
+ WHERE `user`.`uid` = %d AND `contact`.`self` LIMIT 1",
intval($uid)
);