From f39f1e626b8496d34ada34f64df355f31d956086 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 9 Dec 2010 06:40:26 +0000 Subject: [PATCH] Give the recent_changes list the ability to sort authority records correctly We were always sorting by bibliographic record entry, which does not work all that well for authority records. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18940 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm index f88ad6cd12..2f52bdf7a5 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm @@ -1974,7 +1974,12 @@ sub recent_changes { my $limit = shift; my $type = 'biblio'; - $type = 'authority' if ($self->api_name =~ /authority/o); + my $hint = 'bre'; + + if ($self->api_name =~ /authority/o) { + $type = 'authority'; + $hint = 'are'; + } my $axis = 'create_date'; $axis = 'edit_date' if ($self->api_name =~ /edit/o); @@ -1984,7 +1989,7 @@ sub recent_changes { return $_storage->request( "open-ils.cstore.direct.$type.record_entry.id_list.atomic", { $axis => { ">" => $when }, id => { '>' => 0 } }, - { order_by => { bre => "$axis desc" }, limit => $limit } + { order_by => { $hint => "$axis desc" }, limit => $limit } )->gather(1); } -- 2.11.0