no need to use mget, app.alert already translates

v1.18.x
psychobunny 11 years ago
parent 1b1bdd7912
commit 37affe2489

@ -168,16 +168,13 @@ var async = require('async'),
var websockets = require('./socket.io'); var websockets = require('./socket.io');
if (uid === 0) { if (uid === 0) {
translator.mget(['topic:favourites.not_logged_in.message', 'topic:favourites.not_logged_in.title'], function(err, results) { return socket.emit('event:alert', {
socket.emit('event:alert', {
alert_id: 'post_favourite', alert_id: 'post_favourite',
title: results[1], title: '[[topic:favourites.not_logged_in.title]]',
message: results[0], message: '[[topic:favourites.not_logged_in.message]]',
type: 'danger', type: 'danger',
timeout: 5000 timeout: 5000
}); });
});
return;
} }
posts.getPostFields(pid, ['uid', 'timestamp'], function (err, postData) { posts.getPostFields(pid, ['uid', 'timestamp'], function (err, postData) {

Loading…
Cancel
Save