dcAdvancedCleaner/_prepend.php

49 lines
2 KiB
PHP

<?php
/**
* @brief dcAdvancedCleaner, 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_CONTEXT_ADMIN')) {
return null;
}
# dcac class
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',
]);
# cleaners class
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',
]);
dcCore::app()->addBehaviors([
'advancedCleanerAdd' => ['advancedCleanerVersions', 'create'],
'advancedCleanerAdd' => ['advancedCleanerSettings', 'create'],
'advancedCleanerAdd' => ['advancedCleanerTables', 'create'],
'advancedCleanerAdd' => ['advancedCleanerThemes', 'create'],
'advancedCleanerAdd' => ['advancedCleanerPlugins', 'create'],
'advancedCleanerAdd' => ['advancedCleanerCaches', 'create'],
'advancedCleanerAdd' => ['advancedCleanerVars', 'create'],
]);
if (defined('ACTIVITY_REPORT_V2')) {
dcAdvancedCleanerActivityReportBehaviors::add();
}