diff options
author | wurblzap%gmail.com <> | 2006-08-20 00:20:23 +0000 |
---|---|---|
committer | wurblzap%gmail.com <> | 2006-08-20 00:20:23 +0000 |
commit | 0ee4621e7828a205189368aa9b8a515574d9c030 (patch) | |
tree | 93caacf40fc87a27e224e8fefa6b7284e686e918 /post_bug.cgi | |
parent | 79c7d0e961d9adf2c3a0459594745afb41b19e4c (diff) | |
download | bugs-0ee4621e7828a205189368aa9b8a515574d9c030.tar bugs-0ee4621e7828a205189368aa9b8a515574d9c030.tar.gz bugs-0ee4621e7828a205189368aa9b8a515574d9c030.tar.bz2 bugs-0ee4621e7828a205189368aa9b8a515574d9c030.tar.xz bugs-0ee4621e7828a205189368aa9b8a515574d9c030.zip |
Bug 224577: Bugzilla could use a web services interface.
Patch by Marc Schumann <wurblzap@gmail.com>;
r=mkanat; a=myk
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/post_bug.cgi b/post_bug.cgi index aac15f3bf..d8f2150e9 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -559,10 +559,11 @@ if (defined($cgi->upload('data')) || $cgi->param('attachurl')) { # Add flags, if any. To avoid dying if something goes wrong # while processing flags, we will eval() flag validation. -# This requires to be in batch mode. +# This requires errors to die(). # XXX: this can go away as soon as flag validation is able to # fail without dying. -Bugzilla->batch(1); +my $error_mode_cache = Bugzilla->error_mode; +Bugzilla->error_mode(ERROR_MODE_DIE); eval { # Make sure no flags have already been set for this bug. # Impossible? - Well, depends if you hack the URL or not. @@ -571,7 +572,7 @@ eval { Bugzilla::FlagType::validate($cgi, $id); Bugzilla::Flag::process($bug, undef, $timestamp, $cgi); }; -Bugzilla->batch(0); +Bugzilla->error_mode($error_mode_cache); if ($@) { $vars->{'message'} = 'flag_creation_failed'; $vars->{'flag_creation_error'} = $@; |