From 4d73edcd8a78d4c864f20b810b4f5f04bbbea5e5 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Tue, 16 Oct 2007 16:02:46 -0500 Subject: [PATCH] bugfix for top issues, for branch selector Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- opac/opac-topissues.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index 53ee77b8c6..cc3a716c58 100755 --- a/opac/opac-topissues.pl +++ b/opac/opac-topissues.pl @@ -57,9 +57,9 @@ my $branch = $input->param('branch'); my $itemtype = $input->param('itemtype'); my $timeLimit = $input->param('timeLimit') || 3; my $whereclause; -$whereclause .= 'items.homebranch='.$dbh->quote($branch)." AND " if ($branch); +$whereclause .= 'items.homebranch='.$dbh->quote($branch)." AND " if ($branch); $whereclause .= 'biblioitems.itemtype='.$dbh->quote($itemtype)." AND " if $itemtype; -$whereclause .= 'TO_DAYS(NOW()) - TO_DAYS(biblio.datecreated) <= '.$timeLimit*30 if $timeLimit < 999; +$whereclause .= ' TO_DAYS(NOW()) - TO_DAYS(biblio.datecreated) <= '.($timeLimit*30).' AND ' if $timeLimit < 999; $whereclause =~ s/ AND $//; $whereclause = " WHERE ".$whereclause if $whereclause; @@ -100,7 +100,7 @@ for my $branch_hash (sort keys %$branches ) { my $selected=(C4::Context->userenv && ($branch_hash eq C4::Context->userenv->{branch})) if (C4::Context->preference('SearchMyLibraryFirst')); push @branch_loop, { - value => "branch: $branch_hash", + value => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, selected => $selected }; -- 2.39.5