fix processing of aligns with agent-virt, #25944
authorMark Wells <mark@freeside.biz>
Tue, 30 Jun 2015 16:56:46 +0000 (09:56 -0700)
committerMark Wells <mark@freeside.biz>
Tue, 30 Jun 2015 16:59:20 +0000 (09:59 -0700)
httemplate/search/elements/search.html

index 80bc89d..c58e636 100644 (file)
@@ -245,6 +245,18 @@ $opt{disable_download} = 0
 $opt{disable_download} = 1
   if $opt{really_disable_download};
 
 $opt{disable_download} = 1
   if $opt{really_disable_download};
 
+# split/map aligns here, so that agent_virt can add a column
+# (search-html.html will split aligns also if they aren't already split)
+my %align = (
+  'l' => 'left',
+  'r' => 'right',
+  'c' => 'center',
+  ' ' => '',
+  '.' => '',
+);
+$opt{align} = [ map $align{$_}, split(//, $opt{align}) ],
+  unless !$opt{align} || ref($opt{align});
+
 # get our queries ready
 my $query = $opt{query} or die "query required";
 my $count_query = $opt{count_query} or die "count_query required";
 # get our queries ready
 my $query = $opt{query} or die "query required";
 my $count_query = $opt{count_query} or die "count_query required";