Skip to content

Node.js based forum software built for the modern web

add filter:search.filterAndSort

Baris Usaklideecf0445406
diff --git a/src/search.js b/src/search.js
index 3ed7f4ef35..6fe103015c 100644
--- a/src/search.js
+++ b/src/search.js
@@ -122,7 +122,10 @@ function filterAndSort(pids, data, callback) {
sortPosts(posts, data);
- pids = posts.map(function (post) {
+ plugins.fireHook('filter:search.filterAndSort', { pids: pids, posts: posts, data: data }, next);
+ },
+ function (result, next) {
+ pids = result.posts.map(function (post) {
return post && post.pid;
});