Project

General

Profile

Bug #24722 ยป 17211.patch

Administrator Admin, 2011-01-22 16:13

View differences:

t3lib/class.t3lib_befunc.php (working copy)
$onClick = 'top.launchView(\'' . $theFile . '\',\'\',\'' . $backPath . '\');return false;';
$thumbData .= '<a href="#" onclick="' . htmlspecialchars($onClick) . '"><img src="' . htmlspecialchars($backPath . $url) . '" hspace="2" border="0" title="' . trim($theFile) . '"' . $tparams . ' alt="" /></a> ';
} else {
$icon = self::getFileIcon($ext);
$url = 'gfx/fileicons/' . $icon;
$thumbData .= '<img src="' . $backPath . $url . '" hspace="2" border="0" title="' . trim($theFile) . '"' . $tparams . ' alt="" /> ';
// Icon
$theFile_abs = PATH_site . ($uploaddir ? $uploaddir . '/' : '') . trim($theFile);
$theFile = ($abs ? '' : '../') . ($uploaddir ? $uploaddir . '/' : '') . trim($theFile);
$fileIcon = t3lib_iconWorks::getSpriteIconForFile(
strtolower($ext),
array('title' => htmlspecialchars(trim($theFile)))
);
$check = basename($theFile_abs) . ':' . filemtime($theFile_abs) . ':' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
$params = '&file=' . rawurlencode($theFile);
$params .= $size ? '&size=' . $size : '';
$params .= '&md5sum=' . t3lib_div::shortMD5($check);
$url = $thumbScript . '?&dummy=' . $GLOBALS['EXEC_TIME'] . $params;
$onClick = 'top.launchView(\'' . $theFile . '\',\'\',\'' . $backPath . '\');return false;';
$thumbData .= '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . $fileIcon . '</a> ';
}
}
}
t3lib/class.t3lib_tceforms.php (working copy)
$rowCopy = array();
$rowCopy[$field] = $imgPath;
// Icon + clickmenu:
$absFilePath = t3lib_div::getFileAbsFileName($config['uploadfolder'] ? $config['uploadfolder'] . '/' . $imgPath : $imgPath);
$fI = pathinfo($imgPath);
$fileIcon = t3lib_iconWorks::getSpriteIconForFile(
strtolower($fI['extension']),
array(
'title' => htmlspecialchars(
$fI['basename'] .
($absFilePath && @is_file($absFilePath)
? ' (' . t3lib_div::formatSize(filesize($absFilePath)) . 'bytes)' :
' - FILE NOT FOUND!'
)
)
)
);
$imgs[] = '<span class="nobr">' . t3lib_BEfunc::thumbCode($rowCopy, $table, $field, $this->backPath, 'thumbs.php', $config['uploadfolder'], 0, ' align="middle"') .
($absFilePath ? $this->getClickMenu($fileIcon, $absFilePath) : $fileIcon) .
$imgPath .
'</span>';
}
    (1-1/1)