Bug #22410 » 14050_cleaning_t3lib_tsparser_tsconfig.patch
t3lib/class.t3lib_tsparser_tsconfig.php (revision ) | ||
---|---|---|
<?php
|
||
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2010 Kasper Sk?rh?j (kasperYYYY@typo3.com)
|
||
* (c) 2007-2010 Kraft Bernhard (kraftb@kraftb.at)
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
* Copyright notice
|
||
*
|
||
* (c) 1999-2010 Kasper Sk?rh?j (kasperYYYY@typo3.com)
|
||
* (c) 2007-2010 Kraft Bernhard (kraftb@kraftb.at)
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
* free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation; either version 2 of the License, or
|
||
* (at your option) any later version.
|
||
*
|
||
* The GNU General Public License can be found at
|
||
* http://www.gnu.org/copyleft/gpl.html.
|
||
* A copy is found in the textfile GPL.txt and important notices to the license
|
||
* from the author is found in LICENSE.txt distributed with these scripts.
|
||
*
|
||
*
|
||
* This script is distributed in the hope that it will be useful,
|
||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
* GNU General Public License for more details.
|
||
*
|
||
* This copyright notice MUST APPEAR in all copies of the script!
|
||
***************************************************************/
|
||
/**
|
||
* A TS-Config parsing class which performs condition evaluation
|
||
*
|
||
... | ... | |
$this->type = $type;
|
||
$this->id = $id;
|
||
$this->rootLine = $rootLine;
|
||
$hash = md5($type.':'.$TStext);
|
||
$hash = md5($type . ':' . $TStext);
|
||
$cachedContent = t3lib_BEfunc::getHash($hash, 0);
|
||
if ($cachedContent) {
|
||
... | ... | |
'cached' => 1,
|
||
);
|
||
} else {
|
||
$shash = md5($checkMD5.$hash);
|
||
$shash = md5($checkMD5 . $hash);
|
||
$cachedSpec = t3lib_BEfunc::getHash($shash, 0);
|
||
if ($cachedSpec) {
|
||
$storedData = unserialize($cachedSpec);
|
||
... | ... | |
} else {
|
||
$storeData = $this->parseWithConditions($TStext);
|
||
$serData = serialize($storeData);
|
||
t3lib_BEfunc::storeHash($shash, $serData, $type.'_TSconfig');
|
||
t3lib_BEfunc::storeHash($shash, $serData, $type . '_TSconfig');
|
||
$res = array(
|
||
'TSconfig' => $storeData['TSconfig'],
|
||
'cached' => 0,
|
||
... | ... | |
$storeData = $this->parseWithConditions($TStext);
|
||
$serData = serialize($storeData);
|
||
$md5 = md5($serData);
|
||
t3lib_BEfunc::storeHash($hash, $serData.$md5, $type.'_TSconfig');
|
||
t3lib_BEfunc::storeHash($hash, $serData . $md5, $type . '_TSconfig');
|
||
$res = array(
|
||
'TSconfig' => $storeData['TSconfig'],
|
||
'cached' => 0,
|