mirror of
https://github.com/friendica/friendica
synced 2025-04-29 21:04:24 +02:00
replace macros
implement new replaceMacros function
This commit is contained in:
parent
f6c86649c2
commit
91facd2d0a
91 changed files with 335 additions and 249 deletions
|
@ -11,6 +11,7 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -899,7 +900,7 @@ class Event extends BaseObject
|
|||
$profile_link = Contact::magicLinkById($item['author-id']);
|
||||
|
||||
$tpl = get_markup_template('event_stream_item.tpl');
|
||||
$return = replace_macros($tpl, [
|
||||
$return = Renderer::replaceMacros($tpl, [
|
||||
'$id' => $item['event-id'],
|
||||
'$title' => prepare_text($item['event-summary']),
|
||||
'$dtstart_label' => L10n::t('Starts:'),
|
||||
|
|
|
@ -8,6 +8,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\BaseObject;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Util\Security;
|
||||
|
||||
|
@ -332,7 +333,7 @@ class Group extends BaseObject
|
|||
$label = L10n::t('Default privacy group for new contacts');
|
||||
}
|
||||
|
||||
$o = replace_macros(get_markup_template('group_selection.tpl'), [
|
||||
$o = Renderer::replaceMacros(get_markup_template('group_selection.tpl'), [
|
||||
'$label' => $label,
|
||||
'$groups' => $display_groups
|
||||
]);
|
||||
|
@ -400,7 +401,7 @@ class Group extends BaseObject
|
|||
}
|
||||
|
||||
$tpl = get_markup_template('group_side.tpl');
|
||||
$o = replace_macros($tpl, [
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$add' => L10n::t('add'),
|
||||
'$title' => L10n::t('Groups'),
|
||||
'$groups' => $display_groups,
|
||||
|
|
|
@ -15,6 +15,7 @@ use Friendica\Core\L10n;
|
|||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -171,7 +172,7 @@ class Profile
|
|||
}
|
||||
|
||||
if (local_user() && local_user() == $a->profile['uid'] && $profiledata) {
|
||||
$a->page['aside'] .= replace_macros(
|
||||
$a->page['aside'] .= Renderer::replaceMacros(
|
||||
get_markup_template('profile_edlink.tpl'),
|
||||
[
|
||||
'$editprofile' => L10n::t('Edit profile'),
|
||||
|
@ -517,7 +518,7 @@ class Profile
|
|||
$p['url'] = Contact::magicLink(defaults($p, 'url', $profile_url));
|
||||
|
||||
$tpl = get_markup_template('profile_vcard.tpl');
|
||||
$o .= replace_macros($tpl, [
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$profile' => $p,
|
||||
'$xmpp' => $xmpp,
|
||||
'$connect' => $connect,
|
||||
|
@ -622,7 +623,7 @@ class Profile
|
|||
}
|
||||
}
|
||||
$tpl = get_markup_template('birthdays_reminder.tpl');
|
||||
return replace_macros($tpl, [
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$classtoday' => $classtoday,
|
||||
'$count' => $total,
|
||||
|
@ -711,7 +712,7 @@ class Profile
|
|||
$classtoday = (($istoday) ? 'event-today' : '');
|
||||
}
|
||||
$tpl = get_markup_template('events_reminder.tpl');
|
||||
return replace_macros($tpl, [
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$classtoday' => $classtoday,
|
||||
'$count' => count($r),
|
||||
|
@ -726,7 +727,7 @@ class Profile
|
|||
$o = '';
|
||||
$uid = $a->profile['uid'];
|
||||
|
||||
$o .= replace_macros(
|
||||
$o .= Renderer::replaceMacros(
|
||||
get_markup_template('section_title.tpl'),
|
||||
['$title' => L10n::t('Profile')]
|
||||
);
|
||||
|
@ -860,7 +861,7 @@ class Profile
|
|||
$profile['edit'] = [System::baseUrl() . '/profiles/' . $a->profile['id'], L10n::t('Edit profile'), '', L10n::t('Edit profile')];
|
||||
}
|
||||
|
||||
return replace_macros($tpl, [
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$title' => L10n::t('Profile'),
|
||||
'$basic' => L10n::t('Basic'),
|
||||
'$advanced' => L10n::t('Advanced'),
|
||||
|
@ -979,7 +980,7 @@ class Profile
|
|||
|
||||
$tpl = get_markup_template('common_tabs.tpl');
|
||||
|
||||
return replace_macros($tpl, ['$tabs' => $arr['tabs']]);
|
||||
return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs']]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue