Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Cette révision appartient à :
akuma06 2017-05-21 01:22:07 +02:00
Parent 798ec9a3a8
révision c7d3c49daa

Voir le fichier

@ -326,13 +326,14 @@ func UserNotificationsHandler(w http.ResponseWriter, r *http.Request) {
currentUser := GetUser(r)
if currentUser.ID > 0 {
messages := msg.GetMessages(r)
T := languages.SetTranslationFromRequest(viewProfileNotifTemplate, r)
Ts, _ := languages.GetTfuncAndLanguageFromRequest(r)
T := languages.GetTfuncFromRequest(r)
if r.URL.Query()["clear"] != nil {
notifierService.DeleteAllNotifications(currentUser.ID)
messages.AddInfo("infos", T("notifications_cleared"))
messages.AddInfo("infos", Ts("notifications_cleared"))
currentUser.Notifications = []model.Notification{}
}
htv := UserProfileNotifVariables{messages.GetAllInfos(), NewSearchForm(), NewNavigation(), currentUser, r.URL, mux.CurrentRoute(r)}
htv := UserProfileNotifVariables{messages.GetAllInfos(), NewSearchForm(), NewNavigation(), T, currentUser, r.URL, mux.CurrentRoute(r)}
err := viewProfileNotifTemplate.ExecuteTemplate(w, "index.html", htv)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)