remove magic

This commit is contained in:
Jean-Christian Denis 2023-04-24 14:59:18 +02:00
parent d34bbc3878
commit 67413ff5d3
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -42,7 +42,7 @@ class Widgets
public static function parseWidget(WidgetsElement $w): string public static function parseWidget(WidgetsElement $w): string
{ {
if ($w->offline || !$w->checkHomeOnly(dcCore::app()->url->type)) { if ($w->__get('offline') || !$w->checkHomeOnly(dcCore::app()->url->type)) {
return ''; return '';
} }
@ -51,7 +51,7 @@ class Widgets
return ''; return '';
} }
$ftdatecrea = $w->ftdatecrea; $ftdatecrea = $w->__get('ftdatecrea');
//Si la date est vide nous recherchons la date en base //Si la date est vide nous recherchons la date en base
if (strlen(rtrim($ftdatecrea)) == 0) { if (strlen(rtrim($ftdatecrea)) == 0) {
$jour = date('d', dcCore::app()->blog->creadt); $jour = date('d', dcCore::app()->blog->creadt);
@ -97,13 +97,13 @@ class Widgets
} }
return $w->renderDiv( return $w->renderDiv(
(bool) $w->content_only, (bool) $w->__get('content_only'),
My::id() . ' ' . $w->class, My::id() . ' ' . $w->__get('class'),
'', '',
($w->title ? $w->renderTitle(Html::escapeHTML($w->title)) : '') . ($w->__get('title') ? $w->renderTitle(Html::escapeHTML($w->__get('title'))) : '') .
'<ul>' . '<ul>' .
($w->dispyearborn ? '<li>' . __('Born:') . ' <span class="annivne">' . $ftdatecrea . '</span></li>' : '') . ($w->__get('dispyearborn') ? '<li>' . __('Born:') . ' <span class="annivne">' . $ftdatecrea . '</span></li>' : '') .
($w->dispyear ? '<li>' . __('Age:') . ' <span class="annivan">' . $nbreannee . '</span> ' . __('year(s)') . '</li>' : '') . ($w->__get('dispyear') ? '<li>' . __('Age:') . ' <span class="annivan">' . $nbreannee . '</span> ' . __('year(s)') . '</li>' : '') .
'<li>' . __('Birthday in') . ' <span class="annivjrs">' . $nbrejours . '</span> ' . __('day(s)') . '</li>' . '<li>' . __('Birthday in') . ' <span class="annivjrs">' . $nbrejours . '</span> ' . __('day(s)') . '</li>' .
'</ul>' '</ul>'
); );