diff --git a/CHANGELOG.md b/CHANGELOG.md index 04e7057..7031c00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +lastBlogUpdate 2023.10.19 +=========================================================== +* Require Dotclear 2.28 +* Require PHP 8.1 +* Code review (callable) + lastBlogUpdate 2023.10.11 =========================================================== * Require Dotclear 2.28 diff --git a/README.md b/README.md index e4ec88e..b2e897c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # README -[![Release](https://img.shields.io/badge/release-2023.10.11-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/lastBlogUpdate/releases) -![Date](https://img.shields.io/badge/date-2023.10.11-c44d58.svg) +[![Release](https://img.shields.io/badge/release-2023.10.19-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/lastBlogUpdate/releases) +![Date](https://img.shields.io/badge/date-2023.10.19-c44d58.svg) [![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/lastBlogUpdate) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/lastBlogUpdate/src/branch/master/LICENSE) @@ -14,9 +14,9 @@ _lastBlogUpdate_ is a plugin for the open-source web publishing software called ## REQUIREMENTS -* permissions to manage widgets * Dotclear 2.28 * PHP 8.1+ +* Dotclear permissions to manage widgets ## USAGE diff --git a/_define.php b/_define.php index 4836eb6..d808573 100644 --- a/_define.php +++ b/_define.php @@ -9,14 +9,13 @@ * Show the dates of last updates of your blog in a widget. * * @author Jean-Christian Denis - * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ $this->registerModule( 'Last blog update', 'Show the dates of last updates of your blog in a widget', 'Jean-Christian Denis, Pierre Van Glabeke', - '2023.10.11', + '2023.10.19', [ 'requires' => [['core', '2.28']], 'permissions' => 'My', diff --git a/dcstore.xml b/dcstore.xml index ef0aed3..8bcfd5d 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,10 +2,10 @@ Last blog update - 2023.10.11 + 2023.10.19 Jean-Christian Denis, Pierre Van Glabeke Show the dates of last updates of your blog in a widget - https://git.dotclear.watch/JcDenis/lastBlogUpdate/releases/download/v2023.10.11/plugin-lastBlogUpdate.zip + https://git.dotclear.watch/JcDenis/lastBlogUpdate/releases/download/v2023.10.19/plugin-lastBlogUpdate.zip 2.28 https://git.dotclear.watch/JcDenis/lastBlogUpdate/src/branch/master/README.md https://git.dotclear.watch/JcDenis/lastBlogUpdate/issues diff --git a/src/Backend.php b/src/Backend.php index 711c37b..a094c64 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -12,7 +12,6 @@ use Dotclear\Core\Process; * @ingroup lastBlogUpdate * * @author Jean-Christian Denis - * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ class Backend extends Process @@ -28,9 +27,7 @@ class Backend extends Process return false; } - App::behavior()->addBehaviors([ - 'initWidgets' => [Widgets::class, 'initWidgets'], - ]); + App::behavior()->addBehavior('initWidgets', Widgets::initWidgets(...)); return true; } diff --git a/src/Frontend.php b/src/Frontend.php index 2a25824..426930f 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -12,7 +12,6 @@ use Dotclear\Core\Process; * @ingroup lastBlogUpdate * * @author Jean-Christian Denis - * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ class Frontend extends Process @@ -28,9 +27,7 @@ class Frontend extends Process return false; } - App::behavior()->addBehaviors([ - 'initWidgets' => [Widgets::class, 'initWidgets'], - ]); + App::behavior()->addBehavior('initWidgets', Widgets::initWidgets(...)); return true; } diff --git a/src/My.php b/src/My.php index b528749..818635a 100644 --- a/src/My.php +++ b/src/My.php @@ -11,7 +11,6 @@ use Dotclear\Module\MyPlugin; * @ingroup lastBlogUpdate * * @author Jean-Christian Denis - * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ class My extends MyPlugin diff --git a/src/Widgets.php b/src/Widgets.php index 70bbe51..232b369 100644 --- a/src/Widgets.php +++ b/src/Widgets.php @@ -16,7 +16,6 @@ use Dotclear\Plugin\widgets\WidgetsElement; * @ingroup lastBlogUpdate * * @author Jean-Christian Denis - * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ class Widgets @@ -27,7 +26,7 @@ class Widgets ->create( 'lastblogupdate', __('Last blog update'), - [self::class, 'parseWidget'], + self::parseWidget(...), null, 'Show the dates of last updates of your blog in a widget' )