Skip to content

Node.js based forum software built for the modern web

check cid

barisusakli89e56794e8f8
diff --git a/src/categories.js b/src/categories.js
index 75ec29705b..bf9e59aefe 100644
--- a/src/categories.js
+++ b/src/categories.js
@@ -307,7 +307,7 @@ var db = require('./database'),
category.name = validator.escape(category.name);
category.description = validator.escape(category.description);
category.backgroundImage = category.image ? nconf.get('relative_path') + category.image : '';
- category.disabled = category.disabled ? parseInt(category.disabled, 10) !== 0 : false;
+ category.disabled = parseInt(category.disabled, 10) === 1;
next(null, category);
}, callback);
@@ -423,7 +423,7 @@ var db = require('./database'),
return callback(err);
}
- if (!topicData) {
+ if (!topicData || !topicData.cid) {
return callback();
}