Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 44
- Log:
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.
- Author:
- adh
- Date:
- Wed Aug 02 17:37:31 +0100 2006
- Size:
- 335 Bytes
1 | class AttachmentController < ApplicationController |
2 | def fetch |
3 | id = @params[:id] |
4 | 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 |
13 | end |
14 | end |