mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
sort content correctly
This commit is contained in:
parent
f9d712e69f
commit
f1b57038bd
1 changed files with 3 additions and 1 deletions
|
@ -368,7 +368,9 @@ class Post
|
||||||
if (!isset(static::$slugMap[$postType]))
|
if (!isset(static::$slugMap[$postType]))
|
||||||
{
|
{
|
||||||
static::$slugMap[$postType] = [];
|
static::$slugMap[$postType] = [];
|
||||||
foreach(glob(ContentActions::CONTENT_DIR . '/' . $postType . '/*.md') as $file)
|
$files = glob(ContentActions::CONTENT_DIR . '/' . $postType . '/*.md');
|
||||||
|
usort($files, 'strnatcasecmp');
|
||||||
|
foreach($files as $file)
|
||||||
{
|
{
|
||||||
static::$slugMap[$postType][static::getSlugFromFilename($file)] = $file;
|
static::$slugMap[$postType][static::getSlugFromFilename($file)] = $file;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue