[TASK] Remove superfluous parenthesis in sysexts
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / Classes / Hook / TypoScriptFrontendHook.php
1 <?php
2 namespace TYPO3\CMS\IndexedSearch\Hook;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2009-2011 Oliver Hader <oliver@typo3.org>
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26 /**
27 * Hooks for tslib_fe (TSFE).
28 *
29 * @author Oliver Hader <oliver@typo3.org>
30 * @package TYPO3
31 * @subpackage tx_indexedsearch
32 */
33 class TypoScriptFrontendHook {
34
35 /**
36 * Frontend hook: If the page is not being re-generated this is our chance to force it to be (because re-generation of the page is required in order to have the indexer called!)
37 *
38 * @param array Parameters from frontend
39 * @param object TSFE object (reference under PHP5)
40 * @return void
41 */
42 public function headerNoCache(array &$params, $ref) {
43 // Requirements are that the crawler is loaded, a crawler session is running and re-indexing requested as processing instruction:
44 if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('crawler') && $params['pObj']->applicationData['tx_crawler']['running'] && in_array('tx_indexedsearch_reindex', $params['pObj']->applicationData['tx_crawler']['parameters']['procInstructions'])) {
45 // Setting simple log entry:
46 $params['pObj']->applicationData['tx_crawler']['log'][] = 'RE_CACHE (indexed), old status: ' . $params['disableAcquireCacheData'];
47 // Disables a look-up for cached page data - thus resulting in re-generation of the page even if cached.
48 $params['disableAcquireCacheData'] = TRUE;
49 }
50 }
51
52 }
53
54
55 ?>