%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
# collection is ordered or not
if ( @OrderBy && ($AllowSorting || !$Collection->{'order_by'}) ) {
if ( $OrderBy[0] =~ /\|/ ) {
- @OrderBy = grep length($_), split /\|/, $OrderBy[0];
+ @OrderBy = split /\|/, $OrderBy[0];
@Order = split /\|/,$Order[0];
}
+ @OrderBy = grep length, @OrderBy;
$Collection->OrderByCols(
map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } }
( 0 .. $#OrderBy )
}
$m->out('<table cellspacing="0" class="' .
- ($Collection->isa('RT::Tickets') ? 'ticket-list' : 'collection') . ' collection-as-table">');
+ ($Collection->isa('RT::Tickets') ? 'ticket-list' : 'collection') . ' collection-as-table">');
if ( $ShowHeader ) {
- $m->comp('/Elements/CollectionAsTable/Header',
- %ARGS,
- Class => $Class,
- Format => \@Format,
- FormatString => $Format,
- Order => \@Order,
- OrderBy => \@OrderBy,
- Rows => $Rows,
- Page => $Page,
- AllowSorting => $AllowSorting,
- BaseURL => $BaseURL,
- GenericQueryArgs => $GenericQueryArgs,
- maxitems => $maxitems,
- );
+ $m->comp('/Elements/CollectionAsTable/Header',
+ %ARGS,
+ Class => $Class,
+ Format => \@Format,
+ FormatString => $Format,
+ Order => \@Order,
+ OrderBy => \@OrderBy,
+ Rows => $Rows,
+ Page => $Page,
+ AllowSorting => $AllowSorting,
+ BaseURL => $BaseURL,
+ GenericQueryArgs => $GenericQueryArgs,
+ maxitems => $maxitems,
+ PassArguments => \@PassArguments,
+ );
}
my ($i, $column_map) = (0, {});