[BUG] t3lib_div::getFilesInDir order differs from order in File list
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_div.php
index d3b071d..77ac69c 100644 (file)
@@ -2998,7 +2998,7 @@ final class t3lib_div {
                                                                $sortarray[$key] = filemtime($path . '/' . $entry);
                                                        }
                                                        elseif ($order) {
-                                                               $sortarray[$key] = $entry;
+                                                               $sortarray[$key] = strtolower($entry);
                                                        }
                                                }
                                        }
@@ -3775,7 +3775,7 @@ final class t3lib_div {
         * So it's compatible with the UNIX style path strings valid for TYPO3 internally.
         *
         * @param string $theFile File path to evaluate
-        * @return boolean TRUE, $theFile is allowed path string
+        * @return boolean TRUE, $theFile is allowed path string, FALSE otherwise
         * @see http://php.net/manual/en/security.filesystem.nullbytes.php
         * @todo Possible improvement: Should it rawurldecode the string first to check if any of these characters is encoded?
         */
@@ -3783,6 +3783,8 @@ final class t3lib_div {
                if (strpos($theFile, '//') === FALSE && strpos($theFile, '\\') === FALSE && !preg_match('#(?:^\.\.|/\.\./|[[:cntrl:]])#u', $theFile)) {
                        return TRUE;
                }
+
+               return FALSE;
        }
 
        /**