summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-01-18 19:46:01 -0800
committerIvan Kohler <ivan@freeside.biz>2015-01-18 19:46:01 -0800
commitf7c686b2da39bc975b6a197b2879aa7a6fa4fa10 (patch)
tree035d3f1c68b209d0fea45a14bff5e6596ed33d6e /httemplate
parent999c1f9c054ba51a6c5c7a3a2babe21dd17683cb (diff)
disable quotations, RT#20688, RT#22232
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/search/elements/search.html10
1 files changed, 3 insertions, 7 deletions
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index 8f6272030..b70b82db2 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -307,9 +307,11 @@ if ( $opt{'disableable'} ) {
$opt{'query'}{'hashref'}{'disabled'} = '';
$opt{'query'}{'extra_sql'} =~ s/^\s*WHERE/ AND/i;
+ my $table = $opt{'query'}{'table'};
+
$opt{'count_query'} .=
( $opt{'count_query'} =~ /WHERE/i ? ' AND ' : ' WHERE ' ).
- "( disabled = '' OR disabled IS NULL )";
+ "( $table.disabled = '' OR $table.disabled IS NULL )";
} elsif ( $opt{'disabled_statuspos'}
|| $opt{'disabled_statuspos'} eq '0' ) { #add status column
@@ -360,12 +362,6 @@ unless ( $type =~ /^(csv|xml|\w*.xls)$/) {
s/^\s*SELECT\s*(.*?)\s+FROM\s/SELECT COUNT(*) FROM /i; #silly vim:/
}
- if ( $opt{disableable} && ! $cgi->param('showdisabled') ) {
- $opt{count_query} .=
- ( ( $opt{count_query} =~ /WHERE/i ) ? ' AND ' : ' WHERE ' ).
- "( disabled = '' OR disabled IS NULL )";
- }
-
unless ( $type eq 'html-print' ) {
#setup some pagination things if we're in html mode