Skip to content

Node.js based forum software built for the modern web

camelCased get_latest_undeleted_pid method

Julian Lamc940ce3329e6
diff --git a/src/postTools.js b/src/postTools.js
index 5917d8c83b..cbe2df1931 100644
--- a/src/postTools.js
+++ b/src/postTools.js
@@ -128,7 +128,7 @@ var RDB = require('./redis.js'),
});
// Delete the thread if it is the last undeleted post
- threadTools.get_latest_undeleted_pid(postData.tid, function(err, pid) {
+ threadTools.getLatestUndeletedPid(postData.tid, function(err, pid) {
if (err && err.message === 'no-undeleted-pids-found') {
threadTools.delete(postData.tid, -1, function(err) {
if (err) winston.error('Could not delete topic (tid: ' + postData.tid + ')', err.stack);
@@ -164,7 +164,7 @@ var RDB = require('./redis.js'),
pid: pid
});
- threadTools.get_latest_undeleted_pid(postData.tid, function(err, pid) {
+ threadTools.getLatestUndeletedPid(postData.tid, function(err, pid) {
posts.getPostField(pid, 'timestamp', function(timestamp) {
topics.updateTimestamp(postData.tid, timestamp);
});
diff --git a/src/threadTools.js b/src/threadTools.js
index 697b8d5a74..23b641f0d2 100644
--- a/src/threadTools.js
+++ b/src/threadTools.js
@@ -297,7 +297,7 @@ var RDB = require('./redis.js'),
});
}
- ThreadTools.get_latest_undeleted_pid = function(tid, callback) {
+ ThreadTools.getLatestUndeletedPid = function(tid, callback) {
RDB.lrange('tid:' + tid + ':posts', 0, -1, function(err, pids) {
if (pids.length === 0) return callback(new Error('no-undeleted-pids-found'));
diff --git a/src/topics.js b/src/topics.js
index baaa608948..f6d21ae186 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -572,7 +572,7 @@ schema = require('./schema.js'),
}
Topics.getTeaser = function(tid, callback) {
- threadTools.get_latest_undeleted_pid(tid, function(err, pid) {
+ threadTools.getLatestUndeletedPid(tid, function(err, pid) {
if (!err) {
posts.getPostFields(pid, ['content', 'uid', 'timestamp'], function(postData) {