[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.36.2.10,1.36.2.11

Paul POULAIN tipaul at users.sourceforge.net
Mon Jun 6 17:23:38 CEST 2005


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6460/C4

Modified Files:
      Tag: rel_2_2
	SearchMarc.pm 
Log Message:
adding a systempref to choose either to show or hide "lost" items. Note that "lost items" can be related to an authorised value list, so does not necessary mean "item definetly lost". Even here, some libraries want to see lost items, and some don't want. This parameter will make everybody happy !

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.36.2.10
retrieving revision 1.36.2.11
diff -C2 -r1.36.2.10 -r1.36.2.11
*** SearchMarc.pm	21 May 2005 03:11:04 -0000	1.36.2.10
--- SearchMarc.pm	6 Jun 2005 15:23:35 -0000	1.36.2.11
***************
*** 274,278 ****
  	my ($sql_tables, $sql_where1, $sql_where2) = create_request($dbh,\@normal_tags, \@normal_and_or, \@normal_operator, \@normal_value);
  
! 	$sql_where1 .= "and TO_DAYS( NOW( ) ) - TO_DAYS( biblio.timestamp ) <30" if $orderby =~ "biblio.timestamp";
  	my $sth;
  	if ($sql_where2) {
--- 274,278 ----
  	my ($sql_tables, $sql_where1, $sql_where2) = create_request($dbh,\@normal_tags, \@normal_and_or, \@normal_operator, \@normal_value);
  
! 	$sql_where1 .= "and TO_DAYS( NOW( ) ) - TO_DAYS( biblio.timestamp ) <300" if $orderby =~ "biblio.timestamp";
  	my $sth;
  	if ($sql_where2) {
***************
*** 336,340 ****
  	# HINT : biblionumber as bn is important. The hash is fills biblionumber with items.biblionumber.
  	# so if you dont' has an item, you get a not nice empty value.
! 	$sth = $dbh->prepare("SELECT biblio.biblionumber as bn,biblio.*, biblioitems.*,marc_biblio.bibid,itemtypes.notforloan,itemtypes.description
  							FROM biblio, marc_biblio 
  							LEFT JOIN biblioitems on biblio.biblionumber = biblioitems.biblionumber
--- 336,340 ----
  	# HINT : biblionumber as bn is important. The hash is fills biblionumber with items.biblionumber.
  	# so if you dont' has an item, you get a not nice empty value.
! 	$sth = $dbh->prepare("SELECT biblio.biblionumber as bn,biblioitems.*,biblio.*, marc_biblio.bibid,itemtypes.notforloan,itemtypes.description
  							FROM biblio, marc_biblio 
  							LEFT JOIN biblioitems on biblio.biblionumber = biblioitems.biblionumber
***************
*** 347,351 ****
  	my $oldline;
  	my ($oldbibid, $oldauthor, $oldtitle);
! 	my $sth_itemCN = $dbh->prepare("select items.* from items where biblionumber=? and (itemlost = 0 or itemlost is NULL)");
  	my $sth_issue = $dbh->prepare("select date_due,returndate from issues where itemnumber=?");
  	# parse all biblios between start & end.
--- 347,356 ----
  	my $oldline;
  	my ($oldbibid, $oldauthor, $oldtitle);
! 	my $sth_itemCN;
! 	if (C4::Context->preference('hidelostitem')) {
! 		$sth_itemCN = $dbh->prepare("select items.* from items where biblionumber=? and (itemlost = 0 or itemlost is NULL)");
! 	} else {
! 		$sth_itemCN = $dbh->prepare("select items.* from items where biblionumber=?");
! 	}
  	my $sth_issue = $dbh->prepare("select date_due,returndate from issues where itemnumber=?");
  	# parse all biblios between start & end.





More information about the Koha-cvs mailing list