From 9005b10be1b7af4b878272b5abb4a467487b66ec Mon Sep 17 00:00:00 2001 From: Azareal Date: Wed, 26 Sep 2018 18:05:25 +1000 Subject: [PATCH] Fixed the live topic list after Most Viewed broke it --- common/files.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/common/files.go b/common/files.go index d351f056..27dd4348 100644 --- a/common/files.go +++ b/common/files.go @@ -2,18 +2,17 @@ package common import ( "bytes" + "compress/gzip" "errors" "fmt" - "mime" - "strconv" - "strings" - "sync" - //"errors" - "compress/gzip" "io/ioutil" + "mime" "net/http" "os" "path/filepath" + "strconv" + "strings" + "sync" "../tmpl_client" ) @@ -179,7 +178,9 @@ func (list SFileList) JSTmplInit() error { data = replace(data, "w.Write([]byte(", "out += ") data = replace(data, "w.Write(", "out += ") data = replace(data, "strconv.Itoa(", "") + data = replace(data, "strconv.FormatInt(", "") data = replace(data, "common.", "") + data = replace(data, ", 10;", "") data = replace(data, shortName+"_tmpl_phrase_id = RegisterTmplPhraseNames([]string{", "[") data = replace(data, "var phrases = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "let phrases = tmplPhrases[\""+tmplName+"\"];") //data = replace(data, "var phrases = GetTmplPhrasesBytes("+shortName+"_tmpl_phrase_id)", "let phrases = tmplPhrases[\""+tmplName+"\"];\nconsole.log('tmplName:','"+tmplName+"')\nconsole.log('phrases:', phrases);")