[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.8.2.1
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/authorities authorities.pl,1.8,1.8.2.1 |
Date: |
Thu, 28 Apr 2005 01:45:51 -0700 |
Update of /cvsroot/koha/koha/authorities
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8908/authorities
Modified Files:
Tag: rel_2_2
authorities.pl
Log Message:
porting FindDuplicate feature for authorities from HEAD to rel_2_2, works
correctly now.
Index: authorities.pl
===================================================================
RCS file: /cvsroot/koha/koha/authorities/authorities.pl,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** authorities.pl 2 Dec 2004 16:38:23 -0000 1.8
--- authorities.pl 28 Apr 2005 08:45:33 -0000 1.8.2.1
***************
*** 161,165 ****
sub build_tabs ($$$$) {
my($template, $record, $dbh,$encoding) = @_;
- # "=>".$record->as_formatted;
# fill arrays
my @loop_data =();
--- 161,164 ----
***************
*** 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") {
--- 334,359 ----
my $record =
AUTHhtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
# MARC::Record built => now, record in DB
! # check for a duplicate
! my ($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 (!$duplicateauthid or $confirm_not_duplicate) {
! if ($is_a_modif) {
! AUTHmodauthority($dbh,$authid,$record,$authtypecode);
! } else {
! ($authid) =
AUTHaddauthority($dbh,$record,$authid,$authtypecode);
! }
! # now, redirect to detail 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(
! duplicateauthid =>
$duplicateauthid,
! duplicateauthvalue =>
$duplicateauthvalue,
! );
}
#------------------------------------------------------------------------------------------------------------------------------
} elsif ($op eq "addfield") {
***************
*** 400,405 ****
}
! build_tabs ($template, $record, $dbh,$encoding);
! build_hidden_data;
$template->param(
authid => $authid,
--- 415,422 ----
}
! if ($authid) {
! build_tabs ($template, $record, $dbh,$encoding);
! build_hidden_data;
! }
$template->param(
authid => $authid,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/authorities authorities.pl,1.8,1.8.2.1,
Paul POULAIN <=