liquid_feedback_frontend
view app/main/admin/_action/cancel_issue.lua @ 1218:bb10f001443e
Fixed syntax error in unit sidebar occured after last bug fix again again
| author | bsw | 
|---|---|
| date | Mon Jul 27 23:33:26 2015 +0200 (2015-07-27) | 
| 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")
