fix error message spam
This commit is contained in:
parent
d301021122
commit
bdabd25867
@ -128,10 +128,16 @@ func (self *nullHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
if len(hash) == 0 {
|
if len(hash) == 0 {
|
||||||
goto notfound
|
goto notfound
|
||||||
}
|
}
|
||||||
|
|
||||||
msg, err := self.database.GetMessageIDByHash(hash)
|
msg, err := self.database.GetMessageIDByHash(hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
goto notfound
|
goto notfound
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !self.database.HasArticleLocal(msg.MessageID()) {
|
||||||
|
goto notfound
|
||||||
|
}
|
||||||
|
|
||||||
template.genThread(self.attachments, self.requireCaptcha, msg, self.prefix, self.name, w, self.database, isjson)
|
template.genThread(self.attachments, self.requireCaptcha, msg, self.prefix, self.name, w, self.database, isjson)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -292,11 +292,12 @@ func (self *templateEngine) genThread(allowFiles, requireCaptcha bool, root Arti
|
|||||||
newsgroup := root.Newsgroup()
|
newsgroup := root.Newsgroup()
|
||||||
msgid := root.MessageID()
|
msgid := root.MessageID()
|
||||||
|
|
||||||
|
/*
|
||||||
if !db.HasArticleLocal(msgid) {
|
if !db.HasArticleLocal(msgid) {
|
||||||
log.Println("don't have", msgid, "locally, not regenerating")
|
log.Println("don't have", msgid, "locally, not regenerating")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
t, err := db.GetThreadModel(prefix, msgid)
|
t, err := db.GetThreadModel(prefix, msgid)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if json {
|
if json {
|
||||||
|
Reference in New Issue
Block a user