store_in_file => \&_check_store_in_file,
};
+use constant VALIDATOR_DEPENDENCIES => {
+ mimetype => ['ispatch', 'isurl'],
+};
+
use constant UPDATE_VALIDATORS => {
filename => \&_check_filename,
isobsolete => \&Bugzilla::Object::check_boolean,
}
sub _check_content_type {
- my ($invocant, $content_type) = @_;
+ my ($invocant, $content_type, undef, $params) = @_;
+
+ my ($is_url, $is_patch) = @$params{qw(isurl ispatch)};
+ if (ref $invocant) {
+ $is_url = $invocant->isurl;
+ $is_patch = $invocant->ispatch;
+ }
- $content_type = 'text/plain' if (ref $invocant && ($invocant->isurl || $invocant->ispatch));
+ $content_type = 'text/plain' if ($is_url || $is_patch);
$content_type = trim($content_type);
my $legal_types = join('|', LEGAL_CONTENT_TYPES);
if (!$content_type or $content_type !~ /^($legal_types)\/.+$/) {
You attempted to attach a URL, setting C<is_url> to True,
but this Bugzilla does not support attaching URLs.
+=item 606 (Empty Data)
+
+You set the "data" field to an empty string.
+
=back
=back
file_not_specified => 603,
missing_attachment_description => 604,
attachment_url_disabled => 605,
+ zero_length_file => 606,
# Errors thrown by the WebService itself. The ones that are negative
# conform to http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php