if not term just use empty string

v1.18.x
Baris Soner Usakli 11 years ago
parent 8bfea656c4
commit 57d2db36e6

@ -740,11 +740,14 @@ var path = require('path'),
}); });
}); });
app.get('/search/:term', function (req, res) { app.get('/search/:term?', function (req, res) {
if (!req.user && meta.config.allowGuestSearching !== '1') { if (!req.user && meta.config.allowGuestSearching !== '1') {
return res.redirect('/403'); return res.redirect('/403');
} }
if(!req.params.term) {
req.params.term = '';
}
app.build_header({ app.build_header({
req: req, req: req,
res: res res: res

Loading…
Cancel
Save