From 5b754c19274f7663817e2b6fd8b86a2d6c4be890 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Fri, 2 Oct 2009 16:06:13 +0200 Subject: [PATCH] Function GetRecentShelves modified so it can tell "koha" user and no user apart --- C4/VirtualShelves.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 9488555c94..eda6840cbc 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -204,9 +204,9 @@ sub GetRecentShelves ($$$) { my (@shelflist); my $total = _shelf_count($owner, $mincategory); my @params = ($owner, $mincategory, 0, $row_count); #FIXME: offset is hardcoded here, but could be passed in for enhancements - shift @params if !$owner; + shift @params if (not defined $owner); my $query = "SELECT * FROM virtualshelves"; - $query .= ($owner ? " WHERE owner = ? AND category = ?" : " WHERE category >= ? "); + $query .= ((defined $owner) ? " WHERE owner = ? AND category = ?" : " WHERE category >= ? "); $query .= " ORDER BY lastmodified DESC LIMIT ?, ?"; my $sth = $dbh->prepare($query); $sth->execute(@params); -- 2.39.5