[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/authorities authorities.pl,1.8,1.9
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/authorities authorities.pl,1.8,1.9 |
Date: |
Tue, 05 Apr 2005 02:58:51 -0700 |
Update of /cvsroot/koha/koha/authorities
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1330/authorities
Modified Files:
authorities.pl
Log Message:
Adding double authority search before creating a new authority
Index: authorities.pl
===================================================================
RCS file: /cvsroot/koha/koha/authorities/authorities.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** authorities.pl 2 Dec 2004 16:38:23 -0000 1.8
--- authorities.pl 5 Apr 2005 09:58:48 -0000 1.9
***************
*** 335,344 ****
my $record =
AUTHhtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
# MARC::Record built => now, record in DB
! if ($is_a_modif) {
! AUTHmodauthority($dbh,$authid,$record,$authtypecode);
} else {
! ($authid) =
AUTHaddauthority($dbh,$record,$authid,$authtypecode);
}
- print $input->redirect("detail.pl?authid=$authid");
#------------------------------------------------------------------------------------------------------------------------------
} elsif ($op eq "addfield") {
--- 335,362 ----
my $record =
AUTHhtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
# MARC::Record built => now, record in DB
! # check for a duplicate
! my ($duplicateauthnumber,$duplicateauthid,$duplicateauthvalue) =
FindDuplicate($record,$authtypecode) if ($op eq "add") && (!$is_a_modif);
! my $confirm_not_duplicate = $input->param('confirm_not_duplicate');
! # it is not a duplicate (determined either by Koha itself or by user
checking it's not a duplicate)
! if (!$duplicateauthnumber or $confirm_not_duplicate) {
! # MARC::Record built => now, record in DB
! if ($is_a_modif) {
! AUTHmodauthority($dbh,$authid,$record,$authtypecode);
! } else {
! ($authid) =
AUTHaddauthority($dbh,$record,$authid,$authtypecode);
! }
! # now, redirect to additem page
! print $input->redirect("detail.pl?authid=$authid");
! exit;
} else {
! # it may be a duplicate, warn the user and do nothing
! # build_tabs ($template, $record, $dbh,$encoding);
! # build_hidden_data;
! $template->param(
! duplicateauthnumber => $duplicateauthnumber,
! duplicateauthid =>
$duplicateauthid,
! duplicateauthvalue =>
$duplicateauthvalue,
! );
}
#------------------------------------------------------------------------------------------------------------------------------
} elsif ($op eq "addfield") {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/authorities authorities.pl,1.8,1.9,
Henri-Damien LAURENT <=