From bb8aa23730ac7800b4b1daf998a0b1dc4541684f Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Wed, 7 Nov 2007 15:46:17 -0600 Subject: [PATCH] fix typos on syspref Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Biblio.pm | 8 ++++---- C4/Overdues.pm | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index fc0f8e71d1..e9067bcdb9 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -258,7 +258,7 @@ sub AddItem { $sth = $dbh->prepare( "SELECT notforloan FROM itemtypes WHERE itemtype=?"); - $sth->execute( C4::Context->preference('item-level_itype') ? $item->{'ccode'} : $itemtype ); + $sth->execute( C4::Context->preference('item-level_itypes') ? $item->{'ccode'} : $itemtype ); my $notforloan = $sth->fetchrow; ##Change the notforloan field if $notforloan found if ( $notforloan > 0 ) { @@ -652,7 +652,7 @@ sub GetBiblioData { my ( $bibnum ) = @_; my $dbh = C4::Context->dbh; - my $query = C4::Context->preference('item-level_itype') + my $query = C4::Context->preference('item-level_itypes') ? " SELECT * , biblioitems.notes AS bnotes, itemtypes.notforloan as bi_notforloan, biblio.notes FROM biblio LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber @@ -732,7 +732,7 @@ sub GetItemsInfo { FROM items LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber"; - $query .= (C4::Context->preference('item-level_itype')) ? + $query .= (C4::Context->preference('item-level_itypes')) ? " LEFT JOIN itemtypes on items.ccode = itemtypes.itemtype " : " LEFT JOIN itemtypes on biblioitems.itemtype = itemtypes.itemtype "; $query .= "WHERE items.biblionumber = ? ORDER BY items.dateaccessioned desc" ; @@ -1142,7 +1142,7 @@ sub GetBiblioItemData { my $dbh = C4::Context->dbh; my $query = "SELECT *,biblioitems.notes AS bnotes FROM biblio, biblioitems "; - if(C4::Context->preference('item-level_itype')) { + if(C4::Context->preference('item-level_itypes')) { $query .= "LEFT JOIN itemtypes on biblioitems.itemtype=itemtypes.itemtype "; } $query .= " WHERE biblio.biblionumber = biblioitems.biblionumber diff --git a/C4/Overdues.pm b/C4/Overdues.pm index fb9305b0cb..bad617e3b8 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -115,8 +115,7 @@ Koha database. #' sub Getoverdues { my $dbh = C4::Context->dbh; - my $itype_q = (C4::context->preference('item-level_itype')) ? " items.ccode as itemtype " - my $sth = (C4::context->preference('item-level_itype')) ? + my $sth = (C4::context->preference('item-level_itypes')) ? $dbh->prepare( "SELECT issues.*,items.ccode as itemtype FROM issues LEFT JOIN items USING (itemnumber) @@ -1150,7 +1149,7 @@ display is filtered by branch sub GetOverduesForBranch { my ( $branch, $location) = @_; - my $itype_link = (C4::context->preference('item-level_itype')) ? " items.ccode " : " biblioitems.itemtype "; + my $itype_link = (C4::context->preference('item-level_itypes')) ? " items.ccode " : " biblioitems.itemtype "; if ( not $location ) { my $dbh = C4::Context->dbh; my $sth = $dbh->prepare(" -- 2.39.5