From: Oliver Hader Date: Mon, 8 Jun 2009 10:57:47 +0000 (+0000) Subject: Fixed bug #11033: Optimize hook to indexed_search that checks for a running crawler... X-Git-Tag: TYPO3_4-3-0beta1~436 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/2b534676f43e156d969ce3e3dc5db621e739b435 Fixed bug #11033: Optimize hook to indexed_search that checks for a running crawler task git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5571 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/ChangeLog b/ChangeLog index 37066275057..d6373665e9e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-08 Oliver Hader + + * Fixed bug #11033: Optimize hook to indexed_search that checks for a running crawler task + 2009-06-08 Steffen Kamper * Followup to #11117: typo in ExtJs theme: grey -> gray diff --git a/typo3/sysext/indexed_search/class.indexer.php b/typo3/sysext/indexed_search/class.indexer.php index 8abb8617329..70c6cb60584 100755 --- a/typo3/sysext/indexed_search/class.indexer.php +++ b/typo3/sysext/indexed_search/class.indexer.php @@ -2072,20 +2072,11 @@ class tx_indexedsearch_indexer { * @param array Parameters from frontend * @param object TSFE object (reference under PHP5) * @return void + * @deprecated since TYPO3 4.3 - the method was extracted to hooks/class.tx_indexedsearch_tslib_fe_hook.php */ function fe_headerNoCache(&$params, $ref) { - - // Requirements are that the crawler is loaded, a crawler session is running and re-indexing requested as processing instruction: - if (t3lib_extMgm::isLoaded('crawler') - && $params['pObj']->applicationData['tx_crawler']['running'] - && in_array('tx_indexedsearch_reindex', $params['pObj']->applicationData['tx_crawler']['parameters']['procInstructions'])) { - - // Setting simple log entry: - $params['pObj']->applicationData['tx_crawler']['log'][] = 'RE_CACHE (indexed), old status: '.$params['disableAcquireCacheData']; - - // Disables a look-up for cached page data - thus resulting in re-generation of the page even if cached. - $params['disableAcquireCacheData'] = TRUE; - } + require_once t3lib_extMgm::extPath('indexed_search') . 'hooks/class.tx_indexedsearch_tslib_fe_hook.php'; + t3lib_div::makeInstance('tx_indexedsearch_tslib_fe_hook')->headerNoCache($params, $ref); } } diff --git a/typo3/sysext/indexed_search/ext_localconf.php b/typo3/sysext/indexed_search/ext_localconf.php index 2b0f500f7a0..189534dac40 100755 --- a/typo3/sysext/indexed_search/ext_localconf.php +++ b/typo3/sysext/indexed_search/ext_localconf.php @@ -9,7 +9,7 @@ t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg',' // 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/class.indexer.php:&tx_indexedsearch_indexer->fe_headerNoCache'; +$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'; // Register with "crawler" extension: $TYPO3_CONF_VARS['EXTCONF']['crawler']['procInstructions']['tx_indexedsearch_reindex'] = 'Re-indexing';