[Rt-commit] r5104 - in rt/branches/3.7-EXPERIMENTAL: .
html/REST/1.0 html/REST/1.0/ticket
ruz at bestpractical.com
ruz at bestpractical.com
Tue Apr 25 09:28:24 EDT 2006
Author: ruz
Date: Tue Apr 25 09:28:20 2006
New Revision: 5104
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/Forms/ticket/default
rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/dhandler
rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/ticket/comment
Log:
r2401 at cubic-pc (orig r5004): kevinr | 2006-04-11 06:25:24 +0400
r12014 at sad-girl-in-snow: kevinr | 2006-04-10 21:25:57 -0400
* Fixed a couple minor bits of ugly code and a comment
Modified: rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/Forms/ticket/default
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/Forms/ticket/default (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/Forms/ticket/default Tue Apr 25 09:28:20 2006
@@ -83,7 +83,7 @@
}
}
else {
- if (%data == 0) {
+ if (!keys(%data)) {
# GET ticket/new: Return a suitable default form.
# We get defaults from queue/1 (XXX: What if it isn't there?).
my $due = new RT::Date $session{CurrentUser};
@@ -161,12 +161,13 @@
delete $data{id};
$id = $ticket->Id;
push(@comments, "# Ticket $id created.");
- goto DONE if %data == 0;
+ # see if the hash is empty
+ goto DONE if ! keys(%data);
}
}
# Now we know we're dealing with an existing ticket.
-if (%data == 0) {
+if (!keys(%data)) {
my ($time, $key, $val, @data);
push @data, [ id => "ticket/".$ticket->Id ];
Modified: rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/dhandler
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/dhandler (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/dhandler Tue Apr 25 09:28:20 2006
@@ -292,6 +292,7 @@
if ($e) {
$status = "409 Syntax Error" if @$o;
push @output, [ $c, $o, $k ];
+ #die("handler=$handler, id=$id, args=$args, format=$format, changes=$k");
}
else {
push @comments, $c;
Modified: rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/ticket/comment
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/ticket/comment (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/REST/1.0/ticket/comment Tue Apr 25 09:28:20 2006
@@ -60,7 +60,7 @@
my $output;
my $action;
-# http://.../REST/1.0/ticket/comment/1
+# http://.../REST/1.0/ticket/1/comment
my ($c, $o, $k, $e) = @{ form_parse($content)->[0] };
if ($e || !$o) {
if (!$o) {
More information about the Rt-commit
mailing list