remove plugin.hook check

This commit is contained in:
Barış Soner Uşaklı
2017-07-12 19:44:35 -04:00
parent e6d0dde7b4
commit 0f5be5ae25
2 changed files with 4 additions and 15 deletions

View File

@@ -326,12 +326,8 @@ Topics.isLocked = function (tid, callback) {
};
Topics.search = function (tid, term, callback) {
if (plugins.hasListeners('filter:topic.search')) {
plugins.fireHook('filter:topic.search', {
tid: tid,
term: term,
}, callback);
} else {
callback(new Error('[[error:no-plugins-available]]'), []);
}
plugins.fireHook('filter:topic.search', {
tid: tid,
term: term,
}, callback);
};