Bug #23382 ยป 15446_v2.diff

Administrator Admin, 2010-12-27 22:15

View differences:

typo3/sysext/cms/tslib/class.tslib_gifbuilder.php (working copy)
716 716

  
717 717
		if ($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']) {
718 718
			$meaningfulPrefix = implode('_', array_merge($this->combinedTextStrings, $this->combinedFileNames));
719
				// strip everything non-ascii
720
			$meaningfulPrefix = preg_replace('/[^A-Za-z0-9_-]/', '', trim($meaningfulPrefix));
719
			        // Convert raw string to a nice ASCII-only string without spaces                                                                                                                                                                                                                                                                                                                               
720
			$meaningfulPrefix = $GLOBALS['TSFE']->csConvObj->specCharsToASCII($GLOBALS['TSFE']->renderCharset, $meaningfulPrefix);                                                                                                                                                                                                                                                                            
721
			$meaningfulPrefix = str_replace(' ', '_', $meaningfulPrefix);                                                                                                                                                                                                                                                                                                                                     
721 722
			$meaningfulPrefix = substr($meaningfulPrefix, 0, intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix'])) . '_';
722 723
		}
723 724

  
724 725
			// 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.
725
		return $this->tempPath.
726
				$pre.
726
		return $this->tempPath .
727
				$pre .
727 728
				$meaningfulPrefix .
728
				t3lib_div::shortMD5(serialize($this->setup)).
729
				'.'.$this->extension();
729
				t3lib_div::shortMD5(serialize($this->setup)) .
730
				'.' . $this->extension();
730 731
	}
731 732

  
732 733
	/**
    (1-1/1)