Bug 8719: Private lists always sorted by title
authorAdrien Saurat <adrien.saurat@biblibre.com>
Tue, 4 Sep 2012 11:59:35 +0000 (13:59 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 14 Sep 2012 09:30:29 +0000 (11:30 +0200)
Virtualshelves:
The private lists were sorted by title, even when author or date was selected.
This patch corrects this behaviour.

Signed-off-by: Marc Veron <veron@veron.ch>

With this patch lists sort as expected.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

C4/VirtualShelves/Page.pm

index c765cf0..988244c 100644 (file)
@@ -251,7 +251,7 @@ sub shelfpage {
                 my $authorsort;
                 my $yearsort;
                 my $tag_quantity;
-                my $sortfield = ( $query->param('sortfield') ? $query->param('sortfield') : 'title' );
+                my $sortfield = ( $sorton ? $sorton : 'title' );
                 if ( $sortfield eq 'author' ) {
                     $authorsort = 'author';
                 }