From 0ee4621e7828a205189368aa9b8a515574d9c030 Mon Sep 17 00:00:00 2001 From: "wurblzap%gmail.com" <> Date: Sun, 20 Aug 2006 00:20:23 +0000 Subject: Bug 224577: Bugzilla could use a web services interface. Patch by Marc Schumann ; r=mkanat; a=myk --- post_bug.cgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'post_bug.cgi') 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'} = $@; -- cgit v1.2.3-24-g4f1b