Project

General

Profile

Bug #17905 » 0006924_v3.patch

Administrator Admin, 2007-12-12 11:12

View differences:

t3lib/class.t3lib_div.php (Arbeitskopie)
$fI['dirname'].= '/';
// Check parts:
if (t3lib_div::validPathStr($filepath) && $fI['basename'] && strlen($fI['basename'])<60) {
if (t3lib_div::validPathStr($filepath) && $fI['basename']) {
if (defined('PATH_site')) {
$dirName = PATH_site.'typo3temp/'; // Setting main temporary directory name (standard)
if (@is_dir($dirName)) {
......
$origCharset = $csConvObj->parse_charset($csConvObj->charSetArray[$langKey] ? $csConvObj->charSetArray[$langKey] : 'iso-8859-1');
// Cache file name:
$hashSource = substr($fileRef,strlen(PATH_site)).'|'.date('d-m-Y H:i:s',filemtime($fileRef)).'|version=2.2';
$hashSource = substr($fileRef,strlen(PATH_site)).'|'.date('d-m-Y H:i:s',filemtime($fileRef)).'|version=2.3';
$cacheFileName = PATH_site.'typo3temp/llxml/'.
#str_replace('_','',ereg_replace('^.*\/','',dirname($fileRef))).
#'_'.basename($fileRef).
substr(basename($fileRef),10,15).
'_'.t3lib_div::shortMD5($hashSource).'.'.$langKey.'.'.$origCharset.'.cache';
'_'.md5($hashSource).'.'.$langKey.'.'.$origCharset.'.cache';
// Check if cache file exists...
if (!@is_file($cacheFileName)) { // ... if it doesn't, create content and write it:
......
// If no entry is found for the language key, then force a value depending on meta-data setting. By default an automated filename will be used:
$LOCAL_LANG[$langKey] = t3lib_div::llXmlAutoFileName($fileRef, $langKey);
if (!$LOCAL_LANG[$langKey] && isset($xmlContent['data'][$langKey])) {
$localized_file = t3lib_div::getFileAbsFileName($LOCAL_LANG[$langKey]);
if (!@is_file($localized_file) && isset($xmlContent['data'][$langKey])) {
$LOCAL_LANG[$langKey] = $xmlContent['data'][$langKey];
}
......
$hashSource = substr($localized_file,strlen(PATH_site)).'|'.date('d-m-Y H:i:s',filemtime($localized_file));
$cacheFileName = PATH_site.'typo3temp/llxml/ext_'.
substr(basename($localized_file),10,15).
'_'.t3lib_div::shortMD5($hashSource).'.'.$langKey.'.'.$origCharset.'.cache';
'_'.md5($hashSource).'.'.$langKey.'.'.$origCharset.'.cache';
// Check if cache file exists...
if (!@is_file($cacheFileName)) { // ... if it doesn't, create content and write it:
(1-1/3)