From d498b7d64cb274016c72f86c05d5eb943a6e24de Mon Sep 17 00:00:00 2001 From: NHellFire Date: Sun, 11 Jan 2015 23:54:00 +0000 Subject: [PATCH] access.fs: Sort filenames case insensitive --- core/src/plugins/access.fs/class.fsAccessDriver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/plugins/access.fs/class.fsAccessDriver.php b/core/src/plugins/access.fs/class.fsAccessDriver.php index 3574cd3916..d19fef3b2e 100644 --- a/core/src/plugins/access.fs/class.fsAccessDriver.php +++ b/core/src/plugins/access.fs/class.fsAccessDriver.php @@ -1011,10 +1011,10 @@ public function switchAction($action, $httpVars, $fileVars) closedir($handle); $fullList = array("d" => array(), "z" => array(), "f" => array()); + $nodes = scandir($path); + usort($nodes, "strcasecmp"); if (isSet($orderField) && isSet($orderDirection) && $orderField == "ajxp_label" && $orderDirection == "desc") { - $nodes = scandir($path, 1); - } else { - $nodes = scandir($path); + $nodes = array_reverse($nodes); } if (!empty($this->driverConf["SCANDIR_RESULT_SORTFONC"])) { usort($nodes, $this->driverConf["SCANDIR_RESULT_SORTFONC"]);