Changesets can be listed by changeset number.
The Git repository is here.
Changeset 44
Missing attachments produced an application error rather than being
handled gracefully, before this change. Now, an alert is given to
warn the user that the attachment cannot be served. The browser is
redirected back to the referer URL if present, else the forum topic
list.
- Comitted by: adh
- Date: Wednesday August 02 17:37:31 2006 (over 18 years ago)
Affected files:
- rool/rails/rforum/trunk/app/controllers/attachment_controller.rb (diff)
- rool/rails/rforum/trunk/lang/en.yaml (diff)
rool/rails/rforum/trunk/app/controllers/attachment_controller.rb:
prev. | current | |
def fetch | ||
id = @params[:id] | ||
send_file Attachment.find(id).file_path | ||
5 | rescue | |
6 | flash[:alert] = l(:attachment_not_found) | |
7 | ||
8 | if (@request.referer and @request.referer != '') | |
9 | redirect_to @request.referer | |
10 | else | |
11 | redirect_to :controller => '' | |
12 | end | |
end | ||
end |
rool/rails/rforum/trunk/lang/en.yaml:
prev. | current | |
attachment: Attachment | ||
attachment_too_large: The attached file is too large. | ||
24 | attachment_not_found: Sorry, the requested attachment is no longer available. | |
postmenu_reply_to: Reply with quote | ||
postmenu_move_topic: Move |