add userboxes and use them instead of flash
This commit is contained in:
@ -14,7 +14,7 @@ local POSTS_PER_PAGE = 10
|
||||
app:get("thread_create", "/create", function(self)
|
||||
local user = util.get_logged_in_user(self)
|
||||
if not user then
|
||||
self.session.flash = {error = "You must be logged in to perform this action."}
|
||||
util.inject_err_infobox(self, "You must be logged in to perform this action.")
|
||||
return {redirect_to = self:url_for("user_login")}
|
||||
end
|
||||
local all_topics = db.query("select * from topics limit 25;")
|
||||
@ -30,7 +30,7 @@ end)
|
||||
app:post("thread_create", "/create", function(self)
|
||||
local user = util.get_logged_in_user(self)
|
||||
if not user then
|
||||
self.session.flash = {error = "You must be logged in to perform this action."}
|
||||
util.inject_err_infobox(self, "You must be logged in to perform this action.")
|
||||
return {redirect_to = self:url_for("user_login")}
|
||||
end
|
||||
local topic = Topics:find(self.params.topic_id)
|
||||
|
Reference in New Issue
Block a user