diff options
author | mkanat%bugzilla.org <> | 2009-12-10 22:18:05 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-12-10 22:18:05 +0000 |
commit | 59a35402749a8b20db50b810ce29c1479594dced (patch) | |
tree | 85f5c1fa1c4043dff77b2da71c0219c9bf2e6105 /Bugzilla/User.pm | |
parent | 56285b05dcdc9ebfe8df8119b387205def6db9dc (diff) | |
download | bugs-59a35402749a8b20db50b810ce29c1479594dced.tar bugs-59a35402749a8b20db50b810ce29c1479594dced.tar.gz bugs-59a35402749a8b20db50b810ce29c1479594dced.tar.bz2 bugs-59a35402749a8b20db50b810ce29c1479594dced.tar.xz bugs-59a35402749a8b20db50b810ce29c1479594dced.zip |
Bug 526158: Make email_in.pl use Bugzilla::Bug->create to create bugs instead of requiring post_bug.cgi
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 7c458388c..3e6f3b6ba 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -716,7 +716,14 @@ sub can_enter_product { my $dbh = Bugzilla->dbh; $warn ||= 0; - if (!defined $input) { + $input = trim($input) if !ref $input; + if (!defined $input or $input eq '') { + return unless $warn == THROW_ERROR; + ThrowUserError('object_not_specified', + { class => 'Bugzilla::Product' }); + } + + if (!scalar @{ $self->get_enterable_products }) { return unless $warn == THROW_ERROR; ThrowUserError('no_products'); } |