diff --git a/_admin.php b/_admin.php index ab7f47e..817be6d 100644 --- a/_admin.php +++ b/_admin.php @@ -12,6 +12,9 @@ */ declare(strict_types=1); -if (Dotclear\Plugin\improve\Admin::init()) { - Dotclear\Plugin\improve\Admin::process(); +$admin = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Admin']); +if ($admin::init()) { + return $admin::process(); } + +return null; diff --git a/_config.php b/_config.php index fdad8b7..33c5281 100644 --- a/_config.php +++ b/_config.php @@ -12,11 +12,8 @@ */ declare(strict_types=1); -if (!defined('DC_CONTEXT_MODULE')) { - return null; -} - -if (Dotclear\Plugin\improve\Config::init()) { - Dotclear\Plugin\improve\Config::process(); - Dotclear\Plugin\improve\Config::render(); +$config = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Config']); +if ($config::init()) { + $config::process(); + $config::render(); } diff --git a/_install.php b/_install.php index 395c677..1a984f4 100644 --- a/_install.php +++ b/_install.php @@ -12,8 +12,9 @@ */ declare(strict_types=1); -if (Dotclear\Plugin\improve\Install::init()) { - return Dotclear\Plugin\improve\Install::process(); +$install = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Install']); +if ($install::init()) { + return $install::process(); } return null; diff --git a/_prepend.php b/_prepend.php index f5fd5d9..5eb335d 100644 --- a/_prepend.php +++ b/_prepend.php @@ -12,10 +12,11 @@ */ declare(strict_types=1); -if (!class_exists('Dotclear\Plugin\improve\Prepend')) { - require __DIR__ . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Prepend.php'; +$prepend = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Prepend']); +if (!class_exists($prepend)) { + require implode(DIRECTORY_SEPARATOR, [__DIR__, 'inc', 'Prepend.php']); - if (Dotclear\Plugin\improve\Prepend::init()) { - Dotclear\Plugin\improve\Prepend::process(); + if ($prepend::init()) { + $prepend::process(); } } diff --git a/_uninstall.php b/_uninstall.php index 5b5ccea..e825aa1 100644 --- a/_uninstall.php +++ b/_uninstall.php @@ -12,6 +12,7 @@ */ declare(strict_types=1); -if (Dotclear\Plugin\improve\Uninstall::init()) { - Dotclear\Plugin\improve\Uninstall::process($this); +$uninstall = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Uninstall']); +if ($uninstall::init()) { + $uninstall::process($this); } diff --git a/index.php b/index.php index 001675b..f250cd9 100644 --- a/index.php +++ b/index.php @@ -12,7 +12,8 @@ */ declare(strict_types=1); -if (Dotclear\Plugin\improve\Manage::init()) { - Dotclear\Plugin\improve\Manage::process(); - Dotclear\Plugin\improve\Manage::render(); +$manage = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Manage']); +if ($manage::init()) { + $manage::process(); + $manage::render(); }