Skip to content

Node.js based forum software built for the modern web

removed the fields

Baris Usaklif2bf65252d41
diff --git a/public/src/templates.js b/public/src/templates.js
index d933a7db74..7815568d5a 100644
--- a/public/src/templates.js
+++ b/public/src/templates.js
@@ -312,20 +312,20 @@
function checkConditional(key, value) {
var conditional = makeConditionalRegex(key),
conditionalBlock = conditional.exec(template);
-
+
if (conditionalBlock !== null) {
conditionalBlock = conditionalBlock[0].split(/<!-- ELSE -->/);
-
+
if (conditionalBlock[1]) {
// there is an else statement
if (!value) {
- template = template.replace(conditional, conditionalBlock[1]);
+ template = template.replace(conditional, conditionalBlock[1]);
} else {
- template = template.replace(conditional, conditionalBlock[0]);
+ template = template.replace(conditional, conditionalBlock[0]);
}
-
+
} else {
- // regular if
+ // regular if
if (!value) {
template = template.replace(conditional, '');
}
@@ -335,13 +335,13 @@
checkConditional(namespace + d, data[d]);
checkConditional('!' + namespace + d, !data[d]);
-
+
if (blockInfo) {
checkConditional('@first', blockInfo.iterator === 0);
checkConditional('@last', blockInfo.iterator === blockInfo.total);
}
-
-
+
+
template = replace(namespace + d, data[d], template);
}
}
diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl
index d4e0c41bb8..ae9b3110b3 100644
--- a/public/templates/topic.tpl
+++ b/public/templates/topic.tpl
@@ -66,7 +66,7 @@
<div class="btn-group">
<button class="btn btn-sm btn-default follow main-post" type="button" title="Be notified of new replies in this topic"><i class="fa fa-eye"></i></button>
- <button class="favourite btn btn-sm btn-default <!-- IF posts.favourited --> btn-warning <!-- ENDIF posts.favourited -->" type="button">
+ <button class="favourite btn btn-sm btn-default " type="button">
<span class="favourite-text">[[topic:favourite]]</span>
<span class="post_rep_{posts.pid}">{posts.reputation} </span>
diff --git a/src/posts.js b/src/posts.js
index b3be7dfe66..f9c9bf2f48 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -55,14 +55,6 @@ var RDB = require('./redis'),
'editor': '',
'edited': 0,
'deleted': 0
- //TODO : write upgrade script to remove these fields from the database -barisu
- //'fav_button_class': '',
- //'fav_star_class': 'fa-star-o',
- //'show_banned': 'hide',
- //'relativeTime': new Date(timestamp).toISOString(),
- //'post_rep': '0',
- //'edited-class': 'none',
- //'relativeEditTime': ''
};
RDB.hmset('post:' + pid, postData);