File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 7
7
<descriptive locale =" en_US" >
8
8
<title >Keyword</title >
9
9
</descriptive >
10
- <version >2.4.6 </version >
10
+ <version >2.4.7 </version >
11
11
<author >
12
12
<name >Michaël Espeche</name >
13
13
<email >mespeche@openstudio.fr</email >
Original file line number Diff line number Diff line change 23
23
24
24
namespace Keyword ;
25
25
26
+ use Keyword \Model \CategoryAssociatedKeywordQuery ;
27
+ use Keyword \Model \FolderAssociatedKeywordQuery ;
28
+ use Keyword \Model \ContentAssociatedKeywordQuery ;
29
+ use Keyword \Model \KeywordGroupQuery ;
30
+ use Keyword \Model \KeywordQuery ;
31
+ use Keyword \Model \ProductAssociatedKeywordQuery ;
26
32
use Propel \Runtime \Connection \ConnectionInterface ;
27
33
use Thelia \Install \Database ;
28
34
use Thelia \Module \BaseModule ;
@@ -31,7 +37,18 @@ class Keyword extends BaseModule
31
37
{
32
38
public function postActivation (ConnectionInterface $ con = null )
33
39
{
34
- $ database = new Database ($ con ->getWrappedConnection ());
35
- $ database ->insertSql (null , array (THELIA_ROOT . '/local/modules/Keyword/Config/thelia.sql ' ));
40
+
41
+ try {
42
+ CategoryAssociatedKeywordQuery::create ()->findOne ();
43
+ ContentAssociatedKeywordQuery::create ()->findOne ();
44
+ FolderAssociatedKeywordQuery::create ()->findOne ();
45
+ ProductAssociatedKeywordQuery::create ()->findOne ();
46
+ KeywordQuery::create ()->findOne ();
47
+ KeywordGroupQuery::create ()->findOne ();
48
+ } catch (\Exception $ e ) {
49
+ $ database = new Database ($ con );
50
+ $ database ->insertSql (null , [__DIR__ . "/Config/thelia.sql " ]);
51
+ }
52
+
36
53
}
37
54
}
You can’t perform that action at this time.
0 commit comments