Code cleanup
This commit is contained in:
parent
85fd6ac5a2
commit
de52037fb0
|
@ -65,7 +65,13 @@ func Manage() http.HandlerFunc {
|
|||
}
|
||||
pager.ParsePage(r)
|
||||
|
||||
forums, err := models.PaginateOwnedForums(currentUser.ID, currentUser.IsAdmin, categories, search, pager)
|
||||
forums, err := models.PaginateOwnedForums(
|
||||
currentUser.ID,
|
||||
currentUser.HasAdminScope(config.ScopeForumAdmin),
|
||||
categories,
|
||||
search,
|
||||
pager,
|
||||
)
|
||||
if err != nil {
|
||||
session.FlashError(w, r, "Couldn't paginate owned forums: %s", err)
|
||||
templates.Redirect(w, "/")
|
||||
|
|
|
@ -215,8 +215,6 @@ func ModerateThread() http.HandlerFunc {
|
|||
case "unpin":
|
||||
thread.Pinned = false
|
||||
session.Flash(w, r, "This thread will no longer be pinned to the top of the forum.")
|
||||
default:
|
||||
session.FlashError(w, r, "Unknown moderator action.")
|
||||
}
|
||||
|
||||
// Save changes to the thread.
|
||||
|
|
Loading…
Reference in New Issue
Block a user