[Koha-patches] [PATCH] Fix to ORDER BY SQL in lists feature

David Birmingham dbirmingham at ptfs.com
Wed Oct 7 23:27:35 CEST 2009


---
 C4/VirtualShelves.pm |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm
index 06bd3a3..4156bbb 100644
--- a/C4/VirtualShelves.pm
+++ b/C4/VirtualShelves.pm
@@ -276,9 +276,8 @@ sub GetShelfContents ($;$$$) {
          WHERE  vc.shelfnumber=? ";
 	my @params = ($shelfnumber);
 	if($sortfield) {
-		$query .= " ORDER BY ? ";
+		$query .= " ORDER BY " . $sortfield;
 		$query .= " DESC " if ($sortfield eq 'copyrightdate');
-		push (@params, $sortfield);
 	}
     if($row_count){
 	   $query .= " LIMIT ?, ? ";
-- 
1.5.6.5




More information about the Koha-patches mailing list