---
 catalogue/search.pl |    2 +-
 opac/opac-search.pl |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/catalogue/search.pl b/catalogue/search.pl
index e49507e..b9f9ed3 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -294,7 +294,7 @@ if ( $template_type eq 'advsearch' ) {
         my $default_sort_by =
             C4::Context->preference('defaultSortField') . '_'
           . C4::Context->preference('defaultSortOrder');
-        $template->param( $default_sort_by => 1 );
+        $template->param( sort_by => $default_sort_by  );
     }
 
     # determine what to display next to the search boxes (ie, boolean option
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 81b7ce6..8f6b67a 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -198,7 +198,6 @@ $template->param(itemtypeloop => \@itemtypesloop);
 
 # The following should only be loaded if we're bringing up the advanced search 
template
 if ( $template_type && $template_type eq 'advsearch' ) {
-
     # load the servers (used for searching -- to do federated searching, etc.)
     my $primary_servers_loop;# = displayPrimaryServers();
     $template->param(outer_servers_loop =>  $primary_servers_loop,);
@@ -212,7 +211,7 @@ if ( $template_type && $template_type eq 'advsearch' ) {
         my $default_sort_by =
             C4::Context->preference('OPACdefaultSortField') . '_'
           . C4::Context->preference('OPACdefaultSortOrder');
-        $template->param( $default_sort_by => 1 );
+        $template->param( sort_by => $default_sort_by );
     }
 
     # determine what to display next to the search boxes (ie, boolean option
-- 
1.7.4.1

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to