File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 15
15
'meta ' => array (
16
16
'title ' => _a ('News ' ),
17
17
'description ' => _a ('Manage News and Blog ' ),
18
- 'version ' => '1.8.5 ' ,
18
+ 'version ' => '1.8.6 ' ,
19
19
'license ' => 'New BSD ' ,
20
20
'logo ' => 'image/logo.png ' ,
21
21
'readme ' => 'docs/readme.txt ' ,
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ CREATE TABLE `{story}` (
40
40
KEY ` story_order` (` time_publish` , ` id` )
41
41
);
42
42
43
+ ALTER TABLE ` {story}` ADD FULLTEXT ` search_idx` (` title` , ` text_description` );
44
+
45
+
43
46
CREATE TABLE ` {topic}` (
44
47
` id` INT (10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
45
48
` pid` INT (5 ) UNSIGNED NOT NULL DEFAULT ' 0' ,
Original file line number Diff line number Diff line change @@ -800,6 +800,20 @@ public function updateSchema(Event $e)
800
800
}
801
801
}
802
802
803
+ if (version_compare ($ moduleVersion , '1.8.6 ' , '< ' )) {
804
+ $ sql = sprintf ("ALTER TABLE %s ADD FULLTEXT `search_idx` (`title`, `text_description`); " , $ storyTable );
805
+ try {
806
+ $ storyAdapter ->query ($ sql , 'execute ' );
807
+ } catch (\Exception $ exception ) {
808
+ $ this ->setResult ('db ' , array (
809
+ 'status ' => false ,
810
+ 'message ' => 'Table alter query failed: '
811
+ . $ exception ->getMessage (),
812
+ ));
813
+ return false ;
814
+ }
815
+ }
816
+
803
817
return true ;
804
818
}
805
819
}
You can’t perform that action at this time.
0 commit comments