liquid_feedback_frontend
view app/main/admin/_action/cancel_issue.lua @ 1836:1dad272c08eb
Reduce white space
| author | bsw | 
|---|---|
| date | Thu Feb 03 12:44:02 2022 +0100 (2022-02-03) | 
| parents | 42edba78d946 | 
| children | 
 line source
     1 local issue = Issue
     2   :new_selector()
     3   :add_where{ "id = ?", param.get_id()}
     4   :single_object_mode()
     5   :for_update()
     6   :exec()
     8 if issue.closed then
     9   slot.put_into("error", _"This issue is already closed.")
    10   return false
    11 end  
    13 issue.state = "canceled_by_admin"
    14 issue.closed = "now"
    16 local admin_notice
    17 if issue.admin_notice then
    18   admin_notice = issue.admin_notice .. "\n\n"
    19 else
    20   admin_notice = ""
    21 end
    23 admin_notice = admin_notice .. param.get("admin_notice")
    25 issue.admin_notice = admin_notice
    27 issue:save()
    29 slot.put_into("notice", _"Issue has been canceled")
