[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.105,1.106
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.105,1.106 |
Date: |
Tue, 02 Nov 2004 08:44:48 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8389/C4
Modified Files:
Biblio.pm
Log Message:
new feature : checking for duplicate biblio.
For instance, it's only done on ISBN only. Will be improved soon.
When a duplicate is detected, the biblio is not saved, but the user is asked
for a confirmations.
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -r1.105 -r1.106
*** Biblio.pm 23 Sep 2004 16:15:37 -0000 1.105
--- Biblio.pm 2 Nov 2004 16:44:45 -0000 1.106
***************
*** 68,71 ****
--- 68,73 ----
&MARCaddword &MARCdelword
&char_decode
+
+ &FindDuplicate
);
***************
*** 1095,1099 ****
$sth2->execute;
while (($field)=$sth2->fetchrow) {
- # warn "X";
$result=&MARCmarc2kohaOneField($sth,"items",$field,$record,$result,$frameworkcode);
}
--- 1097,1100 ----
***************
*** 2529,2532 ****
--- 2530,2543 ----
}
+ sub FindDuplicate {
+ my ($record)address@hidden;
+ my $dbh = C4::Context->dbh;
+ my $result = MARCmarc2koha($dbh,$record,'');
+ my $sth = $dbh->prepare("select biblio.biblionumber,bibid,title from
biblio,biblioitems,marc_biblio where
biblio.biblionumber=biblioitems.biblionumber and
marc_biblio.biblionumber=biblioitems.biblionumber and isbn=?");
+ $sth->execute($result->{'isbn'});
+ my ($biblionumber,$bibid,$title) = $sth->fetchrow;
+ return $biblionumber,$bibid,$title;
+ }
+
END { } # module clean-up code here (global destructor)
***************
*** 2543,2546 ****
--- 2554,2564 ----
# $Id$
# $Log$
+ # Revision 1.106 2004/11/02 16:44:45 tipaul
+ # new feature : checking for duplicate biblio.
+ #
+ # For instance, it's only done on ISBN only. Will be improved soon.
+ #
+ # When a duplicate is detected, the biblio is not saved, but the user is
asked for a confirmations.
+ #
# Revision 1.105 2004/09/23 16:15:37 tipaul
# indenting diff
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Biblio.pm,1.105,1.106,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/bull subscription-add.tmpl,1.6,1.7 subscription-detail.tmpl,1.5,1.6
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.32,1.33
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/bull subscription-add.tmpl,1.6,1.7 subscription-detail.tmpl,1.5,1.6
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple addbiblio.tmpl,1.32,1.33
- Index(es):