X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=blobdiff_plain;f=application%2FLinkDB.php;h=cdd68cfb1bec88e8dffd526e0c8c6a433933344a;hp=cd0f29671f9b199c213b4333e8eeab23eedcadb7;hb=4154c25b5f2f8044a37d7f84e04173bb54f2375b;hpb=10a7b5cee96a742fbe86edbea977f3c55c92e9aa diff --git a/application/LinkDB.php b/application/LinkDB.php index cd0f2967..cdd68cfb 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php @@ -537,6 +537,9 @@ You use the community supported version of the original Shaarli project, by Seba $order = $order === 'ASC' ? -1 : 1; // Reorder array by dates. usort($this->links, function($a, $b) use ($order) { + if (isset($a['sticky']) && isset($b['sticky']) && $a['sticky'] !== $b['sticky']) { + return $a['sticky'] ? -1 : 1; + } return $a['created'] < $b['created'] ? 1 * $order : -1 * $order; });