From de03f5ae6329518e3a1fb79389ade66b008839f7 Mon Sep 17 00:00:00 2001 From: Azareal Date: Fri, 26 Jan 2018 07:04:01 +0000 Subject: [PATCH] Fix the panic. --- routes.go | 7 ++++--- themes/cosora/public/main.css | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/routes.go b/routes.go index 09e33a7f..b52666f7 100644 --- a/routes.go +++ b/routes.go @@ -486,18 +486,19 @@ func routeTopicID(w http.ResponseWriter, r *http.Request, user common.User, urlB topic.Avatar = strings.Replace(common.Config.Noavatar, "{id}", strconv.Itoa(topic.CreatedBy), 1) } - var poll *common.Poll + var poll common.Poll if topic.Poll != 0 { - poll, err = common.Polls.Get(topic.Poll) + pPoll, err := common.Polls.Get(topic.Poll) if err != nil { log.Print("Couldn't find the attached poll for topic " + strconv.Itoa(topic.ID)) return common.InternalError(err, w, r) } + poll = pPoll.Copy() } // Calculate the offset offset, page, lastPage := common.PageOffset(topic.PostCount, page, common.Config.ItemsPerPage) - tpage := common.TopicPage{topic.Title, user, headerVars, replyList, topic, poll.Copy(), page, lastPage} + tpage := common.TopicPage{topic.Title, user, headerVars, replyList, topic, poll, page, lastPage} // Get the replies.. rows, err := stmts.getTopicRepliesOffset.Query(topic.ID, offset, common.Config.ItemsPerPage) diff --git a/themes/cosora/public/main.css b/themes/cosora/public/main.css index 00901c42..426adfab 100644 --- a/themes/cosora/public/main.css +++ b/themes/cosora/public/main.css @@ -535,6 +535,10 @@ input[type=checkbox]:checked + label .sel { display: none; } +.poll_option_text { + font-size: 15px; +} + .formbutton { margin-top: 12px; margin-left: auto;