projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
v4 style
[freeside.git]
/
httemplate
/
search
/
elements
/
search.html
diff --git
a/httemplate/search/elements/search.html
b/httemplate/search/elements/search.html
index
5762afb
..
730a51a
100644
(file)
--- a/
httemplate/search/elements/search.html
+++ b/
httemplate/search/elements/search.html
@@
-119,7
+119,11
@@
Example:
#(query needs to be a qsearch hashref and
# header & fields need to be defined)
#(query needs to be a qsearch hashref and
# header & fields need to be defined)
- #handling agent virtualization
+ # Agent Virtualization parameters:
+ # In this context, only available if your selected table has agentnum.
+ # You must also include agentnum as a SELECT column in your SQL query,
+ # or experience non-obvious problems
+ #
'agent_virt' => 1, # set true if this search should be
# agent-virtualized
'agent_null' => 1, # set true to view global records always
'agent_virt' => 1, # set true if this search should be
# agent-virtualized
'agent_null' => 1, # set true to view global records always
@@
-218,6
+222,8
@@
my(%opt) = @_;
my $curuser = $FS::CurrentUser::CurrentUser;
my $curuser = $FS::CurrentUser::CurrentUser;
+$m->comp('/elements/handle_uri_query');
+
my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|xml|select|html(-print)?)$/
? $1 : 'html' ;
my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|xml|select|html(-print)?)$/
? $1 : 'html' ;
@@
-383,14
+389,15
@@
unless ( $type =~ /^(csv|xml|\w*.xls)$/) {
#setup some pagination things if we're in html mode
my $conf = new FS::Conf;
#setup some pagination things if we're in html mode
my $conf = new FS::Conf;
- $confmax = $conf->config('maxsearchrecordsperpage') || 100;
- if ( $cgi->param('maxrecords') =~ /^(\d+)$/ ) {
- $maxrecords = $1;
- } else {
- $maxrecords ||= $confmax;
- }
-
$opt{'disable_maxselect'} ||= $conf->exists('disable_maxselect');
$opt{'disable_maxselect'} ||= $conf->exists('disable_maxselect');
+ unless ($opt{'disable_maxselect'}) {
+ $confmax = $conf->config('maxsearchrecordsperpage') || 100;
+ if ( $cgi->param('maxrecords') =~ /^(\d+)$/ ) {
+ $maxrecords = $1;
+ } else {
+ $maxrecords ||= $confmax;
+ }
+ }
$limit = $maxrecords ? "LIMIT $maxrecords" : '';
$limit = $maxrecords ? "LIMIT $maxrecords" : '';