X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FLinkDB.php;h=cdd68cfb1bec88e8dffd526e0c8c6a433933344a;hb=0c42c5e3597215949a8c374802f8f25be485f267;hp=cd0f29671f9b199c213b4333e8eeab23eedcadb7;hpb=f8c5660df82432c7f3bb0686e393db5a2b46eeb5;p=github%2Fshaarli%2FShaarli.git 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; });