mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
closes #1603
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
"not-logged-in": "You don't seem to be logged in.",
|
||||
"account-locked": "Your account has been locked temporarily",
|
||||
"search-requires-login": "Searching requires an account! Please login or register!",
|
||||
|
||||
"invalid-cid": "Invalid Category ID",
|
||||
"invalid-tid": "Invalid Topic ID",
|
||||
|
||||
@@ -468,6 +468,14 @@ var socket,
|
||||
}
|
||||
|
||||
searchButton.off().on('click', function(e) {
|
||||
if (!config.isLoggedIn && !config.allowGuestSearching) {
|
||||
app.alert({
|
||||
message:'[[error:search-requires-login]]',
|
||||
timeout: 3000
|
||||
});
|
||||
ajaxify.go('login');
|
||||
return false;
|
||||
}
|
||||
e.stopPropagation();
|
||||
|
||||
searchFields.removeClass('hide').show();
|
||||
|
||||
@@ -8,7 +8,8 @@ define('alerts', function() {
|
||||
module.alert = function (params) {
|
||||
params.alert_id = 'alert_button_' + (params.alert_id ? params.alert_id : new Date().getTime());
|
||||
params.title = params.title || '';
|
||||
params.location = (params.location || 'right-top');
|
||||
params.location = params.location || 'right-top';
|
||||
params.type = params.type || 'info';
|
||||
|
||||
var alert = $('#' + params.alert_id);
|
||||
if (alert.length) {
|
||||
|
||||
@@ -238,7 +238,7 @@ middleware.renderHeader = function(req, res, callback) {
|
||||
csrf: res.locals.csrf_token,
|
||||
navigation: custom_header.navigation,
|
||||
allowRegistration: meta.config.allowRegistration === undefined || parseInt(meta.config.allowRegistration, 10) === 1,
|
||||
searchEnabled: plugins.hasListeners('filter:search.query') && (uid || parseInt(meta.config.allowGuestSearching, 10) === 1)
|
||||
searchEnabled: plugins.hasListeners('filter:search.query')
|
||||
},
|
||||
escapeList = {
|
||||
'&': '&',
|
||||
|
||||
Reference in New Issue
Block a user