浏览代码

Add sorting for delete in Search\Index

Visman 1 年之前
父节点
当前提交
e18280fbb0
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      app/Models/Search/Index.php

+ 4 - 0
app/Models/Search/Index.php

@@ -106,6 +106,10 @@ class Index extends Method
                 continue;
             }
 
+            if (\count($list) > 1) {
+                \sort($list, \SORT_NUMERIC);
+            }
+
             $vars = [
                 ':pid'  => $post->id,
                 ':subj' => 's' === $key ? 1 : 0,