[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. 166cc47360fe61fc6c6371c362933d48037190c1

jesse jesse at bestpractical.com
Sun Jan 25 17:29:52 EST 2009


The branch, master has been updated
       via  166cc47360fe61fc6c6371c362933d48037190c1 (commit)
      from  38b32f579539110fa9126c55da403da949837f62 (commit)

Summary of changes:
 lib/Prophet/CLI/Command/Search.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 166cc47360fe61fc6c6371c362933d48037190c1
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sun Jan 25 17:29:04 2009 -0500

    When showing a list of results, skip headings for things with no values

diff --git a/lib/Prophet/CLI/Command/Search.pm b/lib/Prophet/CLI/Command/Search.pm
index 5f56383..da26fe7 100644
--- a/lib/Prophet/CLI/Command/Search.pm
+++ b/lib/Prophet/CLI/Command/Search.pm
@@ -134,6 +134,7 @@ sub display_terminal {
     my $groups = $self->group_routine->( [$records->items] );
 
     foreach my $group ( @{$groups} ) {
+        next unless (exists $group->{records}->[0]); # skip headings with no records
         $group->{label}  ||= 'none';
         if ( $#{$groups} &&  $group->{label} ) {
             print "\n"

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list