projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import rt 3.6.4
[freeside.git]
/
rt
/
html
/
REST
/
1.0
/
dhandler
diff --git
a/rt/html/REST/1.0/dhandler
b/rt/html/REST/1.0/dhandler
index
6cf45b0
..
52d6973
100644
(file)
--- a/
rt/html/REST/1.0/dhandler
+++ b/
rt/html/REST/1.0/dhandler
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-200
5
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-200
7
Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-22,7
+22,9
@@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@
-72,6
+74,7
@@
my $labels = "(?:$label,)*$label";
# http://.../REST/1.0/ticket/edit
# 4. http://.../REST/1.0/ticket/nn (all possibly with a single form).
# http://.../REST/1.0/ticket/nn/history
# http://.../REST/1.0/ticket/edit
# 4. http://.../REST/1.0/ticket/nn (all possibly with a single form).
# http://.../REST/1.0/ticket/nn/history
+# http://.../REST/1.0/ticket/nn/comment
# http://.../REST/1.0/ticket/nn/attachment/1
#
# Objects are specified by their type, and either a unique numeric ID,
# http://.../REST/1.0/ticket/nn/attachment/1
#
# Objects are specified by their type, and either a unique numeric ID,
@@
-290,7
+293,12
@@
foreach $object (@objects) {
# We won't pass $e through to compose, trusting instead that the
# handler added suitable comments for the user.
if ($e) {
# We won't pass $e through to compose, trusting instead that the
# handler added suitable comments for the user.
if ($e) {
- $status = "409 Syntax Error" if @$o;
+ if (@$o) {
+ $status = "409 Syntax Error";
+ }
+ else {
+ $status = "400 Bad Request";
+ }
push @output, [ $c, $o, $k ];
}
else {
push @output, [ $c, $o, $k ];
}
else {
@@
-303,7
+311,6
@@
unshift(@output, [ join "\n", @comments ]) if @comments;
$output = form_compose(\@output);
OUTPUT:
$output = form_compose(\@output);
OUTPUT:
+$m->out("RT/".$RT::VERSION ." ".$status ."\n\n$output\n") if ($output || $status != 200);
+return;
</%INIT>
</%INIT>
-RT/<% $RT::VERSION %> <% $status %>
-
-<% $output |n %>