X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FSearch%2FElements%2FBuildFormatString;h=3bd39b5c258da0164f74c15740896f99af605562;hp=cffb81a48cf2d5114c332c1298adebf83080625c;hb=ef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4;hpb=a513c0bef534d05f03c1242831b6f3be19b97dae diff --git a/rt/html/Search/Elements/BuildFormatString b/rt/html/Search/Elements/BuildFormatString index cffb81a48..3bd39b5c2 100644 --- a/rt/html/Search/Elements/BuildFormatString +++ b/rt/html/Search/Elements/BuildFormatString @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -171,12 +173,12 @@ elsif ( $AddCol ) { $column{Column} = $col; if ( $Face eq "Bold" ) { - $column{Prefix} .= ""; - $column{Suffix} .= ""; + $column{Prefix} .= ""; + $column{Suffix} .= ""; } if ( $Face eq "Italic" ) { - $column{Prefix} .= ""; - $column{Suffix} .= ""; + $column{Prefix} .= ""; + $column{Suffix} .= ""; } if ($Size) { $column{Prefix} .= "<" . $m->interp->apply_escapes( $Size, 'h' ) . ">"; @@ -184,11 +186,11 @@ elsif ( $AddCol ) { } if ( $Link eq "Display" ) { $column{Prefix} .= - ""; + ""; $column{Suffix} .= ""; } elsif ( $Link eq "Take" ) { - $column{Prefix} .= ""; $column{Suffix} .= ""; } @@ -223,10 +225,13 @@ elsif ( $ColDown ) { my @format_string; foreach my $field (@seen) { next unless $field; - my $row = "'" . $field->{Prefix}; - $row .= "__" . $m->interp->apply_escapes( $field->{Column}, 'h' ) . "__" + my $row = "'"; + $row .= $field->{Prefix} if $field->{Prefix}; + $row .= "__" . ($field->{Column} =~ m/\(/ ? $field->{Column} # func, don't escape + : $m->interp->apply_escapes( $field->{Column}, 'h' )) . "__" unless ( $field->{Column} eq "" ); - $row .= $field->{Suffix} . "'"; + $row .= $field->{Suffix} if $field->{Suffix}; + $row .= "'"; push( @format_string, $row ); }