zoneclearFeedServer/src/Prepend.php

54 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;
use dcNsProcess;
/**
* Module prepend.
*/
class Prepend extends dcNsProcess
{
public static function init(): bool
{
2023-05-10 07:59:38 +00:00
static::$init = defined('DC_RC_PATH');
2023-05-07 22:40:58 +00:00
return static::$init;
}
public static function process(): bool
{
if (!static::$init) {
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
}