projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
httemplate
/
search
/
elements
/
search.html
diff --git
a/httemplate/search/elements/search.html
b/httemplate/search/elements/search.html
index
3fb1e3e
..
62a0e47
100644
(file)
--- 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;
$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 ' ).
$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
} 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:/
}
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
unless ( $type eq 'html-print' ) {
#setup some pagination things if we're in html mode