Project

General

Profile

Feature #23636 » class.t3lib_stdgraphic.php.diff

Rémy DANIEL, 2013-04-30 14:56

View differences:

t.php
$command = $this->scalecmd . ' ' . $info[0] . 'x' . $info[1] . '! ' . $params . ' ';
$cropscale = ($data['crs'] ? 'crs-V' . $data['cropV'] . 'H' . $data['cropH'] : '');
$frameForMd5 = $frame === '' ? 0 : $frame;
if ($this->alternativeOutputKey) {
$theOutputName = t3lib_div::shortMD5($command . $cropscale . basename($imagefile) . $this->alternativeOutputKey . '[' . $frame . ']');
$theOutputName = t3lib_div::shortMD5($command . $cropscale . basename($imagefile) . $this->alternativeOutputKey . '[' . $frameForMd5 . ']');
} else {
$theOutputName = t3lib_div::shortMD5($command . $cropscale . $imagefile . filemtime($imagefile) . '[' . $frame . ']');
}
$theOutputName = t3lib_div::shortMD5($command . $cropscale . $imagefile . filemtime($imagefile) . '[' . $frameForMd5 . ']');
}
if ($this->imageMagickConvert_forceFileNameBody) {
$theOutputName = $this->imageMagickConvert_forceFileNameBody;
$this->imageMagickConvert_forceFileNameBody = '';
......
// Making the temporary filename:
$this->createTempSubDir('pics/');
$output = $this->absPrefix . $this->tempPath . 'pics/' . $this->filenamePrefix . $theOutputName . '.' . $newExt;
//distribute in sub-folders
$key = sha1($theOutputName);
$tempFullPath = array();
$tempFullPath[] = $key[0];
$tempFullPath[] = $key[1];
//creating sub-directories in typo3temp/pics
$tempSubDir = 'pics/';
for ($i = 0; $i < count($tempFullPath); $i++) {
$this->createTempSubDir($tempSubDir . $tempFullPath[$i] . '/');
$tempSubDir = $tempSubDir . $tempFullPath[$i] . '/';
}
//final path to to temporary file
$output = $this->absPrefix . $this->tempPath . $tempSubDir . $this->filenamePrefix . $theOutputName . '.' . $newExt;
// Register temporary filename:
$GLOBALS['TEMP_IMAGES_ON_PAGE'][] = $output;
    (1-1/1)