Node.js based forum software built for the modern web
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
Julian Lam740cf13e8d76
diff --git a/package.json b/package.jsonindex 6dd89d58ee..6ce01eec26 100644--- a/package.json+++ b/package.json@@ -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",diff --git a/src/topics.js b/src/topics.jsindex 787eade2e4..7a9d5f5923 100644--- a/src/topics.js+++ b/src/topics.js@@ -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 checkRDB.sadd(schema.topics(tid).read_by_uid, uid);diff --git a/src/websockets.js b/src/websockets.jsindex 5c222d8787..2e4baad28e 100644--- a/src/websockets.js+++ b/src/websockets.js@@ -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);});}