Fixed bug #11033: Optimize hook to indexed_search that checks for a running crawler...
authorOliver Hader <oliver.hader@typo3.org>
Mon, 8 Jun 2009 10:57:47 +0000 (10:57 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 8 Jun 2009 10:57:47 +0000 (10:57 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5571 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/indexed_search/class.indexer.php
typo3/sysext/indexed_search/ext_localconf.php

index 3706627..d637366 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-08  Oliver Hader  <oliver@typo3.org>
+
+       * Fixed bug #11033: Optimize hook to indexed_search that checks for a running crawler task
+
 2009-06-08  Steffen Kamper  <info@sk-typo3.de>
 
        * Followup to #11117: typo in ExtJs theme: grey -> gray
index 8abb861..70c6cb6 100755 (executable)
@@ -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);
        }
 }
 
index 2b0f500..189534d 100755 (executable)
@@ -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';