dcAdvancedCleaner/_prepend.php

48 lines
2.1 KiB
PHP
Raw Normal View History

2018-02-19 18:10:58 +00:00
<?php
2021-09-06 22:09:09 +00:00
/**
* @brief dcAdvancedCleaner, a plugin for Dotclear 2
2021-11-06 15:19:49 +00:00
*
2021-09-06 22:09:09 +00:00
* @package Dotclear
* @subpackage Plugin
2021-11-06 15:19:49 +00:00
*
2021-09-06 22:09:09 +00:00
* @author Jean-Christian Denis and Contributors
2021-11-06 15:19:49 +00:00
*
2021-09-06 22:09:09 +00:00
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
2021-10-28 20:17:38 +00:00
if (!defined('DC_CONTEXT_ADMIN')) {
return null;
}
2018-02-19 18:10:58 +00:00
2021-10-28 20:17:38 +00:00
# dcac class
2022-11-30 22:46:41 +00:00
Clearbricks::lib()->autoload([
'advancedCleaner' => __DIR__ . '/inc/class.advanced.cleaner.php',
'dcAdvancedCleaner' => __DIR__ . '/inc/class.dc.advanced.cleaner.php',
'behaviorsDcAdvancedCleaner' => __DIR__ . '/inc/lib.dc.advanced.cleaner.behaviors.php',
'dcUninstaller' => __DIR__ . '/inc/class.dc.uninstaller.php',
'dcAdvancedCleanerActivityReportBehaviors' => __DIR__ . '/inc/lib.dc.advanced.cleaner.activityreport.php',
]);
2018-02-19 18:10:58 +00:00
2021-10-28 20:17:38 +00:00
# cleaners class
2022-11-30 22:46:41 +00:00
Clearbricks::lib()->autoload([
'advancedCleanerVersions' => __DIR__ . '/inc/lib.advanced.cleaner.php',
'advancedCleanerSettings' => __DIR__ . '/inc/lib.advanced.cleaner.php',
'advancedCleanerTables' => __DIR__ . '/inc/lib.advanced.cleaner.php',
'advancedCleanerThemes' => __DIR__ . '/inc/lib.advanced.cleaner.php',
'advancedCleanerPlugins' => __DIR__ . '/inc/lib.advanced.cleaner.php',
'advancedCleanerCaches' => __DIR__ . '/inc/lib.advanced.cleaner.php',
'advancedCleanerVars' => __DIR__ . '/inc/lib.advanced.cleaner.php',
]);
2021-10-28 20:17:38 +00:00
2022-11-15 10:34:45 +00:00
dcCore::app()->addBehavior('advancedCleanerAdd', ['advancedCleanerVersions', 'create']);
dcCore::app()->addBehavior('advancedCleanerAdd', ['advancedCleanerSettings', 'create']);
dcCore::app()->addBehavior('advancedCleanerAdd', ['advancedCleanerTables', 'create']);
dcCore::app()->addBehavior('advancedCleanerAdd', ['advancedCleanerThemes', 'create']);
dcCore::app()->addBehavior('advancedCleanerAdd', ['advancedCleanerPlugins', 'create']);
dcCore::app()->addBehavior('advancedCleanerAdd', ['advancedCleanerCaches', 'create']);
dcCore::app()->addBehavior('advancedCleanerAdd', ['advancedCleanerVars', 'create']);
2021-10-28 20:17:38 +00:00
2022-11-18 20:30:23 +00:00
if (defined('ACTIVITY_REPORT_V2')) {
2022-11-15 10:34:45 +00:00
dcAdvancedCleanerActivityReportBehaviors::add();
2021-11-06 15:19:49 +00:00
}