replace macros

implement new replaceMacros function
This commit is contained in:
Adam Magness 2018-10-31 10:35:50 -04:00
parent f6c86649c2
commit 91facd2d0a
91 changed files with 335 additions and 249 deletions

View file

@ -8,6 +8,7 @@ use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
@ -517,7 +518,7 @@ function notification($params)
}
$itemlink = System::baseUrl().'/notify/view/'.$notify_id;
$msg = replace_macros($epreamble, ['$itemlink' => $itemlink]);
$msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $itemlink]);
$msg_cache = format_notification_message($datarray['name_cache'], strip_tags(BBCode::convert($msg)));
$fields = ['msg' => $msg, 'msg_cache' => $msg_cache];
@ -590,7 +591,7 @@ function notification($params)
// load the template for private message notifications
$tpl = get_markup_template('email_notify_html.tpl');
$email_html_body = replace_macros($tpl, [
$email_html_body = Renderer::replaceMacros($tpl, [
'$banner' => $datarray['banner'],
'$product' => $datarray['product'],
'$preamble' => str_replace("\n", "<br>\n", $datarray['preamble']),
@ -611,7 +612,7 @@ function notification($params)
// load the template for private message notifications
$tpl = get_markup_template('email_notify_text.tpl');
$email_text_body = replace_macros($tpl, [
$email_text_body = Renderer::replaceMacros($tpl, [
'$banner' => $datarray['banner'],
'$product' => $datarray['product'],
'$preamble' => $datarray['preamble'],