From 67413ff5d3e40cbce8877afc880612d8e7daa5b7 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 24 Apr 2023 14:59:18 +0200 Subject: [PATCH] remove magic --- src/Widgets.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Widgets.php b/src/Widgets.php index a7d8d5e..4334522 100644 --- a/src/Widgets.php +++ b/src/Widgets.php @@ -42,7 +42,7 @@ class Widgets 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 ''; } @@ -51,7 +51,7 @@ class Widgets return ''; } - $ftdatecrea = $w->ftdatecrea; + $ftdatecrea = $w->__get('ftdatecrea'); //Si la date est vide nous recherchons la date en base if (strlen(rtrim($ftdatecrea)) == 0) { $jour = date('d', dcCore::app()->blog->creadt); @@ -97,13 +97,13 @@ class Widgets } return $w->renderDiv( - (bool) $w->content_only, - My::id() . ' ' . $w->class, + (bool) $w->__get('content_only'), + My::id() . ' ' . $w->__get('class'), '', - ($w->title ? $w->renderTitle(Html::escapeHTML($w->title)) : '') . + ($w->__get('title') ? $w->renderTitle(Html::escapeHTML($w->__get('title'))) : '') . '' );