mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
Merge branch 'master' of https://github.com/designcreateplay/NodeBB into pagination
This commit is contained in:
@@ -118,6 +118,7 @@ var ajaxify = {};
|
|||||||
app.processPage();
|
app.processPage();
|
||||||
|
|
||||||
jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying');
|
jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying');
|
||||||
|
ajaxify.initialLoad = false;
|
||||||
|
|
||||||
if (window.location.hash) {
|
if (window.location.hash) {
|
||||||
hash = window.location.hash;
|
hash = window.location.hash;
|
||||||
|
|||||||
@@ -394,11 +394,11 @@
|
|||||||
var regex = new RegExp("{" + namespace + "[\\s\\S]*?}", 'g');
|
var regex = new RegExp("{" + namespace + "[\\s\\S]*?}", 'g');
|
||||||
template = template.replace(regex, '');
|
template = template.replace(regex, '');
|
||||||
namespace = '';
|
namespace = '';
|
||||||
|
} else {
|
||||||
|
// clean up all undefined conditionals
|
||||||
|
template = template.replace(/<!-- IF([^@]*?)ENDIF([^@]*?)-->/gi, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up all undefined conditionals
|
|
||||||
template = template.replace(/<!-- IF([^@]*?)ENDIF([^@]*?)-->/gi, '');
|
|
||||||
|
|
||||||
return template;
|
return template;
|
||||||
|
|
||||||
})(data, "", template);
|
})(data, "", template);
|
||||||
|
|||||||
@@ -490,13 +490,13 @@ var bcrypt = require('bcrypt'),
|
|||||||
|
|
||||||
User.search = function(query, callback) {
|
User.search = function(query, callback) {
|
||||||
if (!query || query.length === 0) {
|
if (!query || query.length === 0) {
|
||||||
return callback(null, {timing:0, users:[]});
|
return callback(null, []);
|
||||||
}
|
}
|
||||||
var start = process.hrtime();
|
var start = process.hrtime();
|
||||||
|
|
||||||
db.getObject('username:uid', function(err, usernamesHash) {
|
db.getObject('username:uid', function(err, usernamesHash) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(null, {timing: 0, users:[]});
|
return callback(null, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
query = query.toLowerCase();
|
query = query.toLowerCase();
|
||||||
@@ -516,9 +516,7 @@ var bcrypt = require('bcrypt'),
|
|||||||
});
|
});
|
||||||
|
|
||||||
User.getDataForUsers(results, function(userdata) {
|
User.getDataForUsers(results, function(userdata) {
|
||||||
var diff = process.hrtime(start);
|
callback(null, userdata);
|
||||||
var timing = (diff[0] * 1e3 + diff[1] / 1e6).toFixed(1);
|
|
||||||
callback(null, {timing: timing, users: userdata});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user