added postcount to topic

This commit is contained in:
barisusakli
2014-11-24 21:45:13 -05:00
parent 0202666ed0
commit a69eafd9f7
2 changed files with 4 additions and 2 deletions

View File

@@ -171,7 +171,9 @@ var async = require('async'),
category.name = validator.escape(category.name);
category.disabled = parseInt(category.disabled, 10) === 1;
category.icon = category.icon || 'hidden';
category.post_count = category.post_count || 0;
if (category.hasOwnProperty('post_count')) {
category.post_count = category.post_count || 0;
}
if (category.description) {
category.description = validator.escape(category.description);