dcAdvancedCleaner/_prepend.php

54 lines
2.9 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-09-06 23:39:52 +00:00
if (!defined('DC_RC_PATH')) {
return null;
}
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-15 10:34:45 +00:00
Clearbricks::lib()->autoload(['advancedCleaner' => __DIR__ . '/inc/class.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['dcAdvancedCleaner' => __DIR__ . '/inc/class.dc.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['behaviorsDcAdvancedCleaner' => __DIR__ . '/inc/lib.dc.advanced.cleaner.behaviors.php']);
Clearbricks::lib()->autoload(['dcUninstaller' => __DIR__ . '/inc/class.dc.uninstaller.php']);
Clearbricks::lib()->autoload(['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-15 10:34:45 +00:00
Clearbricks::lib()->autoload(['advancedCleanerVersions' => __DIR__ . '/inc/lib.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['advancedCleanerSettings' => __DIR__ . '/inc/lib.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['advancedCleanerTables' => __DIR__ . '/inc/lib.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['advancedCleanerThemes' => __DIR__ . '/inc/lib.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['advancedCleanerPlugins' => __DIR__ . '/inc/lib.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['advancedCleanerCaches' => __DIR__ . '/inc/lib.advanced.cleaner.php']);
Clearbricks::lib()->autoload(['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
# dcac behaviors
2022-11-15 10:34:45 +00:00
dcCore::app()->addBehavior('adminDashboardFavoritesV2', ['behaviorsDcAdvancedCleaner', 'adminDashboardFavorites']);
dcCore::app()->addBehavior('pluginsToolsTabsV2', ['behaviorsDcAdvancedCleaner', 'pluginsToolsTabs']);
dcCore::app()->addBehavior('adminModulesListDoActions', ['behaviorsDcAdvancedCleaner', 'adminModulesListDoActions']);
dcCore::app()->addBehavior('pluginsBeforeDelete', ['behaviorsDcAdvancedCleaner', 'pluginsBeforeDelete']);
dcCore::app()->addBehavior('themeBeforeDelete', ['behaviorsDcAdvancedCleaner', 'themeBeforeDelete']);
2018-02-19 18:10:58 +00:00
2021-09-06 23:39:52 +00:00
if (defined('ACTIVITY_REPORT')) {
2022-11-15 10:34:45 +00:00
dcAdvancedCleanerActivityReportBehaviors::add();
2021-11-06 15:19:49 +00:00
}