#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');
+ unless ($opt{'disable_maxselect'}) {
+ $confmax = $conf->config('maxsearchrecordsperpage') || 100;
+ if ( $cgi->param('maxrecords') =~ /^(\d+)$/ ) {
+ $maxrecords = $1;
+ } else {
+ $maxrecords ||= $confmax;
+ }
+ }
$limit = $maxrecords ? "LIMIT $maxrecords" : '';