[Koha-patches] [PATCH] Update holdings sort to sort by items.enumchron if there's no serial record and the biblio.serial flag is set.
Ryan Higgins
rch at liblime.com
Wed Jul 23 22:04:19 CEST 2008
---
C4/Items.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/C4/Items.pm b/C4/Items.pm
index fa31f52..74196e9 100644
--- a/C4/Items.pm
+++ b/C4/Items.pm
@@ -1261,7 +1261,7 @@ sub GetItemsInfo {
}
$sth->finish;
if($serial) {
- return( sort { $b->{'publisheddate'} cmp $a->{'publisheddate'} } @results );
+ return( sort { ($b->{'publisheddate'} || $b->{'enumchron'}) cmp ($a->{'publisheddate'} || $a->{'enumchron'}) } @results );
} else {
return (@results);
}
--
1.5.5.GIT
More information about the Koha-patches
mailing list