X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fsvc_www.cgi;h=7410262e89203a7abf2ab77b3557f001e6f1a476;hb=c0c5709fb022b83a482d0b35f7094505766d5868;hp=d9332e95d86b65b5084ba3f51f898ec91cc9e94b;hpb=a5d36cfea18a4cdb756a9270587c15946a6fd1e5;p=freeside.git diff --git a/httemplate/search/svc_www.cgi b/httemplate/search/svc_www.cgi index d9332e95d..7410262e8 100755 --- a/httemplate/search/svc_www.cgi +++ b/httemplate/search/svc_www.cgi @@ -1,4 +1,4 @@ -<% include( 'elements/search.html', +<& elements/svc_Common.html, 'title' => 'Virtual Host Search Results', 'name' => 'virtual hosts', 'query' => $sql_query, @@ -45,8 +45,8 @@ '', FS::UI::Web::cust_styles(), ], - ) -%> + +&> <%init> die "access denied" @@ -73,10 +73,12 @@ if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) { my $addl_from = ' LEFT JOIN cust_svc USING ( svcnum ) '. ' LEFT JOIN part_svc USING ( svcpart ) '. ' LEFT JOIN cust_pkg USING ( pkgnum ) '. - ' LEFT JOIN cust_main USING ( custnum ) '; + FS::UI::Web::join_cust_main('cust_pkg', 'cust_pkg'); #here is the agent virtualization -push @extra_sql, $FS::CurrentUser::CurrentUser->agentnums_sql; +push @extra_sql, $FS::CurrentUser::CurrentUser->agentnums_sql( + 'null_right' => 'View/link unlinked services' + ); my $extra_sql = scalar(@extra_sql) @@ -94,7 +96,8 @@ my $sql_query = { 'cust_main.custnum', FS::UI::Web::cust_sql_fields(), ), - 'extra_sql' => "$extra_sql $orderby", + 'extra_sql' => $extra_sql, + 'order_by' => $orderby, 'addl_from' => $addl_from, };