Skip to content

Node.js based forum software built for the modern web

fixed delete

Baris Usaklifacb6eb36bcb
diff --git a/src/postTools.js b/src/postTools.js
index 14cbc60757..609124a384 100644
--- a/src/postTools.js
+++ b/src/postTools.js
@@ -100,14 +100,14 @@ marked.setOptions({
PostTools.restore = function(uid, pid) {
var success = function() {
- RDB.del('pid:' + pid + ':deleted');
+ posts.setPostField(pid, 'deleted', 0);
- posts.getPostField(pid, 'tid', function(tid) {
- io.sockets.in('topic_' + tid).emit('event:post_restored', {
- pid: pid
- });
+ posts.getPostField(pid, 'tid', function(tid) {
+ io.sockets.in('topic_' + tid).emit('event:post_restored', {
+ pid: pid
});
- };
+ });
+ };
PostTools.privileges(pid, uid, function(privileges) {
if (privileges.editable) {