v1.18.x
Julian Lam 9 years ago
parent 041167decf
commit f3c1e75cca

@ -83,7 +83,7 @@ define('admin/manage/users', ['admin/modules/selectable'], function(selectable)
data[cur.name] = cur.value;
return data;
}, {});
var until = Date.now() + formData.length * 1000*60*60 * (parseInt(formData.unit, 10) ? 24 : 1);
var until = formData.length ? (Date.now() + formData.length * 1000*60*60 * (parseInt(formData.unit, 10) ? 24 : 1)) : 0;
socket.emit('user.banUsers', { uids: uids, until: until }, done('User(s) banned!', '.ban', true));
}
}

@ -121,7 +121,8 @@ define('forum/account/header', [
data[cur.name] = cur.value;
return data;
}, {});
var until = Date.now() + formData.length * 1000*60*60 * (parseInt(formData.unit, 10) ? 24 : 1);
var until = formData.length ? (Date.now() + formData.length * 1000*60*60 * (parseInt(formData.unit, 10) ? 24 : 1)) : 0;
socket.emit('user.banUsers', { uids: [ajaxify.data.theirid], until: until }, function(err) {
if (err) {
return app.alertError(err.message);

Loading…
Cancel
Save