Fixed bug #12835: Caching error when clearing indexed search elements in info module
authorOliver Hader <oliver.hader@typo3.org>
Sun, 29 Nov 2009 18:26:39 +0000 (18:26 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sun, 29 Nov 2009 18:26:39 +0000 (18:26 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6593 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/indexed_search/modfunc1/class.tx_indexedsearch_modfunc1.php

index 501e693..bca5c95 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,7 @@
        * Fixed bug #11395: TCAdefaults in Page TSConfig without effect on creating new element after existing one (thanks to Tolleiv Nietsch)
        * Fixed bug #12800: Add functionality to work with caching framework and DBAL (thanks to Xavier Perseguers)
        * Fixed bug #12781: The type in t3lib_TCEforms does not work if the type field shall be excluded when translating (thanks to Fabrizio Branca)
+       * Fixed bug #12835: Caching error when clearing indexed search elements in info module (thanks to Steffen Kamper)
        * Raised DBAL version from 1.0.1 to 1.0.2
        * Raised Extbase and Fluid versions from 1.0.1 to 1.0.2
 
index 77eb12d..728a60b 100755 (executable)
@@ -1282,13 +1282,16 @@ class tx_indexedsearch_modfunc1 extends t3lib_extobjbase {
                                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($res))   {
                                                $idList = array();
                                                while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))       {
-                                                       $idList[] = $row['page_id'];
+                                                       $idList[] = (int)$row['page_id'];
                                                }
 
-                                               $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
-
-                                               foreach ($idList as $pageId) {
-                                                       $pageCache->flushByTag('pageId_' . (int) $pageId);
+                                               if (TYPO3_UseCachingFramework) {
+                                                       $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
+                                                       foreach ($idList as $pageId) {
+                                                               $pageCache->flushByTag('pageId_' . $pageId);
+                                                       }
+                                               } else {
+                                                       $GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages', 'page_id IN (' . implode(',', $idList) . ')');
                                                }
                                        }
                                }