cb455113cc
* Re-add old uploader name to view page * Update zh-CN translation (fixes #519) * Nicer text boxes in night mode (closes #515) * Fix max results defaulting to 5 (fixes #488) * Add link back to nyaa on sukebei (fixes #255 and #437) * Fix visual bug with pt-BR translation (fixes #427)
18 lignes
507 o
Go
18 lignes
507 o
Go
package router
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/ewhal/nyaa/util/languages"
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func NotFoundHandler(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusNotFound)
|
|
|
|
languages.SetTranslationFromRequest(notFoundTemplate, r)
|
|
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{NewNavigation(), NewSearchForm(), GetUser(r), r.URL, mux.CurrentRoute(r)})
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
}
|
|
}
|