Bug 22784: Do not display an empty table
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 18 Nov 2019 14:16:24 +0000 (15:16 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 14 Apr 2020 15:21:51 +0000 (16:21 +0100)
This is terrible and highlight that the whole script must be rewrite.
GetDistinctValues does not handle the "archived" flag (and we do not
want to put our hands there), so let's hack that and plan to rewrite the
whole script.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

suggestion/suggestion.pl

index 464badb..4f5c915 100755 (executable)
@@ -370,7 +370,7 @@ if ($op=~/else/) {
                             "suggestionscount"=>scalar(@$suggestions),             
                             'suggestions_loop'=>$suggestions,
                             'reasonsloop'     => $reasonsloop,
-                            };
+                            } if @$suggestions;
 
         delete $$suggestion_ref{$displayby} unless $definedvalue;
     }