From: miker Date: Sat, 15 Mar 2008 03:50:41 +0000 (+0000) Subject: minor cleanup; allow numeric OUs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=19410998019f5146f7f43b304cb0badc7c96b797;p=Evergreen.git minor cleanup; allow numeric OUs git-svn-id: svn://svn.open-ils.org/ILS/trunk@9034 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index bf3fe17223..d485403d58 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -964,7 +964,7 @@ sub opensearch_feed { $sortdir = $cgi->param('searchSortDir') if $cgi->param('searchSortDir'); $sortdir ||= ''; - $terms .= " " if ($terms); + $terms .= " " if ($terms && $cgi->param('searchTerms')); $terms .= $cgi->param('searchTerms') if $cgi->param('searchTerms'); $class = $cgi->param('searchClass') if $cgi->param('searchClass'); @@ -1026,10 +1026,14 @@ sub opensearch_feed { $org_unit = $actor->request( 'open-ils.actor.org_unit_list.search' => parent_ou => undef )->gather(1); - } else { + } elsif ($org !~ /^\d+$/o) { $org_unit = $actor->request( 'open-ils.actor.org_unit_list.search' => shortname => uc($org) )->gather(1); + } else { + $org_unit = $actor->request( + 'open-ils.actor.org_unit_list.search' => id => $org + )->gather(1); } my $recs = $search->request( @@ -1037,6 +1041,8 @@ sub opensearch_feed { org_unit => $org_unit->[0]->id, offset => $offset - 1, limit => $limit, + sort => $sort, + sort_dir => $sortdir, ($lang ? ( 'language' => $lang ) : ()), } => $terms => 1 )->gather(1);