[Rt-commit] r5004 - in rt/branches/3.5-TESTING: . html/REST/1.0/Forms/ticket html/REST/1.0/ticket

kevinr at bestpractical.com kevinr at bestpractical.com
Mon Apr 10 22:25:25 EDT 2006


Author: kevinr
Date: Mon Apr 10 22:25:24 2006
New Revision: 5004

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/REST/1.0/Forms/ticket/default
   rt/branches/3.5-TESTING/html/REST/1.0/dhandler
   rt/branches/3.5-TESTING/html/REST/1.0/ticket/comment

Log:
 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.5-TESTING/html/REST/1.0/Forms/ticket/default
==============================================================================
--- rt/branches/3.5-TESTING/html/REST/1.0/Forms/ticket/default	(original)
+++ rt/branches/3.5-TESTING/html/REST/1.0/Forms/ticket/default	Mon Apr 10 22:25:24 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.5-TESTING/html/REST/1.0/dhandler
==============================================================================
--- rt/branches/3.5-TESTING/html/REST/1.0/dhandler	(original)
+++ rt/branches/3.5-TESTING/html/REST/1.0/dhandler	Mon Apr 10 22:25:24 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.5-TESTING/html/REST/1.0/ticket/comment
==============================================================================
--- rt/branches/3.5-TESTING/html/REST/1.0/ticket/comment	(original)
+++ rt/branches/3.5-TESTING/html/REST/1.0/ticket/comment	Mon Apr 10 22:25:24 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