fix case in search

v1.18.x
barisusakli 10 years ago
parent 63489457fe
commit 5ce617ca5a

@ -1147,6 +1147,8 @@ var async = require('async'),
return Groups.getMembers(data.groupName, 0, -1, callback); return Groups.getMembers(data.groupName, 0, -1, callback);
} }
query = query.toLowerCase();
async.waterfall([ async.waterfall([
function(next) { function(next) {
Groups.getMembers(data.groupName, 0, -1, next); Groups.getMembers(data.groupName, 0, -1, next);

@ -77,6 +77,7 @@ module.exports = function(User) {
if (!query) { if (!query) {
return callback(null, []); return callback(null, []);
} }
query = query.toLowerCase();
var min = query; var min = query;
var max = query.substr(0, query.length - 1) + String.fromCharCode(query.charCodeAt(query.length - 1) + 1); var max = query.substr(0, query.length - 1) + String.fromCharCode(query.charCodeAt(query.length - 1) + 1);

Loading…
Cancel
Save