summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-06-30 09:56:46 -0700
committerMark Wells <mark@freeside.biz>2015-06-30 09:58:16 -0700
commite21e6a373962bcfa7c14bd4bb3e22d106badd9cd (patch)
tree3496b1bab3f6a55c6de7d40c23ebcf4398eae665
parent204edd2e581a9a0e30f87135ce30a360783801ba (diff)
fix processing of aligns with agent-virt, #25944
-rw-r--r--httemplate/search/elements/search.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index 80bc89d3e..c58e63698 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -245,6 +245,18 @@ $opt{disable_download} = 0
$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";