TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
indexed_search/Classes/Service/DatabaseSchemaService.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\IndexedSearch\Service;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 {
29  public function addMysqlFulltextIndex(array $sqlString)
30  {
31  // Check again if the extension flag is enabled to be on the safe side
32  // even if the slot registration is moved around in ext_localconf
33  $extConf = [];
34  if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search'])) {
35  $extConf = unserialize(
36  $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search'],
37  ['allowed_classes' => false]
38  );
39  }
40  if (isset($extConf['useMysqlFulltext']) && $extConf['useMysqlFulltext'] === '1') {
41  // @todo: With MySQL 5.7 fulltext index on InnoDB is possible, check for that and keep inno if so.
42  $sqlString[] = 'CREATE TABLE index_fulltext ('
43  . LF . 'fulltextdata mediumtext,'
44  . LF . 'metaphonedata mediumtext,'
45  . LF . 'FULLTEXT fulltextdata (fulltextdata),'
46  . LF . 'FULLTEXT metaphonedata (metaphonedata)'
47  . LF . ') ENGINE=MyISAM;';
48  }
49  return [$sqlString];
50  }
51 }
if(TYPO3_MODE=== 'BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']