From 9cace1043e7097cf81975a08ab1629c44a18ec29 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 30 Mar 2023 15:57:50 +0000 Subject: [PATCH] Fix #78 reverse logic in version detection so that default else will result in latest code --- Plugin.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Plugin.php b/Plugin.php index 3a2de7d..62adccc 100644 --- a/Plugin.php +++ b/Plugin.php @@ -54,14 +54,14 @@ public function initialize() } $clean_appversion = preg_replace('/\s+/', '', $applications_version); - if (version_compare($clean_appversion, '1.2.5', '>')) { + if (version_compare($clean_appversion, '1.2.5', '<')) { if (file_exists('plugins/MetaMagik')) { $this->container['taskFinderModel'] = $this->container->factory(function ($c) { - return new NewMetaMagikSubquery($c); + return new OldMetaMagikSubquery($c); }); } else { $this->container['taskFinderModel'] = $this->container->factory(function ($c) { - return new NewTaskFinderModel($c); + return new OldTaskFinderModel($c); }); } $this->container['taskDuplicationModel'] = $this->container->factory(function ($c) { @@ -79,11 +79,11 @@ public function initialize() } else { if (file_exists('plugins/MetaMagik')) { $this->container['taskFinderModel'] = $this->container->factory(function ($c) { - return new OldMetaMagikSubquery($c); + return new NewMetaMagikSubquery($c); }); } else { $this->container['taskFinderModel'] = $this->container->factory(function ($c) { - return new OldTaskFinderModel($c); + return new NewTaskFinderModel($c); }); } $this->container['taskDuplicationModel'] = $this->container->factory(function ($c) { @@ -202,7 +202,7 @@ public function getPluginAuthor() } public function getPluginVersion() { - return '1.8.0'; + return '1.8.1'; } public function getPluginHomepage() {