]> git.koha-community.org Git - koha.git/commit
Bug 5529 Absence or Presence of lists not being reliably returned
authorColin Campbell <colin.campbell@ptfs-europe.com>
Thu, 7 Apr 2011 14:25:27 +0000 (16:25 +0200)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Sat, 16 Apr 2011 18:38:40 +0000 (14:38 -0400)
commit554f7f522158d65314a2da5f0266b132b8fab858
tree1694a751f71542eed7f2ed12c408a24af8866983
parenta358598d9c2a465c68201089d7c43d950748ed3f
Bug 5529 Absence or Presence of lists not being reliably returned

C4::VirtualShelves::GetRecentShelves contained some rather confused
code The contents of the requested list are returned in an arrayref
which was in its turn being wrapped needlessly in an array
As a result the returned array always consisted of a single element
irrespective of the number of lists.
Made the routine return the arrayref, which can now be tested directly
Unfortunately rather than fixing this we had previously coded around it
assuming it to be a "design" decision. Have amended other calls of
the subroutine resulting in some hopefully less obscure code

Fixed logic error in the results template which displayed new list
within a test for the presence of lists

Removed the offset parameter from the sql in the routine as it was hardcoded
to 0 i.e. the default value

Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 0cf2eccfe926f77753a2b948e2babf077e2975d3)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
C4/Auth.pm
C4/VirtualShelves.pm
C4/VirtualShelves/Page.pm
catalogue/search.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
virtualshelves/addbybiblionumber.pl