Bug 9811: Remove useless orderby management
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 9 Jun 2014 15:35:15 +0000 (17:35 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 1 Jul 2014 12:59:00 +0000 (09:59 -0300)
I don't know what is this stuff. I didn't find a call to member.pl with
an orderby parameter.
I am not sure this is in used.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
members/member.pl

index ae7f06f..0d81448 100644 (file)
@@ -205,10 +205,10 @@ $(document).ready(function() {
         },
         'bFilter': false,
         'bAutoWidth': false,
-        [% IF orderby_cardnumber_0 %]
-            'aaSorting': [[0, 'asc']],
-        [% ELSE %]
+        [% IF CAN_user_tools_manage_patron_lists %]
             'aaSorting': [[1, 'asc']],
+        [% ELSE %]
+            'aaSorting': [[0, 'asc']],
         [% END %]
         "aLengthMenu": [aLengthMenu, aLengthMenuLabel],
         'sPaginationType': 'full_numbers',
index 9cefc79..cd80577 100755 (executable)
@@ -108,11 +108,6 @@ if ( $patron->{categorycode} ) {
 
 $template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' );
 
-my $orderby = $input->param('orderby') // '';
-if(defined $orderby and $orderby ne '') {
-    $orderby =~ s/[, ]/_/g;
-}
-
 my $view = $input->request_method() eq "GET" ? "show_form" : "show_results";
 
 $template->param(
@@ -124,7 +119,6 @@ $template->param(
     categorycode        => $patron->{categorycode},
     searchtype          => $input->param('searchtype') || 'start_with',
     searchfieldstype    => $searchfieldstype,
-    "orderby_$orderby"  => 1,
     PatronsPerPage      => C4::Context->preference("PatronsPerPage") || 20,
     view                => $view,
 );