From 74e83a60a91f885cc845bb8085120104a124d91d Mon Sep 17 00:00:00 2001 From: "Paul (hxii) Glushak" Date: Tue, 28 Apr 2020 16:34:51 +0300 Subject: [PATCH] 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. --- bl-kernel/pages.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php index 4fb1cfa6..9f13ab26 100644 --- a/bl-kernel/pages.class.php +++ b/bl-kernel/pages.class.php @@ -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') {