--- loncom/interface/lonsearchcat.pm 2001/03/27 13:25:41 1.82 +++ loncom/interface/lonsearchcat.pm 2001/03/27 13:35:35 1.83 @@ -560,15 +560,23 @@ sub advancedsearch { $customquery=&build_custommetadata_query('custommetadata', $ENV{'form.custommetadata'}); } + my $customshow=''; + if ($ENV{'form.customshow'}) { + $customshow=$ENV{'form.customshow'}; + $customshow=~s/[^\w\s]//g; + my @fields=split(/\s+/,$customshow); + $customshow=join(" ",@fields); + } if (@queries) { $query=join(" AND ",@queries); $query="select * from metadata where $query"; my $reply=''; - unless ($customquery) { + unless ($customquery or $customshow) { $reply=&Apache::lonnet::metadata_query($query); } else { - $reply=&Apache::lonnet::metadata_query($query,$customquery); + $reply=&Apache::lonnet::metadata_query($query, + $customquery,$customshow); } &output_results('Advanced',$r,$envhash,$customquery,$reply); }