X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch.html;h=730a51aa3dd15522f4f9a664e4855a875e54d5d9;hb=3f2a7b01b59902faed5767d81e2959e131bdbdfd;hp=1e9ce5cdeb6c35ef356f2d42ef7ca6690559c07b;hpb=d2e3299a0af2b5122d73b9f3ca0814a36919b1da;p=freeside.git diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index 1e9ce5cde..730a51aa3 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -33,13 +33,8 @@ Example: }, # "select * from tablename"; -<<<<<<< HEAD #required (now even if 'query' is an SQL query string) -======= - - #required unless 'query' is an SQL query string (shouldn't be...) ->>>>>>> 95144265eeb3ecd13b16708dbdd75dd3701f92ad 'count_query' => 'SELECT COUNT(*) FROM tablename', ### @@ -124,7 +119,11 @@ Example: #(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 @@ -223,6 +222,8 @@ my(%opt) = @_; 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' ; @@ -388,14 +389,15 @@ unless ( $type =~ /^(csv|xml|\w*.xls)$/) { #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" : '';