upgrade plugin activityReport
This commit is contained in:
parent
f2a3977f2d
commit
0d96001a25
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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',
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -35,11 +35,6 @@ class Prepend extends Process
|
||||
UrlHandler::zoneclearFeedsPage(...)
|
||||
);
|
||||
|
||||
// report zoneclearFeedServer activities
|
||||
if (defined('ACTIVITY_REPORT') && ACTIVITY_REPORT == 3) {
|
||||
ActivityReportActions::init();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user