|
|
@ -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
|
|
|
|