IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 19, 2008, 4:25:40 PM (18 years ago)
Author:
bills
Message:

if file specific columns in a filelist don't change even when the file type
changes, don't output a new header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStoreServer/scripts/dsfsindex

    r17381 r17754  
    6565my $print_header=1;
    6666my $last_type = "";
     67my $last_header = "";
    6768while( my $row = $stmt->fetchrow_hashref()) {
    6869    my $type = $row->{type};
     
    8384            $typeheader .= sprintf "%-8s|", $fileTypeDef->[$i];
    8485        }
    85         print "$header$typeheader\n";
     86        my $newheader = "$header$typeheader";
     87        # if the header actually changed (due to type specific columns) print it out
     88        if ($newheader ne $last_header) {
     89            print "$newheader\n";
     90            $last_header = $newheader;
     91        }
    8692        $print_header = 0;
    8793    }
Note: See TracChangeset for help on using the changeset viewer.