[TASK] Use new class names in indexed_search
authorHelmut Hummel <helmut.hummel@typo3.org>
Tue, 20 Nov 2012 22:53:30 +0000 (23:53 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 20 Nov 2012 22:56:12 +0000 (23:56 +0100)
Fixes: #42930
Releases: 6.0

Change-Id: I71780306d8edcd0da769ba7c56d4d4e3e386b77c
Reviewed-on: http://review.typo3.org/16640
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/indexed_search/Classes/Controller/IndexedPagesController.php
typo3/sysext/indexed_search/Classes/Example/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerFilesHook.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Hook/MysqlFulltextIndexHook.php
typo3/sysext/indexed_search/ext_localconf.php

index d77bd3e..888017c 100644 (file)
@@ -113,7 +113,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
                        }
                }
                // Initialize indexer if we need it (metaphone display does...)
-               $this->indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+               $this->indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                // Set CSS styles specific for this document:
                $this->pObj->content = str_replace('/*###POSTCSSMARKER###*/', '
                        TABLE.c-list TR TD { white-space: nowrap; vertical-align: top; }
index 78ff83e..7781655 100644 (file)
@@ -97,11 +97,11 @@ class CrawlerHook {
                                // Prepare the GET variables array that must be added to the page URL in order to view result:
                                parse_str('&itemID=' . rawurlencode($item['ID']), $GETparams);
                                // Prepare indexer (make instance, initialize it, set special features for indexing parameterized content - probably none of this should be changed by you) [DON'T CHANGE]:
-                               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+                               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                                $indexerObj->backend_initIndexer($cfgRec['pid'], 0, $sys_language_uid, '', $rl, $GETparams, FALSE);
                                $indexerObj->backend_setFreeIndexUid($cfgRec['uid'], $cfgRec['set_id']);
                                $indexerObj->forceIndexing = TRUE;
-                               // Indexing the content of the item (see tx_indexedsearch_indexer::backend_indexAsTYPO3Page() for options)
+                               // Indexing the content of the item (see \TYPO3\CMS\IndexedSearch\Indexer::backend_indexAsTYPO3Page() for options)
                                $indexerObj->backend_indexAsTYPO3Page($item['title'], '', '', $item['content'], $GLOBALS['LANG']->charSet, $item['tstamp'], $item['create_date'], $item['ID']);
                        }
                        break;
@@ -114,7 +114,7 @@ class CrawlerHook {
                        // Set up language uid, if any:
                        $sys_language_uid = 0;
                        // Prepare indexer (make instance, initialize it, set special features for indexing parameterized content - probably none of this should be changed by you) [DON'T CHANGE]:
-                       $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+                       $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                        $indexerObj->backend_initIndexer($cfgRec['pid'], 0, $sys_language_uid, '', $rl);
                        $indexerObj->backend_setFreeIndexUid($cfgRec['uid'], $cfgRec['set_id']);
                        $indexerObj->hash['phash'] = -1;
@@ -127,7 +127,7 @@ class CrawlerHook {
                        // Load indexer if not yet.
                        $pObj->loadIndexerClass();
                        // Index external URL:
-                       $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+                       $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                        $indexerObj->backend_initIndexer($cfgRec['pid'], 0, $sys_language_uid, '', $rl);
                        $indexerObj->backend_setFreeIndexUid($cfgRec['uid'], $cfgRec['set_id']);
                        $indexerObj->hash['phash'] = -1;
index 41541d9..6aa0dcf 100644 (file)
@@ -6,7 +6,7 @@ namespace TYPO3\CMS\IndexedSearch\Hook;
  * This hook is specifically used to index external files found on pages through the crawler extension.
  *
  * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
- * @see tx_indexedsearch_indexer::extractLinks()
+ * @see \TYPO3\CMS\IndexedSearch\Indexer::extractLinks()
  */
 class CrawlerFilesHook {
 
index 3dd1809..35d171a 100644 (file)
@@ -267,7 +267,7 @@ class CrawlerHook {
                                // Load indexer if not yet.
                                $this->loadIndexerClass();
                                // (Re)-Indexing file on page.
-                               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+                               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                                $indexerObj->backend_initIndexer($cfgRec['pid'], 0, 0, '', $rl);
                                $indexerObj->backend_setFreeIndexUid($cfgRec['uid'], $cfgRec['set_id']);
                                $indexerObj->hash['phash'] = -1;
@@ -471,7 +471,7 @@ class CrawlerHook {
                // Load indexer if not yet.
                $this->loadIndexerClass();
                // Index external URL:
-               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                $indexerObj->backend_initIndexer($pageId, 0, 0, '', $rl);
                $indexerObj->backend_setFreeIndexUid($cfgUid, $setId);
                $indexerObj->hash['phash'] = -1;
@@ -525,7 +525,7 @@ class CrawlerHook {
                $languageField = $GLOBALS['TCA'][$cfgRec['table2index']]['ctrl']['languageField'];
                $sys_language_uid = $languageField ? $r[$languageField] : 0;
                // (Re)-Indexing a row from a table:
-               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                parse_str(str_replace('###UID###', $r['uid'], $cfgRec['get_params']), $GETparams);
                $indexerObj->backend_initIndexer($cfgRec['pid'], 0, $sys_language_uid, '', $rl, $GETparams, $cfgRec['chashcalc'] ? TRUE : FALSE);
                $indexerObj->backend_setFreeIndexUid($cfgRec['uid'], $cfgRec['set_id']);
index 1207632..d3ddf6d 100644 (file)
@@ -101,7 +101,7 @@ class MysqlFulltextIndexHook {
                                $searchBoolean = TRUE;
                                break;
                        case self::SOUNDS_LIKE:
-                               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_indexedsearch_indexer');
+                               $indexerObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
                                // Initialize the indexer-class
                                /** @var \TYPO3\CMS\IndexedSearch\Indexer $indexerObj */
                                $searchWord = $indexerObj->metaphone($searchWord, $indexerObj->storeMetaphoneInfoAsWords);
index 1bd2a8a..e9b2892 100755 (executable)
@@ -8,42 +8,42 @@ if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('extbase')) {
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin($_EXTKEY, 'Pi2', array('Search' => 'form,search'), array('Search' => 'form,search'));
 }
 // Attach to hooks:
-$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'][] = 'EXT:indexed_search/class.indexer.php:tx_indexedsearch_indexer';
-$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache']['tx_indexedsearch'] = 'EXT:indexed_search/hooks/class.tx_indexedsearch_tslib_fe_hook.php:&tx_indexedsearch_tslib_fe_hook->headerNoCache';
+$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'][] = 'TYPO3\\CMS\\IndexedSearch\\Indexer';
+$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache']['tx_indexedsearch'] = '&TYPO3\\CMS\\IndexedSearch\\Hook\\TypoScriptFrontendHook->headerNoCache';
 // Register with "crawler" extension:
 $TYPO3_CONF_VARS['EXTCONF']['crawler']['procInstructions']['tx_indexedsearch_reindex'] = 'Re-indexing';
-$TYPO3_CONF_VARS['EXTCONF']['crawler']['cli_hooks']['tx_indexedsearch_crawl'] = 'EXT:indexed_search/class.crawler.php:&tx_indexedsearch_crawler';
+$TYPO3_CONF_VARS['EXTCONF']['crawler']['cli_hooks']['tx_indexedsearch_crawl'] = '&TYPO3\\CMS\\IndexedSearch\\Hook\\CrawlerHook';
 // Register with TCEmain:
-$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['tx_indexedsearch'] = 'EXT:indexed_search/class.crawler.php:&tx_indexedsearch_crawler';
-$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['tx_indexedsearch'] = 'EXT:indexed_search/class.crawler.php:&tx_indexedsearch_crawler';
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['tx_indexedsearch'] = '&TYPO3\\CMS\\IndexedSearch\\Hook\\CrawlerHook';
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['tx_indexedsearch'] = '&TYPO3\\CMS\\IndexedSearch\\Hook\\CrawlerHook';
 // Configure default document parsers:
 $TYPO3_CONF_VARS['EXTCONF']['indexed_search']['external_parsers'] = array(
-       'pdf' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'doc' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'pps' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'ppt' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'xls' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'sxc' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'sxi' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'sxw' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'ods' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'odp' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'odt' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'rtf' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'txt' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'html' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'htm' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'csv' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'xml' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'jpg' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'jpeg' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
-       'tif' => 'EXT:indexed_search/class.external_parser.php:&TYPO3\\CMS\\IndexedSearch\\FileContentParser'
+       'pdf' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'doc' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'pps' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'ppt' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'xls' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'sxc' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'sxi' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'sxw' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'ods' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'odp' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'odt' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'rtf' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'txt' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'html' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'htm' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'csv' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'xml' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'jpg' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'jpeg' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser',
+       'tif' => '&TYPO3\\CMS\\IndexedSearch\\FileContentParser'
 );
 $TYPO3_CONF_VARS['EXTCONF']['indexed_search']['use_tables'] = 'index_phash,index_fulltext,index_rel,index_words,index_section,index_grlist,index_stat_search,index_stat_word,index_debug,index_config';
 // unserializing the configuration so we can use it here:
 $_EXTCONF = unserialize($_EXTCONF);
 // Use the advanced doubleMetaphone parser instead of the internal one (usage of metaphone parsers is generally disabled by default)
 if (isset($_EXTCONF['enableMetaphoneSearch']) && intval($_EXTCONF['enableMetaphoneSearch']) == 2) {
-       $TYPO3_CONF_VARS['EXTCONF']['indexed_search']['metaphone'] = 'EXT:indexed_search/class.doublemetaphone.php:&TYPO3\\CMS\\IndexedSearch\\Utility\\DoubleMetaPhoneUtility';
+       $TYPO3_CONF_VARS['EXTCONF']['indexed_search']['metaphone'] = '&TYPO3\\CMS\\IndexedSearch\\Utility\\DoubleMetaPhoneUtility';
 }
 ?>
\ No newline at end of file