summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorwurblzap%gmail.com <>2006-08-20 02:20:23 +0200
committerwurblzap%gmail.com <>2006-08-20 02:20:23 +0200
commit0ee4621e7828a205189368aa9b8a515574d9c030 (patch)
tree93caacf40fc87a27e224e8fefa6b7284e686e918 /post_bug.cgi
parent79c7d0e961d9adf2c3a0459594745afb41b19e4c (diff)
downloadbugzilla-0ee4621e7828a205189368aa9b8a515574d9c030.tar.gz
bugzilla-0ee4621e7828a205189368aa9b8a515574d9c030.tar.xz
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-xpost_bug.cgi7
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'} = $@;