All the notices now use AddNotice.
This commit is contained in:
parent
a5f5f4af7e
commit
dd75bf9ad9
|
@ -206,10 +206,10 @@ func userCheck(w http.ResponseWriter, r *http.Request, user *User) (header *Head
|
|||
}
|
||||
|
||||
if user.IsBanned {
|
||||
header.NoticeList = append(header.NoticeList, GetNoticePhrase("account_banned"))
|
||||
header.AddNotice("account_banned")
|
||||
}
|
||||
if user.Loggedin && !user.Active {
|
||||
header.NoticeList = append(header.NoticeList, GetNoticePhrase("account_inactive"))
|
||||
header.AddNotice("account_inactive")
|
||||
}
|
||||
|
||||
if len(theme.Resources) > 0 {
|
||||
|
|
|
@ -541,7 +541,7 @@ func routePanelUsersEdit(w http.ResponseWriter, r *http.Request, user common.Use
|
|||
}
|
||||
|
||||
if r.FormValue("updated") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("panel_user_updated"))
|
||||
header.AddNotice("panel_user_updated")
|
||||
}
|
||||
|
||||
pi := common.PanelPage{&common.BasePanelPage{header, stats, "users", common.ReportForumID}, groupList, targetUser}
|
||||
|
|
|
@ -298,7 +298,7 @@ func AccountEditAvatar(w http.ResponseWriter, r *http.Request, user common.User)
|
|||
}
|
||||
header.Title = common.GetTitlePhrase("account_avatar")
|
||||
if r.FormValue("updated") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("account_avatar_updated"))
|
||||
header.AddNotice("account_avatar_updated")
|
||||
}
|
||||
|
||||
pi := common.Page{header, tList, nil}
|
||||
|
@ -388,7 +388,7 @@ func AccountEditUsername(w http.ResponseWriter, r *http.Request, user common.Use
|
|||
}
|
||||
header.Title = common.GetTitlePhrase("account_username")
|
||||
if r.FormValue("updated") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("account_username_updated"))
|
||||
header.AddNotice("account_username_updated")
|
||||
}
|
||||
|
||||
pi := common.Page{header, tList, user.Name}
|
||||
|
@ -441,10 +441,10 @@ func AccountEditEmail(w http.ResponseWriter, r *http.Request, user common.User)
|
|||
}
|
||||
|
||||
if !common.Site.EnableEmails {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("account_mail_disabled"))
|
||||
header.AddNotice("account_mail_disabled")
|
||||
}
|
||||
if r.FormValue("verified") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("account_mail_verify_success"))
|
||||
header.AddNotice("account_mail_verify_success")
|
||||
}
|
||||
|
||||
pi := common.EmailListPage{header, emails, nil}
|
||||
|
|
|
@ -39,11 +39,11 @@ func Forums(w http.ResponseWriter, r *http.Request, user common.User) common.Rou
|
|||
}
|
||||
|
||||
if r.FormValue("created") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("panel_forum_created"))
|
||||
header.AddNotice("panel_forum_created")
|
||||
} else if r.FormValue("deleted") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("panel_forum_deleted"))
|
||||
header.AddNotice("panel_forum_deleted")
|
||||
} else if r.FormValue("updated") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("panel_forum_updated"))
|
||||
header.AddNotice("panel_forum_updated")
|
||||
}
|
||||
|
||||
pi := common.PanelPage{&common.BasePanelPage{header, stats, "forums", common.ReportForumID}, forumList, nil}
|
||||
|
@ -183,7 +183,7 @@ func ForumsEdit(w http.ResponseWriter, r *http.Request, user common.User, sfid s
|
|||
}
|
||||
|
||||
if r.FormValue("updated") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("panel_forum_updated"))
|
||||
header.AddNotice("panel_forum_updated")
|
||||
}
|
||||
|
||||
pi := common.PanelEditForumPage{&common.BasePanelPage{header, stats, "forums", common.ReportForumID}, forum.ID, forum.Name, forum.Desc, forum.Active, forum.Preset, gplist}
|
||||
|
@ -350,7 +350,7 @@ func ForumsEditPermsAdvance(w http.ResponseWriter, r *http.Request, user common.
|
|||
addNameLangToggle("MoveTopic", forumPerms.MoveTopic)
|
||||
|
||||
if r.FormValue("updated") == "1" {
|
||||
header.NoticeList = append(header.NoticeList, common.GetNoticePhrase("panel_forums_perms_updated"))
|
||||
header.AddNotice("panel_forums_perms_updated")
|
||||
}
|
||||
|
||||
pi := common.PanelEditForumGroupPage{&common.BasePanelPage{header, stats, "forums", common.ReportForumID}, forum.ID, gid, forum.Name, forum.Desc, forum.Active, forum.Preset, formattedPermList}
|
||||
|
|
Loading…
Reference in New Issue