From 500eb835237d342b39a59f0238e1577dd83fe92b Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Fri, 23 Dec 2022 10:32:20 +0100 Subject: [PATCH] use dotclear methods --- _widgets.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/_widgets.php b/_widgets.php index 2378d60..5da16c0 100644 --- a/_widgets.php +++ b/_widgets.php @@ -117,10 +117,7 @@ class topWriterWidget public static function topCom($w) { - if ($w->offline - || ($w->homeonly == 1 && !dcCore::app()->url->isHome(dcCore::app()->url->type)) - || ($w->homeonly == 2 && dcCore::app()->url->isHome(dcCore::app()->url->type)) - ) { + if ($w->offline || !$w->checkHomeOnly(dcCore::app()->url->type)) { return null; } @@ -140,10 +137,7 @@ class topWriterWidget public static function topPost($w) { - if ($w->offline - || ($w->homeonly == 1 && !dcCore::app()->url->isHome(dcCore::app()->url->type)) - || ($w->homeonly == 2 && dcCore::app()->url->isHome(dcCore::app()->url->type)) - ) { + if ($w->offline || !$w->checkHomeOnly(dcCore::app()->url->type)) { return null; }