Bug #21561 » 12604_v3.diff
typo3/sysext/cms/tslib/class.tslib_content.php (working copy) | ||
---|---|---|
$gifCreator->init();
|
||
if ($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']) {
|
||
$gifCreator->filenamePrefix = $GLOBALS['TSFE']->fileNameASCIIPrefix(preg_replace('/\.[[:alnum:]]+$/','',basename($theImage)),intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']),'_');
|
||
$filename = basename($theImage);
|
||
// remove extension
|
||
$filename = substr($filename, 0, strrpos($filename, '.'));
|
||
// strip everything non-ascii
|
||
$filename = preg_replace('/[^A-Za-z0-9_-]/', '', trim($filename));
|
||
$gifCreator->filenamePrefix = substr($filename, 0, intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix'])) . '_';
|
||
unset($filename);
|
||
}
|
||
if ($fileArray['sample']) {
|
typo3/sysext/cms/tslib/class.tslib_gifbuilder.php (working copy) | ||
---|---|---|
*/
|
||
function fileName($pre) {
|
||
$meaningfulPrefix = '';
|
||
if ($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']) {
|
||
$meaningfulPrefix = implode('_', array_merge($this->combinedTextStrings, $this->combinedFileNames));
|
||
// strip everything non-ascii
|
||
$meaningfulPrefix = preg_replace('/[^A-Za-z0-9_-]/', '', trim($meaningfulPrefix));
|
||
$meaningfulPrefix = substr($meaningfulPrefix, 0, intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix'])) . '_';
|
||
}
|
||
// WARNING: In PHP5 I discovered that rendering with freetype of Japanese letters was totally corrupt. Not only the wrong glyphs are printed but also some memory stack overflow resulted in strange additional chars - and finally the reason for this investigation: The Bounding box data was changing all the time resulting in new images being generated all the time. With PHP4 it works fine.
|
||
return $this->tempPath.
|
||
$pre.
|
||
($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix'] ? $GLOBALS['TSFE']->fileNameASCIIPrefix(implode('_',array_merge($this->combinedTextStrings,$this->combinedFileNames)),intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']),'_') : '').
|
||
$meaningfulPrefix .
|
||
t3lib_div::shortMD5(serialize($this->setup)).
|
||
'.'.$this->extension();
|
||
}
|
- « Previous
- 1
- 2
- 3
- Next »