From dc110e2e3ff4fe8cc095f9d5b09bfaccb2c628db Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 11 Jul 2017 13:44:51 -0400 Subject: [PATCH] closes #5818 --- src/meta/tags.js | 6 +++--- src/middleware/header.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/meta/tags.js b/src/meta/tags.js index 34ed3c43a9..0938980f22 100644 --- a/src/meta/tags.js +++ b/src/meta/tags.js @@ -10,7 +10,7 @@ var Meta = require('../meta'); var Tags = module.exports; -Tags.parse = function (req, meta, link, callback) { +Tags.parse = function (req, data, meta, link, callback) { async.parallel({ tags: function (next) { var defaultTags = [{ @@ -50,7 +50,7 @@ Tags.parse = function (req, meta, link, callback) { }); } - plugins.fireHook('filter:meta.getMetaTags', defaultTags, next); + plugins.fireHook('filter:meta.getMetaTags', { req: req, data: data, defaultTags: defaultTags }, next); }, links: function (next) { var defaultLinks = [{ @@ -101,7 +101,7 @@ Tags.parse = function (req, meta, link, callback) { href: nconf.get('relative_path') + '/assets/uploads/system/touchicon-192.png', }); } - plugins.fireHook('filter:meta.getLinkTags', defaultLinks, next); + plugins.fireHook('filter:meta.getLinkTags', { req: req, data: data, defaultLinks: defaultLinks }, next); }, }, function (err, results) { if (err) { diff --git a/src/middleware/header.js b/src/middleware/header.js index fe95b11a27..a30034df69 100644 --- a/src/middleware/header.js +++ b/src/middleware/header.js @@ -105,7 +105,7 @@ module.exports = function (middleware) { }); }, navigation: async.apply(navigation.get), - tags: async.apply(meta.tags.parse, req, res.locals.metaTags, res.locals.linkTags), + tags: async.apply(meta.tags.parse, req, data, res.locals.metaTags, res.locals.linkTags), banned: async.apply(user.isBanned, req.uid), banReason: async.apply(user.getBannedReason, req.uid), }, next);