Refactor bbcode() into BBCode::convert()

This commit is contained in:
Hypolite Petovan 2018-02-14 21:43:40 -05:00
parent f4e38b6ee9
commit 91fd77af3b
12 changed files with 37 additions and 23 deletions

View file

@ -10,6 +10,7 @@
require_once 'include/bbcode.php';
require_once 'mod/proxy.php';
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
@ -39,7 +40,7 @@ function obfuscate_email ($s) {
return $s;
}
function impressum_footer($a, &$b) {
$text = proxy_parse_html(bbcode(Config::get('impressum','footer_text'), true));
$text = proxy_parse_html(BBCode::convert(Config::get('impressum','footer_text')));
if (! $text == '') {
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/impressum/impressum.css" media="all" />';
$b .= '<div class="clear"></div>';
@ -50,8 +51,8 @@ function impressum_show($a,&$b) {
$b .= '<h3>'.L10n::t('Impressum').'</h3>';
$owner = Config::get('impressum', 'owner');
$owner_profile = Config::get('impressum','ownerprofile');
$postal = proxy_parse_html(bbcode(Config::get('impressum', 'postal'), true));
$notes = proxy_parse_html(bbcode(Config::get('impressum', 'notes'), true));
$postal = proxy_parse_html(BBCode::convert(Config::get('impressum', 'postal')));
$notes = proxy_parse_html(BBCode::convert(Config::get('impressum', 'notes')));
$email = obfuscate_email( Config::get('impressum','email') );
if (strlen($owner)) {
if (strlen($owner_profile)) {