Error mode 4 is already used by ERROR_MODE_TEST, and so ERROR_MODE_AJAX must use another ID

git-svn-id: svn://10.0.0.236/trunk@263654 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2012-04-09 13:00:35 +00:00
parent a03481fefb
commit 247cf99360
4 changed files with 6 additions and 5 deletions

View File

@@ -1 +1 @@
652
653

View File

@@ -1,7 +1,7 @@
<?php
// by Edd Dumbill (C) 1999-2002
// <edd@usefulinc.com>
// $Id: .xmlrpc.inc.php,v 1.15 2012-04-09 12:45:33 mkanat%bugzilla.org Exp $
// $Id: .xmlrpc.inc.php,v 1.16 2012-04-09 13:00:35 mkanat%bugzilla.org Exp $
// Copyright (c) 1999,2000,2002 Edd Dumbill.
// All rights reserved.

View File

@@ -63,7 +63,7 @@ TIME_FORMAT
use constant TESTOPIA_VERSION => "2.5";
use constant ERROR_MODE_AJAX => 4;
use constant ERROR_MODE_AJAX => 5;
# Test Case Status
use constant PROPOSED => 1;

View File

@@ -9,11 +9,12 @@
# We cannot use $^S to detect if we are in an eval(), because mod_perl
# already eval'uates everything, so $^S = 1 in all cases under mod_perl!
@@ -150,6 +151,16 @@
@@ -150,6 +151,17 @@
$server->response($server->error_response_header);
}
}
+ elsif (Bugzilla->error_mode == ERROR_MODE_AJAX) {
+ # ERROR_MODE_AJAX = 5, but we cannot use ERROR_MODE_AJAX from here.
+ elsif (Bugzilla->error_mode == 5) {
+ # JSON can't handle strings across lines.
+ $message =~ s/\n/ /gm;
+ my $err;