Fixed bug #5260: Function linkWrapFile() in file class.file_list.inc uses wrong PATH...
authorBenni Mack <benni.mack@typo3.org>
Fri, 25 Dec 2009 13:23:09 +0000 (13:23 +0000)
committerBenni Mack <benni.mack@typo3.org>
Fri, 25 Dec 2009 13:23:09 +0000 (13:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6694 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.file_list.inc

index d9e066b..67c58ad 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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)
index d85a452..93bf4ed 100644 (file)
@@ -409,8 +409,8 @@ class fileList extends t3lib_recordList {
         */
        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>';
                }