zoneclearFeedServer/src/Prepend.php

52 lines
1.1 KiB
PHP
Raw Normal View History

2015-04-25 19:25:03 +00:00
<?php
/**
* @brief zoneclearFeedServer, a plugin for Dotclear 2
2021-11-06 15:30:19 +00:00
*
* @package Dotclear
* @subpackage Plugin
2021-11-06 15:30:19 +00:00
*
* @author Jean-Christian Denis, BG, Pierre Van Glabeke
2021-11-06 15:30:19 +00:00
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
2023-05-07 22:40:58 +00:00
declare(strict_types=1);
namespace Dotclear\Plugin\zoneclearFeedServer;
use dcCore;
2023-08-16 20:03:40 +00:00
use Dotclear\Core\Process;
2023-05-07 22:40:58 +00:00
/**
* Module prepend.
*/
2023-08-16 20:03:40 +00:00
class Prepend extends Process
2023-05-07 22:40:58 +00:00
{
public static function init(): bool
{
2023-08-16 20:03:40 +00:00
return self::status(My::checkContext(My::PREPEND));
2023-05-07 22:40:58 +00:00
}
public static function process(): bool
{
2023-08-16 20:03:40 +00:00
if (!self::status()) {
2023-05-07 22:40:58 +00:00
return false;
}
// public url for page of description of the flux
dcCore::app()->url->register(
'zoneclearFeedsPage',
'zcfeeds',
'^zcfeeds(.*?)$',
[UrlHandler::class, 'zoneclearFeedsPage']
);
// report zoneclearFeedServer activities
if (defined('ACTIVITY_REPORT') && ACTIVITY_REPORT == 3) {
ActivityReportActions::init();
}
2015-04-25 19:25:03 +00:00
2023-05-07 22:40:58 +00:00
return true;
}
2021-11-06 15:30:19 +00:00
}