diff --git a/CHANGELOG.md b/CHANGELOG.md index a4203c8..b110ad1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +zoneclearFeedServer 2023.10.18 +=========================================================== +* Require Dotclear 2.28 +* Require PHP 8.1 +* Upgrade plugin activityReport + zoneclearFeedServer 2023.10.14 =========================================================== * Require Dotclear 2.28 diff --git a/README.md b/README.md index abda47e..c5d4c45 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # README -[![Release](https://img.shields.io/badge/release-2023.10.14-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/zoneclearFeedServer/releases) -![Date](https://img.shields.io/badge/date-2023.10.14-c44d58.svg) +[![Release](https://img.shields.io/badge/release-2023.10.18-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/zoneclearFeedServer/releases) +![Date](https://img.shields.io/badge/date-2023.10.18-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/zoneclearFeedServer) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/zoneclearFeedServer/src/branch/master/LICENSE) diff --git a/_define.php b/_define.php index fb5c7f9..93ecfa9 100644 --- a/_define.php +++ b/_define.php @@ -19,7 +19,7 @@ $this->registerModule( 'Feeds server', 'Mix your blog with a feeds planet', 'Jean-Christian Denis, BG, Pierre Van Glabeke', - '2023.10.14', + '2023.10.18', [ 'requires' => [['core', '2.28']], 'permissions' => 'My', diff --git a/src/ActivityReportActions.php b/src/ActivityReportAction.php similarity index 92% rename from src/ActivityReportActions.php rename to src/ActivityReportAction.php index 26be2fb..3de186f 100644 --- a/src/ActivityReportActions.php +++ b/src/ActivityReportAction.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Dotclear\Plugin\zoneclearFeedServer; use Dotclear\App; +use Dotclear\Core\Process; use Dotclear\Database\Cursor; use Dotclear\Plugin\activityReport\{ Action, @@ -13,7 +14,7 @@ use Dotclear\Plugin\activityReport\{ }; /** - * @brief zoneclearFeedServer activityReport class. + * @brief zoneclearFeedServer plugin activityReport class. * @ingroup zoneclearFeedServer * * Add feeds actions to the plugin activity report. @@ -21,10 +22,19 @@ use Dotclear\Plugin\activityReport\{ * @author Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ -class ActivityReportActions +class ActivityReportAction extends Process { - public static function init(): void + public static function init(): bool { + return self::status(true); + } + + public static function process(): bool + { + if (!self::status()) { + return false; + } + $group = new Group(My::id(), My::name()); $group->add(new Action( @@ -141,5 +151,7 @@ class ActivityReportActions )); ActivityReport::instance()->groups->add($group); + + return true; } } diff --git a/src/Frontend.php b/src/Frontend.php index 3cf8cb6..9ca5a64 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -43,7 +43,7 @@ class Frontend extends Process return $context == 'zoneclearFeedsPage' ? __('List of feeds') : ''; }, // widgets registration - 'initWidgets' => [Widgets::class, 'init'], + 'initWidgets' => Widgets::init(...), ]); // Register template blocks diff --git a/src/Prepend.php b/src/Prepend.php index 21370ff..e3add05 100644 --- a/src/Prepend.php +++ b/src/Prepend.php @@ -35,11 +35,6 @@ class Prepend extends Process UrlHandler::zoneclearFeedsPage(...) ); - // report zoneclearFeedServer activities - if (defined('ACTIVITY_REPORT') && ACTIVITY_REPORT == 3) { - ActivityReportActions::init(); - } - return true; } }