mirror of
https://github.com/YGGverse/next.git
synced 2025-02-05 03:34:15 +00:00
update listing sort order mode
This commit is contained in:
parent
0b737f6cdd
commit
b06f5c5e97
17
src/nex.php
17
src/nex.php
@ -245,7 +245,7 @@ $server->start(
|
|||||||
|
|
||||||
if (str_starts_with($parent, NEXT_PATH))
|
if (str_starts_with($parent, NEXT_PATH))
|
||||||
{
|
{
|
||||||
$directories[mb_strtolower($filename)] = '=> ../';
|
$directories[$filename] = '=> ../';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ $server->start(
|
|||||||
{
|
{
|
||||||
if (is_readable($realpath . $filename))
|
if (is_readable($realpath . $filename))
|
||||||
{
|
{
|
||||||
$directories[mb_strtolower($filename)] = sprintf(
|
$directories[$filename] = sprintf(
|
||||||
'=> %s/',
|
'=> %s/',
|
||||||
urlencode(
|
urlencode(
|
||||||
$filename
|
$filename
|
||||||
@ -271,7 +271,7 @@ $server->start(
|
|||||||
// File
|
// File
|
||||||
if (is_readable($realpath . $filename))
|
if (is_readable($realpath . $filename))
|
||||||
{
|
{
|
||||||
$files[mb_strtolower($filename)] = sprintf(
|
$files[$filename] = sprintf(
|
||||||
'=> %s',
|
'=> %s',
|
||||||
urlencode(
|
urlencode(
|
||||||
$filename
|
$filename
|
||||||
@ -281,8 +281,15 @@ $server->start(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sort by keys ASC
|
// Sort by keys ASC
|
||||||
ksort($directories);
|
ksort(
|
||||||
ksort($files);
|
$directories,
|
||||||
|
SORT_STRING | SORT_FLAG_CASE | SORT_NATURAL
|
||||||
|
);
|
||||||
|
|
||||||
|
ksort(
|
||||||
|
$files,
|
||||||
|
SORT_STRING | SORT_FLAG_CASE | SORT_NATURAL
|
||||||
|
);
|
||||||
|
|
||||||
// Merge items
|
// Merge items
|
||||||
$response = implode(
|
$response = implode(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user