2021-09-02 22:04:20 +00:00
|
|
|
<?php
|
2021-09-02 22:18:08 +00:00
|
|
|
/**
|
|
|
|
* @brief activityReport, a plugin for Dotclear 2
|
2022-11-18 20:24:30 +00:00
|
|
|
*
|
2021-09-02 22:18:08 +00:00
|
|
|
* @package Dotclear
|
|
|
|
* @subpackage Plugin
|
2022-11-18 20:24:30 +00:00
|
|
|
*
|
2021-09-02 22:18:08 +00:00
|
|
|
* @author Jean-Christian Denis and contributors
|
2022-11-18 20:24:30 +00:00
|
|
|
*
|
2021-09-02 22:18:08 +00:00
|
|
|
* @copyright Jean-Christian Denis
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
2021-09-02 22:51:23 +00:00
|
|
|
if (!defined('DC_RC_PATH')) {
|
|
|
|
return null;
|
|
|
|
}
|
2021-09-02 22:04:20 +00:00
|
|
|
|
2022-11-30 21:34:00 +00:00
|
|
|
Clearbricks::lib()->autoload([
|
|
|
|
'activityReport' => __DIR__ . '/inc/class.activity.report.php',
|
|
|
|
'activityReportBehaviors' => __DIR__ . '/inc/class.activity.report.behaviors.php',
|
|
|
|
]);
|
2021-09-02 22:04:20 +00:00
|
|
|
|
2021-09-02 22:51:23 +00:00
|
|
|
try {
|
2022-11-18 20:24:30 +00:00
|
|
|
if (!defined('ACTIVITY_REPORT_V2')) {
|
|
|
|
dcCore::app()->__set('activityReport', new activityReport());
|
2021-09-02 22:04:20 +00:00
|
|
|
|
2022-11-18 20:24:30 +00:00
|
|
|
dcCore::app()->url->register(
|
2021-09-03 19:35:13 +00:00
|
|
|
'activityReport',
|
|
|
|
'reports',
|
|
|
|
'^reports/((atom|rss2)/(.+))$',
|
|
|
|
['activityReportPublicUrl', 'feed']
|
|
|
|
);
|
2021-09-02 22:04:20 +00:00
|
|
|
|
2022-11-18 20:24:30 +00:00
|
|
|
define('ACTIVITY_REPORT_V2', true);
|
2021-09-02 22:04:20 +00:00
|
|
|
|
2022-11-18 20:24:30 +00:00
|
|
|
activityReportBehaviors::registerBehaviors();
|
2021-09-03 19:35:13 +00:00
|
|
|
}
|
2021-09-02 22:51:23 +00:00
|
|
|
} catch (Exception $e) {
|
2021-09-02 22:18:08 +00:00
|
|
|
//throw new Exception('Failed to launch activityReport');
|
2022-11-18 20:24:30 +00:00
|
|
|
}
|