files: Fix ordering
This commit is contained in:
@ -50,8 +50,10 @@ if (sizeof($info) > 1 && ($info[1] === 'elwig' || $info[1] === 'winziprint')) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$filesRaw = scandir('.');
|
||||
usort($filesRaw, 'version_compare');
|
||||
$files = [];
|
||||
foreach (scandir('.') as $file) {
|
||||
foreach ($filesRaw as $file) {
|
||||
if (str_starts_with($file, ".") || str_ends_with($file, ".php")) continue;
|
||||
$files[$file] = [filesize($file), filemtime($file), filectime($file)];
|
||||
}
|
||||
@ -149,7 +151,7 @@ if ($format === 'json') {
|
||||
<h3>Downloads</h3>
|
||||
<p class="center"><a href="/">Startseite</a></p>
|
||||
<table>
|
||||
<thead><tr><th>Name</th><th>Größe</th><th>Änderungsdatum</th></tr></thead>
|
||||
<thead><tr><th class="center">Name</th><th class="center">Größe</th><th class="center">Änderungsdatum</th></tr></thead>
|
||||
<tbody>
|
||||
<?php foreach (array_reverse($entities) as $name => [$prod, $vers, $url, $size, $mtime, $ctime, $mod, $cre]) {
|
||||
echo " <tr><td><a href=\"/files/$name\">$name</a></td><td>" . number_format($size / 1024 / 1024, 1) . " MB</td><td>" . date('d.m.Y, H:i', $mtime) . "</td></tr>\n";
|
||||
|
Reference in New Issue
Block a user