[Koha-patches] [PATCH] Serial IF statements on same $variable should be ELSIFs.

Galen Charlton galen.charlton at liblime.com
Sat Apr 4 03:14:06 CEST 2009


From: Joe Atzberger <joe.atzberger at liblime.com>

Small POD update also.
---
 C4/Reports/Guided.pm |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm
index 0e4f418..df76ed5 100644
--- a/C4/Reports/Guided.pm
+++ b/C4/Reports/Guided.pm
@@ -333,7 +333,7 @@ sub get_criteria {
 
 =over
 
-($results, $total) = execute_query($sql, $type, $offset, $limit, $format, $id)
+($results, $total, $error) = execute_query($sql, $type, $offset, $limit, $format, $id)
 
 =back
 
@@ -417,7 +417,7 @@ sub execute_query ($$$$;$$) {
         if ($format eq 'tab') {
             $string = join("\t",@$colnames);
         }
-        if ($format eq 'csv') {
+        elsif ($format eq 'csv') {
             $string = join(",",@$colnames);
         }
         my @xmlarray;
@@ -433,18 +433,18 @@ sub execute_query ($$$$;$$) {
             my $row = join( '</td><td>', @data );
             $row = "<tr><td>$row</td></tr>";
             $temphash{'row'} = $row;
-            if ( $format eq 'text' ) {
+            if ($format eq 'text') {
                 $string .= "\n" . $row;
             }
-            if ($format eq 'tab' ){
+            elsif ($format eq 'tab'){
                 $row = join("\t", at data);
                 $string .="\n" . $row;
             }
-            if ($format eq 'csv' ){
+            elsif ($format eq 'csv'){
                 $row = join(",", at data);
                 $string .="\n" . $row;
             }
-            if ($format eq 'url'){
+            elsif ($format eq 'url'){
                 my $temphash;
                 @$temphash{@$colnames}=@data;
                 push @xmlarray,$temphash;
-- 
1.5.6.5




More information about the Koha-patches mailing list