better package sorting
authorMichael Wallner <mike@php.net>
Fri, 20 Mar 2015 09:50:36 +0000 (10:50 +0100)
committerMichael Wallner <mike@php.net>
Fri, 20 Mar 2015 09:50:36 +0000 (10:50 +0100)
public/index.php

index 181dfcb02be0319053bba0b1296092d3768d6ad7..4832a229a794095e28c7d07b5c55797225b438b4 100644 (file)
                        </header>
                </div>
                <div class="container">
-                       <?php $packages = array_map("basename", glob("phars/*")); ?>
+                       <?php 
+                       
+                       $packages = array_map("basename", glob("phars/*", GLOB_NOSORT|GLOB_ONLYDIR)); 
+                       sort($packages, SORT_NATURAL|SORT_FLAG_CASE);
+
+                       ?>
                        
                        <?php if ($_SERVER["QUERY_STRING"] && in_array($_SERVER["QUERY_STRING"], $packages, true)) : ?>