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

@ -10,6 +10,7 @@ use Friendica\BaseModule;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model;
@ -105,7 +106,7 @@ function group_content(App $a) {
];
if (($a->argc == 2) && ($a->argv[1] === 'new')) {
return replace_macros($tpl, $context + [
return Renderer::replaceMacros($tpl, $context + [
'$title' => L10n::t('Create a group of contacts/friends.'),
'$gname' => ['groupname', L10n::t('Group Name: '), '', ''],
'$gid' => 'new',
@ -215,7 +216,7 @@ function group_content(App $a) {
}
$drop_tpl = get_markup_template('group_drop.tpl');
$drop_txt = replace_macros($drop_tpl, [
$drop_txt = Renderer::replaceMacros($drop_tpl, [
'$id' => $group['id'],
'$delete' => L10n::t('Delete Group'),
'$form_security_token' => BaseModule::getFormSecurityToken("group_drop"),
@ -307,10 +308,10 @@ function group_content(App $a) {
if ($change) {
$tpl = get_markup_template('groupeditor.tpl');
echo replace_macros($tpl, $context);
echo Renderer::replaceMacros($tpl, $context);
killme();
}
return replace_macros($tpl, $context);
return Renderer::replaceMacros($tpl, $context);
}