Skip to content

Commit 9cace10

Browse files
committed
Fix #78 reverse logic in version detection so that default else will result in latest code
1 parent fc08a25 commit 9cace10

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Plugin.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ public function initialize()
5454
}
5555
$clean_appversion = preg_replace('/\s+/', '', $applications_version);
5656

57-
if (version_compare($clean_appversion, '1.2.5', '>')) {
57+
if (version_compare($clean_appversion, '1.2.5', '<')) {
5858
if (file_exists('plugins/MetaMagik')) {
5959
$this->container['taskFinderModel'] = $this->container->factory(function ($c) {
60-
return new NewMetaMagikSubquery($c);
60+
return new OldMetaMagikSubquery($c);
6161
});
6262
} else {
6363
$this->container['taskFinderModel'] = $this->container->factory(function ($c) {
64-
return new NewTaskFinderModel($c);
64+
return new OldTaskFinderModel($c);
6565
});
6666
}
6767
$this->container['taskDuplicationModel'] = $this->container->factory(function ($c) {
@@ -79,11 +79,11 @@ public function initialize()
7979
} else {
8080
if (file_exists('plugins/MetaMagik')) {
8181
$this->container['taskFinderModel'] = $this->container->factory(function ($c) {
82-
return new OldMetaMagikSubquery($c);
82+
return new NewMetaMagikSubquery($c);
8383
});
8484
} else {
8585
$this->container['taskFinderModel'] = $this->container->factory(function ($c) {
86-
return new OldTaskFinderModel($c);
86+
return new NewTaskFinderModel($c);
8787
});
8888
}
8989
$this->container['taskDuplicationModel'] = $this->container->factory(function ($c) {
@@ -202,7 +202,7 @@ public function getPluginAuthor()
202202
}
203203
public function getPluginVersion()
204204
{
205-
return '1.8.0';
205+
return '1.8.1';
206206
}
207207
public function getPluginHomepage()
208208
{

0 commit comments

Comments
 (0)