Fixed bug #2661: stdWrap filelist doesn't work directly in fileadmin/
authorBenni Mack <benni.mack@typo3.org>
Fri, 1 Aug 2008 00:10:52 +0000 (00:10 +0000)
committerBenni Mack <benni.mack@typo3.org>
Fri, 1 Aug 2008 00:10:52 +0000 (00:10 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3925 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index 09ecd33..f525e7f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2008-07-31  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #2661: stdWrap filelist doesn't work directly in fileadmin/
 
 2008-07-30  Martin Kutschker  <masi@typo3.org>
 
index 024d892..68ae91f 100755 (executable)
@@ -3476,7 +3476,8 @@ class tslib_cObj {
                                // read directory:
                        if ($GLOBALS['TSFE']->lockFilePath)     {               // MUST exist!
                                $path = $this->clean_directory($data_arr[0]);   // Cleaning name..., only relative paths accepted.
-                               $path = substr($path,0,strlen($GLOBALS['TSFE']->lockFilePath))==$GLOBALS['TSFE']->lockFilePath ? $path : '';
+                               // see if path starts with lockFilePath, the additional '/' is needed because clean_directory gets rid of it
+                               $path = (t3lib_div::isFirstPartOfStr($path . '/', $GLOBALS['TSFE']->lockFilePath) ? $path : '');
                        }
                        if ($path)      {
                                $items = Array('files'=>array(), 'sorting'=>array());