Skip to content

Commit

Permalink
Fix #78 reverse logic in version detection so that default else will …
Browse files Browse the repository at this point in the history
…result in latest code
  • Loading branch information
creecros committed Mar 30, 2023
1 parent fc08a25 commit 9cace10
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -202,7 +202,7 @@ public function getPluginAuthor()
}
public function getPluginVersion()
{
return '1.8.0';
return '1.8.1';
}
public function getPluginHomepage()
{
Expand Down

0 comments on commit 9cace10

Please sign in to comment.