use Date helper

This commit is contained in:
Jean-Christian Paul Denis 2023-04-23 21:00:22 +02:00
parent 0fc0da76c0
commit 0b45344ae0
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -15,10 +15,10 @@ declare(strict_types=1);
namespace Dotclear\Plugin\shortArchives; namespace Dotclear\Plugin\shortArchives;
use dcCore; use dcCore;
use Dotclear\Helper\Date;
use Dotclear\Helper\Html\Html; use Dotclear\Helper\Html\Html;
use Dotclear\Plugin\widgets\WidgetsStack; use Dotclear\Plugin\widgets\WidgetsStack;
use Dotclear\Plugin\widgets\WidgetsElement; use Dotclear\Plugin\widgets\WidgetsElement;
use dt;
class Widgets class Widgets
{ {
@ -59,9 +59,9 @@ class Widgets
$posts = []; $posts = [];
while ($rs->fetch()) { while ($rs->fetch()) {
$posts[dt::dt2str(__('%Y'), $rs->f('dt'))][] = [ $posts[Date::dt2str(__('%Y'), $rs->f('dt'))][] = [
'url' => $rs->url(), 'url' => $rs->url(),
'date' => Html::escapeHTML(dt::dt2str(__('%B'), $rs->f('dt'))), 'date' => Html::escapeHTML(Date::dt2str(__('%B'), $rs->f('dt'))),
'nbpost' => $rs->f('nb_post'), 'nbpost' => $rs->f('nb_post'),
]; ];
} }