From ac273a58ed268a2dbfdffae280b248f8b6796872 Mon Sep 17 00:00:00 2001 From: aljawaid <10233708+aljawaid@users.noreply.github.com> Date: Mon, 1 May 2023 21:19:14 +0100 Subject: [PATCH] Move `getDeletablePlugins` to ContentCleanerController.php - #11 - thanks @creecros --- Controller/ContentCleanerController.php | 10 ++++++++++ Controller/PluginCleaningController.php | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Controller/ContentCleanerController.php b/Controller/ContentCleanerController.php index 7a98a68..c825cd7 100644 --- a/Controller/ContentCleanerController.php +++ b/Controller/ContentCleanerController.php @@ -31,4 +31,14 @@ public function show() 'db_version' => $this->db->getDriver()->getDatabaseVersion(), ))); } + + public function getDeletablePlugins() + { + // GET THE JSON OF PLUGINS WHICH CAN BE DELETED + // 'template/cleaning-jobs/plugin-cleaning.json' + + $file = PLUGINS_DIR . '/ContentCleaner/Template/cleaning-jobs/plugin-cleaning.json'; + $plugins = json_decode(file_get_contents($file), true); + return $plugins; + } } diff --git a/Controller/PluginCleaningController.php b/Controller/PluginCleaningController.php index 6ef3592..357aea7 100644 --- a/Controller/PluginCleaningController.php +++ b/Controller/PluginCleaningController.php @@ -14,13 +14,5 @@ class PluginCleaningController extends BaseController { - public function getDeletablePlugins() - { - // GET THE JSON OF PLUGINS WHICH CAN BE DELETED - // 'template/cleaning-jobs/plugin-cleaning.json' - $file = PLUGINS_DIR . '/ContentCleaner/Template/cleaning-jobs/plugin-cleaning.json'; - $plugins = json_decode(file_get_contents($file), true); - return $plugins; - } }