mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
cleaning up readme file and fixing bugs in editing of posts ("asdf" anyone?)
This commit is contained in:
@@ -323,15 +323,36 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
|
||||
});
|
||||
});
|
||||
} else if (parseInt(data.pid) > 0) {
|
||||
posts.getRawContent(data.pid, function(raw) {
|
||||
async.parallel([
|
||||
function(next) {
|
||||
posts.getRawContent(data.pid, function(raw) {
|
||||
next(null, raw);
|
||||
});
|
||||
},
|
||||
function(next) {
|
||||
topics.getTitle(data.pid, function(title) {
|
||||
next(null, title);
|
||||
});
|
||||
}
|
||||
], function(err, results) {
|
||||
socket.emit('api:composer.push', {
|
||||
title: 'asdf',
|
||||
title: results[1],
|
||||
pid: data.pid,
|
||||
body: raw
|
||||
body: results[0]
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('api:composer.editCheck', function(pid) {
|
||||
posts.get_tid_by_pid(pid, function(tid) {
|
||||
postTools.isMain(pid, tid, function(isMain) {
|
||||
socket.emit('api:composer.editCheck', {
|
||||
titleEditable: isMain
|
||||
});
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
}(SocketIO));
|
||||
|
||||
Reference in New Issue
Block a user