From b74ef0295ad9b5ff8a204949b9a0570fb19beb35 Mon Sep 17 00:00:00 2001 From: PluieElectrique <41453973+PluieElectrique@users.noreply.github.com> Date: Sat, 1 May 2021 00:17:48 -0700 Subject: [PATCH] Fix backlink sort order `SORT_STRING` does not work if backlinks roll over, e.g. it will produce ">>100, >>90" instead of ">>90, >>100". `SORT_NATURAL` will handle this correctly, as well as backlinks with subnums. --- src/Model/Comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Comment.php b/src/Model/Comment.php index fffe4136..ef51c49c 100644 --- a/src/Model/Comment.php +++ b/src/Model/Comment.php @@ -548,7 +548,7 @@ public function getBacklinks() $num = $this->subnum ? $this->num.'_'.$this->subnum : $this->num; if (isset($this->comment_factory->backlinks_arr[$num])) { - ksort($this->comment_factory->backlinks_arr[$num], SORT_STRING); + ksort($this->comment_factory->backlinks_arr[$num], SORT_NATURAL); $array = []; foreach ($this->comment_factory->backlinks_arr[$num] as $current_p_num_u => $value) { $build_url = $value['build_url'];