X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FElements%2FCollectionAsTable%2FParseFormat;h=be56dea7657ce48ff3a0c9594a6b7fc845c70994;hp=57434efe2d08272eac66327b144f3387f0acf3b9;hb=9c68254528b6f2c7d8c1921b452fa56064783782;hpb=d4d0590bef31071e8809ec046717444b95b3f30a diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat index 57434efe2..be56dea76 100644 --- a/rt/html/Elements/CollectionAsTable/ParseFormat +++ b/rt/html/Elements/CollectionAsTable/ParseFormat @@ -48,7 +48,7 @@ $Format <%init> -use Regexp::Common; +use Regexp::Common qw/delimited/; my @Columns; while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) { @@ -59,7 +59,9 @@ while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) { substr($col,-1,1) = ""; } - my $colref; + my $colref = { + title => '', + }; if ( $col =~ s!/STYLE:([^/]+)!!io ) { $colref->{'style'} = $1; @@ -88,7 +90,7 @@ while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) { $colref->{'attribute'} = $col; } - if ( !$colref->{'title'} && grep { /^__(.*?)__$/io } + if ( !$colref->{'title'} && grep { /^__(.+?)__$/io } @{ $colref->{'output'} } ) { $colref->{'title'} = $1;