summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Hook.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-08-13 04:24:45 +0200
committerlpsolit%gmail.com <>2009-08-13 04:24:45 +0200
commit90599db3c3ad3def2052abef42ae80a6f6490727 (patch)
treeef7185f3851395266ec93d23ee40dad673f18301 /Bugzilla/Hook.pm
parentc64d5c4846f0f33087fb3d734a8d01588d904dbd (diff)
downloadbugzilla-90599db3c3ad3def2052abef42ae80a6f6490727.tar.gz
bugzilla-90599db3c3ad3def2052abef42ae80a6f6490727.tar.xz
Bug 509027: Add a hook in Bugzilla::Attachment::_check_data() - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r--Bugzilla/Hook.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index 1d506424f..990c6f117 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -170,6 +170,24 @@ This describes what hooks exist in Bugzilla currently. They are mostly
in alphabetical order, but some related hooks are near each other instead
of being alphabetical.
+=head2 attachment-process_data
+
+This happens at the very beginning process of the attachment creation.
+You can edit the attachment content itself as well as all attributes
+of the attachment, before they are validated and inserted into the DB.
+
+Params:
+
+=over
+
+=item C<data> - A reference pointing either to the content of the file
+being uploaded or pointing to the filehandle associated with the file.
+
+=item C<attributes> - A hashref whose keys are the same as
+L<Bugzilla::Attachment/create>. The data it contains hasn't been checked yet.
+
+=back
+
=head2 auth-login_methods
This allows you to add new login types to Bugzilla.