[Koha-patches] [PATCH] Bug 3698 - Improves OPAC shelf browsing for duplicate itemcallnumbers
Frédéric Demians
f.demians at tamil.fr
Wed Oct 7 15:28:30 CEST 2009
OPAC shelf browsing is 'inaccurate' when there are a lot of duplicate
itemcallnumbers. Next items have same cn_sort (normalized
itemcallnumber) and increasing itemnumber. So it would be expected
that previous items have same cn_sort and decreasing itemnumber. This
is not the case.
---
opac/opac-detail.pl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index c3b104b..2f937ab 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -437,7 +437,7 @@ if (C4::Context->preference("OPACShelfBrowser")) {
WHERE
((cn_sort = ? AND itemnumber < ?) OR cn_sort < ?) AND
homebranch = ? AND location = ?
- ORDER BY cn_sort DESC, itemnumber LIMIT 3
+ ORDER BY cn_sort DESC, itemnumber DESC LIMIT 3
");
$sth_shelfbrowse_previous->execute($starting_cn_sort, $starting_itemnumber, $starting_cn_sort, $starting_homebranch->{code}, $starting_location->{code});
} else {
@@ -447,7 +447,7 @@ if (C4::Context->preference("OPACShelfBrowser")) {
WHERE
((cn_sort = ? AND itemnumber < ?) OR cn_sort < ?) AND
homebranch = ?
- ORDER BY cn_sort DESC, itemnumber LIMIT 3
+ ORDER BY cn_sort DESC, itemnumber DESC LIMIT 3
");
$sth_shelfbrowse_previous->execute($starting_cn_sort, $starting_itemnumber, $starting_cn_sort, $starting_homebranch->{code});
}
--
1.6.4.3
More information about the Koha-patches
mailing list