@@ -45,40 +45,13 @@ public function initialize()
45
45
$ this ->helper ->register ('smallAvatarHelperExtend ' , '\Kanboard\Plugin\Group_assign\Helper\SmallAvatarHelperExtend ' );
46
46
47
47
48
- //Models
49
- if (function_exists ('\Schema\version_132 ' ) && DB_DRIVER == 'mysql ' ) {
50
- $ this ->container ['taskFinderModel ' ] = $ this ->container ->factory (function ($ c ) {
51
- return new NewTaskFinderModel ($ c );
52
- });
53
- $ this ->container ['taskDuplicationModel ' ] = $ this ->container ->factory (function ($ c ) {
54
- return new GroupAssignTaskDuplicationModel ($ c );
55
- });
56
- $ this ->container ['taskProjectDuplicationModel ' ] = $ this ->container ->factory (function ($ c ) {
57
- return new TaskProjectDuplicationModel ($ c );
58
- });
59
- $ this ->container ['taskProjectMoveModel ' ] = $ this ->container ->factory (function ($ c ) {
60
- return new TaskProjectMoveModel ($ c );
61
- });
62
- $ this ->container ['taskRecurrenceModel ' ] = $ this ->container ->factory (function ($ c ) {
63
- return new TaskRecurrenceModel ($ c );
64
- });
65
- } else if (function_exists ('\Schema\version_119 ' ) && DB_DRIVER == 'sqlite ' ) {
66
- $ this ->container ['taskFinderModel ' ] = $ this ->container ->factory (function ($ c ) {
67
- return new NewTaskFinderModel ($ c );
68
- });
69
- $ this ->container ['taskDuplicationModel ' ] = $ this ->container ->factory (function ($ c ) {
70
- return new GroupAssignTaskDuplicationModel ($ c );
71
- });
72
- $ this ->container ['taskProjectDuplicationModel ' ] = $ this ->container ->factory (function ($ c ) {
73
- return new TaskProjectDuplicationModel ($ c );
74
- });
75
- $ this ->container ['taskProjectMoveModel ' ] = $ this ->container ->factory (function ($ c ) {
76
- return new TaskProjectMoveModel ($ c );
77
- });
78
- $ this ->container ['taskRecurrenceModel ' ] = $ this ->container ->factory (function ($ c ) {
79
- return new TaskRecurrenceModel ($ c );
80
- });
81
- } else if (function_exists ('\Schema\version_110 ' ) && DB_DRIVER == 'postgres ' ) {
48
+ //Models and backward compatibility
49
+
50
+ $ applications_version = str_replace ('v ' , '' , APP_VERSION );
51
+ if (strpos (APP_VERSION , 'master ' ) !== false && file_exists ('ChangeLog ' )) { $ applications_version = trim (file_get_contents ('ChangeLog ' , false , null , 8 , 6 ), ' ' ); }
52
+ $ clean_appversion = preg_replace ('/\s+/ ' , '' , $ applications_version );
53
+
54
+ if (version_compare ($ clean_appversion , '1.2.5 ' , '> ' )) {
82
55
$ this ->container ['taskFinderModel ' ] = $ this ->container ->factory (function ($ c ) {
83
56
return new NewTaskFinderModel ($ c );
84
57
});
@@ -196,7 +169,7 @@ public function getPluginAuthor()
196
169
}
197
170
public function getPluginVersion ()
198
171
{
199
- return '1.7.6 ' ;
172
+ return '1.7.7 ' ;
200
173
}
201
174
public function getPluginHomepage ()
202
175
{
0 commit comments