]> git.uio.no Git - usit-rt.git/blobdiff - share/html/REST/1.0/search/ticket
Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / share / html / REST / 1.0 / search / ticket
index a0e65d0707cc696b4895549f98053c475e89e13b..aa55a6323c7b993cdf0045f880c6a9fecca293a6 100644 (file)
@@ -123,32 +123,32 @@ my @output;
 while (my $ticket = $tickets->Next) {
     $n++;
 
-       my $id = $ticket->Id;
+    my $id = $ticket->Id;
     if ($format eq "i") {
         $output .= "ticket/" . $id . "\n";
     }
     elsif ($format eq "s") {
-       if ($fields) {
-               my $result = $m->comp("/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
-               my ($notes, $order, $key_values, $errors) = @$result;
-               # If it's the first time through, add our header
-               if ($n == 1) {
-                       $output .= join("\t",@$order)."\n";
-               }
-               # Cut off the annoying ticket/ before the id;
-               $key_values->{'id'} = $id;
-               $output .= join("\t", map { ref $key_values->{$_} eq 'ARRAY' ?
-join( ', ', @{$key_values->{$_}} ) : $key_values->{$_} } @$order)."\n";
-
-
-       } else {
-               $output .= $ticket->Id . ": ". $ticket->Subject . "\n";
-       }
+        if ($fields) {
+            my $result = $m->comp("/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
+            my ($notes, $order, $key_values, $errors) = @$result;
+            # If it's the first time through, add our header
+            if ($n == 1) {
+                $output .= join("\t",@$order)."\n";
+            }
+            # Cut off the annoying ticket/ before the id;
+            $key_values->{'id'} = $id;
+            $output .= join("\t", map {
+                ref $key_values->{$_} eq 'ARRAY'
+                    ? join( ', ', @{$key_values->{$_}} )
+                    : $key_values->{$_} } @$order)."\n";
+        } else {
+            $output .= $ticket->Id . ": ". $ticket->Subject . "\n";
+        }
     }
     else {
         my $d = $m->comp("/REST/1.0/Forms/ticket/default", id => $id, format => $format, fields => \%fields);
         my ($c, $o, $k, $e) = @$d;
-       push @output, [ $c, $o, $k ];
+        push @output, [ $c, $o, $k ];
     }
 }
 if ($n == 0 && $format ne "i") {