*/
use Friendica\App;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
+use Friendica\DI;
use Friendica\Model\Contact;
-use Friendica\Util\XML;
use Friendica\Content\Text\Markdown;
use Friendica\Util\Network;
use Friendica\Util\Strings;
return;
}
- $enabled = intval(PConfig::get(local_user(), 'discourse', 'enabled'));
+ $enabled = intval(DI::pConfig()->get(local_user(), 'discourse', 'enabled'));
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/discourse/');
$s .= Renderer::replaceMacros($t, [
- '$title' => L10n::t('Discourse'),
- '$enabled' => ['enabled', L10n::t('Enable processing of Discourse mailing list mails'), $enabled, L10n::t('If enabled, incoming mails from Discourse will be improved so they look much better. To make it work, you have to configure the e-mail settings in Friendica. You also have to enable the mailing list mode in Discourse. Then you have to add the Discourse mail account as contact.')],
- '$submit' => L10n::t('Save Settings'),
+ '$title' => DI::l10n()->t('Discourse'),
+ '$enabled' => ['enabled', DI::l10n()->t('Enable processing of Discourse mailing list mails'), $enabled, DI::l10n()->t('If enabled, incoming mails from Discourse will be improved so they look much better. To make it work, you have to configure the e-mail settings in Friendica. You also have to enable the mailing list mode in Discourse. Then you have to add the Discourse mail account as contact.')],
+ '$submit' => DI::l10n()->t('Save Settings'),
]);
}
return;
}
- PConfig::set(local_user(), 'discourse', 'enabled', intval($_POST['enabled']));
+ DI::pConfig()->set(local_user(), 'discourse', 'enabled', intval($_POST['enabled']));
}
function discourse_email_getmessage(App $a, &$message)
return;
}
- if (!PConfig::get($message['item']['uid'], 'discourse', 'enabled')) {
+ if (!DI::pConfig()->get($message['item']['uid'], 'discourse', 'enabled')) {
return;
}