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-09-06 23:39:52 +00:00
|
|
|
$d = dirname(__FILE__) . '/inc/';
|
2018-02-19 18:10:58 +00:00
|
|
|
|
2021-10-28 20:17:38 +00:00
|
|
|
# dcac class
|
|
|
|
$__autoload['advancedCleaner'] = $d . 'class.advanced.cleaner.php';
|
|
|
|
$__autoload['dcAdvancedCleaner'] = $d . 'class.dc.advanced.cleaner.php';
|
|
|
|
$__autoload['behaviorsDcAdvancedCleaner'] = $d . 'lib.dc.advanced.cleaner.behaviors.php';
|
|
|
|
$__autoload['dcUninstaller'] = $d . 'class.dc.uninstaller.php';
|
2021-09-06 23:39:52 +00:00
|
|
|
$__autoload['dcAdvancedCleanerActivityReportBehaviors'] = $d . 'lib.dc.advanced.cleaner.activityreport.php';
|
2018-02-19 18:10:58 +00:00
|
|
|
|
2021-10-28 20:17:38 +00:00
|
|
|
# cleaners class
|
|
|
|
$__autoload['advancedCleanerVersions'] = $d . 'lib.advanced.cleaner.php';
|
|
|
|
$__autoload['advancedCleanerSettings'] = $d . 'lib.advanced.cleaner.php';
|
|
|
|
$__autoload['advancedCleanerTables'] = $d . 'lib.advanced.cleaner.php';
|
|
|
|
$__autoload['advancedCleanerThemes'] = $d . 'lib.advanced.cleaner.php';
|
|
|
|
$__autoload['advancedCleanerPlugins'] = $d . 'lib.advanced.cleaner.php';
|
|
|
|
$__autoload['advancedCleanerCaches'] = $d . 'lib.advanced.cleaner.php';
|
|
|
|
$__autoload['advancedCleanerVars'] = $d . 'lib.advanced.cleaner.php';
|
|
|
|
|
|
|
|
$core->addBehavior('advancedCleanerAdd', ['advancedCleanerVersions', 'create']);
|
|
|
|
$core->addBehavior('advancedCleanerAdd', ['advancedCleanerSettings', 'create']);
|
|
|
|
$core->addBehavior('advancedCleanerAdd', ['advancedCleanerTables', 'create']);
|
|
|
|
$core->addBehavior('advancedCleanerAdd', ['advancedCleanerThemes', 'create']);
|
|
|
|
$core->addBehavior('advancedCleanerAdd', ['advancedCleanerPlugins', 'create']);
|
|
|
|
$core->addBehavior('advancedCleanerAdd', ['advancedCleanerCaches', 'create']);
|
|
|
|
$core->addBehavior('advancedCleanerAdd', ['advancedCleanerVars', 'create']);
|
|
|
|
|
|
|
|
# dcac behaviors
|
|
|
|
$core->addBehavior('adminDashboardFavorites', ['behaviorsDcAdvancedCleaner', 'adminDashboardFavorites']);
|
|
|
|
$core->addBehavior('pluginsToolsTabs', ['behaviorsDcAdvancedCleaner', 'pluginsToolsTabs']);
|
|
|
|
$core->addBehavior('adminModulesListDoActions', ['behaviorsDcAdvancedCleaner', 'adminModulesListDoActions']);
|
|
|
|
$core->addBehavior('pluginsBeforeDelete', ['behaviorsDcAdvancedCleaner', 'pluginsBeforeDelete']);
|
|
|
|
$core->addBehavior('themeBeforeDelete', ['behaviorsDcAdvancedCleaner', 'themeBeforeDelete']);
|
2018-02-19 18:10:58 +00:00
|
|
|
|
2021-09-06 23:39:52 +00:00
|
|
|
if (defined('ACTIVITY_REPORT')) {
|
|
|
|
dcAdvancedCleanerActivityReportBehaviors::add($core);
|
2021-11-06 15:19:49 +00:00
|
|
|
}
|