diff --git a/shroom/upload.go b/shroom/upload.go index d574ad9..ecdff81 100644 --- a/shroom/upload.go +++ b/shroom/upload.go @@ -1,11 +1,11 @@ package shroom import ( + "bytes" "errors" "fmt" "io" "log" - "bytes" "mime/multipart" "os" "path/filepath" diff --git a/web/auth.go b/web/auth.go index 3cd6251..9cbe5d2 100644 --- a/web/auth.go +++ b/web/auth.go @@ -92,7 +92,7 @@ func handlerLogout(w http.ResponseWriter, rq *http.Request) { var ( u = user.FromRequest(rq) can = u != nil - lc = l18n.FromRequest(rq) + lc = l18n.FromRequest(rq) ) w.Header().Set("Content-Type", "text/html;charset=utf-8") if can { diff --git a/web/history.go b/web/history.go index d5e040b..681a1f6 100644 --- a/web/history.go +++ b/web/history.go @@ -55,7 +55,7 @@ func handlerRecentChanges(w http.ResponseWriter, rq *http.Request) { var lc = l18n.FromRequest(rq) util.HTTP200Page(w, views.BaseHTML( lc.GetPlural("ui.recent_title", n), - views.RecentChangesHTML(n, lc), + views.RecentChangesHTML(n, lc), lc, user.FromRequest(rq))) } diff --git a/web/search.go b/web/search.go index 273e944..22f0ddc 100644 --- a/web/search.go +++ b/web/search.go @@ -6,10 +6,10 @@ import ( "github.com/gorilla/mux" + "github.com/bouncepaw/mycorrhiza/l18n" "github.com/bouncepaw/mycorrhiza/shroom" "github.com/bouncepaw/mycorrhiza/user" "github.com/bouncepaw/mycorrhiza/util" - "github.com/bouncepaw/mycorrhiza/l18n" "github.com/bouncepaw/mycorrhiza/views" ) diff --git a/web/stuff.go b/web/stuff.go index a076fe9..419ec35 100644 --- a/web/stuff.go +++ b/web/stuff.go @@ -154,7 +154,7 @@ func handlerAbout(w http.ResponseWriter, rq *http.Request) { w.Header().Set("Content-Type", "text/html;charset=utf-8") w.WriteHeader(http.StatusOK) var ( - lc = l18n.FromRequest(rq) + lc = l18n.FromRequest(rq) title = lc.Get("ui.about_title", &l18n.Replacements{"name": cfg.WikiName}) ) _, err := io.WriteString(w, views.BaseHTML(title, views.AboutHTML(lc), lc, user.FromRequest(rq))) diff --git a/web/web.go b/web/web.go index 8b4fd32..5e985fe 100644 --- a/web/web.go +++ b/web/web.go @@ -38,7 +38,7 @@ func httpErr(w http.ResponseWriter, lc *l18n.Localizer, status int, name, title, name, lc.Get("ui.error_go_back"), ), - lc, + lc, user.EmptyUser(), ), )