[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Authorities.pm,1.6,1.7
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Authorities.pm,1.6,1.7 |
Date: |
Mon, 15 Dec 2003 06:39:01 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv5386/C4
Modified Files:
Authorities.pm
Log Message:
fixing bug that duplicates entries under certain circumstances
Index: Authorities.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Authorities.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Authorities.pm 3 Dec 2003 11:41:04 -0000 1.6
--- Authorities.pm 15 Dec 2003 14:38:59 -0000 1.7
***************
*** 87,90 ****
--- 87,91 ----
my
($dbh,$category,$stdlib,$freelib,$father,$level,$hierarchy)address@hidden;
exit unless ($stdlib);
+ $level=1 unless $level;
$freelib = $stdlib unless ($freelib);
my $dbh = C4::Context->dbh;
***************
*** 111,115 ****
if ($#Thierarchy >=0) {
# free form
- $level='' unless $level;
$hierarchy='' unless $hierarchy;
$sth1b->execute($freelib,$hierarchy,$category);
--- 112,115 ----
***************
*** 122,125 ****
--- 122,126 ----
$freelib =~ s/\s+$//;
$sth2->execute($category,$Thierarchy[$#Thierarchy],$#Fhierarchy==$#Thierarchy?$Fhierarchy[$#Fhierarchy]:$freelib,$father,$level,$hierarchy);
+ } else {
}
# authority form
***************
*** 129,135 ****
$Thierarchy[$#Thierarchy] =~ s/^\s+//;
$Thierarchy[$#Thierarchy] =~ s/\s+$//;
-
$sth2->execute($category,$Thierarchy[$#Thierarchy],$Thierarchy[$#Thierarchy],$father,$level,$hierarchy);
$sth1b->execute($stdlib,$hierarchy,$category);
($id) = $sth1b->fetchrow;
}
}
--- 130,138 ----
$Thierarchy[$#Thierarchy] =~ s/^\s+//;
$Thierarchy[$#Thierarchy] =~ s/\s+$//;
$sth1b->execute($stdlib,$hierarchy,$category);
($id) = $sth1b->fetchrow;
+ unless ($id) {
+
$sth2->execute($category,$Thierarchy[$#Thierarchy],$Thierarchy[$#Thierarchy],$father,$level,$hierarchy);
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Authorities.pm,1.6,1.7,
Paul POULAIN <=