saba/_prepend.php
2022-12-22 23:27:12 +01:00

30 lines
753 B
PHP

<?php
/**
* @brief saba, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
}
if (defined('ACTIVITY_REPORT_V2')) {
dcCore::app()->__get('activityReport')->addAction(
'blog',
'saba404',
__('404 error (saba)'),
__('New 404 error page at "%s"'),
'sabaBeforeErrorDocument',
function () {
$logs = [dcCore::app()->blog->url . urldecode($_SERVER['QUERY_STRING'])];
dcCore::app()->__get('activityReport')->addLog('blog', 'saba404', $logs);
}
);
}