mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 12:01:17 +01:00
updated less-middleware to 1.1.12 (fixing odd regression with LESS package update). Fixed issue where editing of posts was wonky because the title was being grabbed incorrectly
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
"passport-twitter": "0.1.4",
|
||||
"passport-google-oauth": "0.1.5",
|
||||
"passport-facebook": "0.1.5",
|
||||
"less-middleware": "0.1.11",
|
||||
"less-middleware": "0.1.12",
|
||||
"marked": "0.2.8",
|
||||
"bcrypt": "0.7.5",
|
||||
"node-gyp": "0.9.5",
|
||||
|
||||
@@ -206,10 +206,21 @@ marked.setOptions({
|
||||
|
||||
Topics.getTitle = function(tid, callback) {
|
||||
RDB.get('tid:' + tid + ':title', function(err, title) {
|
||||
console.log(tid, title);
|
||||
callback(title);
|
||||
});
|
||||
}
|
||||
|
||||
Topics.getTitleByPid = function(pid, callback) {
|
||||
RDB.get('pid:' + pid + ':tid', function(err, tid) {
|
||||
if (!err) {
|
||||
Topics.getTitle(tid, function(title) {
|
||||
callback(title);
|
||||
});
|
||||
} else callback('Could not grab title');
|
||||
});
|
||||
}
|
||||
|
||||
Topics.markAsRead = function(tid, uid) {
|
||||
// there is an issue with this fn. if you read a topic that is previously read you will mark the category as read anyways - there is no check
|
||||
RDB.sadd(schema.topics(tid).read_by_uid, uid);
|
||||
|
||||
@@ -336,7 +336,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
|
||||
});
|
||||
},
|
||||
function(next) {
|
||||
topics.getTitle(data.pid, function(title) {
|
||||
topics.getTitleByPid(data.pid, function(title) {
|
||||
next(null, title);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user