summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 350cf91f1..95d793e75 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -52,6 +52,7 @@ use Bugzilla::Attachment;
use Bugzilla::Attachment::PatchReader;
use Bugzilla::Token;
use Bugzilla::Keyword;
+use Bugzilla::Hook;
use Encode qw(encode find_encoding);
@@ -386,6 +387,9 @@ sub view {
# Return the appropriate HTTP response headers.
$attachment->datasize || ThrowUserError("attachment_removed");
+ # BMO add a hook for github url redirection
+ Bugzilla::Hook::process('attachment_view', { attachment => $attachment });
+
$filename =~ s/^.*[\/\\]//;
# escape quotes and backslashes in the filename, per RFCs 2045/822
$filename =~ s/\\/\\\\/g; # escape backslashes