From 2b03a295a659d209d55eecabf21567fc1b09fe97 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sat, 15 Jun 2019 22:53:46 +1000 Subject: [PATCH] Don't blank the opening post when adding a poll. --- common/topic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/topic.go b/common/topic.go index 3ee4a7c1..7bb68603 100644 --- a/common/topic.go +++ b/common/topic.go @@ -227,7 +227,7 @@ func init() { deleteActivity: acc.Delete("activity_stream").Where("elementID = ? AND elementType = 'topic'").Prepare(), deleteActivitySubs: acc.Delete("activity_subscriptions").Where("targetID = ? AND targetType = 'topic'").Prepare(), edit: acc.Update("topics").Set("title = ?, content = ?, parsed_content = ?").Where("tid = ?").Prepare(), // TODO: Only run the content update bits on non-polls, does this matter? - setPoll: acc.Update("topics").Set("content = '', parsed_content = '', poll = ?").Where("tid = ? AND poll = 0").Prepare(), + setPoll: acc.Update("topics").Set("poll = ?").Where("tid = ? AND poll = 0").Prepare(), createAction: acc.Insert("replies").Columns("tid, actionType, ipaddress, createdBy, createdAt, lastUpdated, content, parsed_content").Fields("?,?,?,?,UTC_TIMESTAMP(),UTC_TIMESTAMP(),'',''").Prepare(), getTopicUser: acc.SimpleLeftJoin("topics", "users", "topics.title, topics.content, topics.createdBy, topics.createdAt, topics.lastReplyAt, topics.lastReplyBy, topics.lastReplyID, topics.is_closed, topics.sticky, topics.parentID, topics.ipaddress, topics.views, topics.postCount, topics.likeCount, topics.attachCount,topics.poll, users.name, users.avatar, users.group, users.url_prefix, users.url_name, users.level", "topics.createdBy = users.uid", "tid = ?", "", ""),