+2009-12-25 Benjamin Mack <benni@typo3.org>
+
+ * Fixed bug #5260: Function linkWrapFile() in file class.file_list.inc uses wrong PATH prefix
+
2009-12-23 Benjamin Mack <benni@typo3.org>
* Fixed bug #12987: List module: delete confirmation has extra ")" (Thanks to Steffen Gebert)
*/
function linkWrapFile($code,$path) {
- if (t3lib_div::isFirstPartOfStr($path,t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT'))) {
- $href = substr($path,strlen(t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT')));
+ if (t3lib_div::isFirstPartOfStr($path, PATH_site)) {
+ $href = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . substr($path, strlen(PATH_site));
$aOnClick = "return top.openUrlInWindow('".$href."','WebFile');";
$code = '<a href="#" title="'.htmlspecialchars($code).'" onclick="'.htmlspecialchars($aOnClick).'">'.t3lib_div::fixed_lgd_cs($code,$this->fixedL).'</a>';
}