This commit is contained in:
Baris Soner Usakli
2013-12-23 13:59:12 -05:00
parent fe1a75d1fd
commit f72cf35348
2 changed files with 7 additions and 2 deletions

View File

@@ -87,7 +87,12 @@ var winston = require('winston'),
posts.getPostField(pid, 'tid', function(err, tid) {
PostTools.isMain(pid, tid, function(err, isMainPost) {
if (isMainPost) {
title = title.trim();
var slug = tid + '/' + utils.slugify(title);
topics.setTopicField(tid, 'title', title);
topics.setTopicField(tid, 'slug', slug);
db.searchRemove('topic', tid, function() {
db.searchIndex('topic', title, tid);
});