more fixes

v1.18.x
Baris Soner Usakli 12 years ago
parent 954392e4c4
commit fee76db8dc

@ -49,7 +49,7 @@ var templates = {};
function init() {
loadTemplates([
'header', 'footer', 'register', 'home', 'topic',
'header', 'footer', 'register', 'home', 'topic','account',
'login', 'reset', 'reset_code', 'account',
'confirm',
'emails/reset', 'emails/reset_plaintext', 'emails/email_confirm', 'emails/email_confirm_plaintext'

@ -56,7 +56,7 @@
logoutEl.innerHTML = '<a href="/logout">Log out</a>';
name.innerHTML = data['username'];
gravatar.src = data['picture'];
gravatar.src = data['picture']+"?s=24";
user_label.innerHTML = '';
user_label.appendChild(gravatar);

@ -38,7 +38,10 @@ var config = require('../config.js'),
RDB.db.hgetall(String(uid), function(err, data){
if(err === null)
{
delete data['password'];
callback(data);
}
else
console.log(err);
});
@ -386,7 +389,7 @@ var config = require('../config.js'),
}
User.get_uid_by_email = function(email, callback) {
RDB.get('email:' + email+':uid', callback)
RDB.get('email:' + email + ':uid', callback)
};
User.get_uid_by_session = function(session, callback) {

@ -286,9 +286,6 @@ passport.deserializeUser(function(uid, done) {
console.log("I GOT "+JSON.stringify(data));
});
});
app.get('/account', function(req, res) {
@ -310,7 +307,16 @@ passport.deserializeUser(function(uid, done) {
res.send(templates['header'] + account + templates['footer']);
});
});
app.get('/uid/:uid', function(req, res) {
if(!req.params.uid)
return res.redirect('/403');
user.getUserData(req.params.uid, function(data){
res.send(data);
});
});

@ -53,11 +53,11 @@ var SocketIO = require('socket.io').listen(global.server,{log:false}),
modules.templates.init();
}
process.on('uncaughtException', function(err) {
/*process.on('uncaughtException', function(err) {
// handle the error safely
console.log("error message "+err);
socket.emit('event:consolelog',{type:'uncaughtException', stack:err.stack, error:err.toString()});
});
});*/
socket.emit('event:connect', {status: 1});
@ -71,6 +71,8 @@ var SocketIO = require('socket.io').listen(global.server,{log:false}),
socket.on('event:enter_room', function(data) {
return;
if (data.leave !== null) socket.leave (data.leave);
socket.join(data.enter);

Loading…
Cancel
Save