allow url-based sort/dir to work
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 15 Mar 2008 03:33:56 +0000 (03:33 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 15 Mar 2008 03:33:56 +0000 (03:33 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9033 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm

index 48f7476..bf3fe17 100644 (file)
@@ -959,8 +959,10 @@ sub opensearch_feed {
        $lang = $cgi->param('searchLang') if $cgi->param('searchLang');
        $lang = '' if ($lang eq '*');
 
        $lang = $cgi->param('searchLang') if $cgi->param('searchLang');
        $lang = '' if ($lang eq '*');
 
-       $sort = $cgi->param('searchSort') || '';
-       $sortdir = $cgi->param('searchSortDir') || '';
+       $sort = $cgi->param('searchSort') if $cgi->param('searchSort');
+       $sort ||= '';
+       $sortdir = $cgi->param('searchSortDir') if $cgi->param('searchSortDir');
+       $sortdir ||= '';
 
        $terms .= " " if ($terms);
        $terms .= $cgi->param('searchTerms') if $cgi->param('searchTerms');
 
        $terms .= " " if ($terms);
        $terms .= $cgi->param('searchTerms') if $cgi->param('searchTerms');