Prepend sticky pages to getList

As there is no way to comfortably sort pages by sticky first, we can, as an interim solution unshift sticky pages instead of pushing them.
This commit is contained in:
Paul (hxii) Glushak 2020-04-28 16:34:51 +03:00 committed by GitHub
parent 442a8ca1db
commit 74e83a60a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -541,7 +541,7 @@ class Pages extends dbJSON {
} elseif ($static && $fields['type']=='static') {
array_push($list, $key);
} elseif ($sticky && $fields['type']=='sticky') {
array_push($list, $key);
array_unshift($list, $key);
} elseif ($draft && $fields['type']=='draft') {
array_push($list, $key);
} elseif ($scheduled && $fields['type']=='scheduled') {