[Koha-cvs] CVS: koha/admin checkmarc.pl,1.3,1.4
Paul POULAIN
tipaul at users.sourceforge.net
Fri Jul 4 15:24:54 CEST 2003
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv22679/admin
Modified Files:
checkmarc.pl
Log Message:
Checking that all fields mapped to the item marc field (995 in UNIMARC) are mapped to a field in items SQL-table.
Previously, you had a warning only if fields mapped to item SQL-table was in more than 1 item marc field.
Index: checkmarc.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/checkmarc.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** checkmarc.pl 2 Feb 2003 07:18:38 -0000 1.3
--- checkmarc.pl 4 Jul 2003 13:24:52 -0000 1.4
***************
*** 69,72 ****
--- 69,73 ----
# checks all item fields are in the same tag and in tab 10
+
$sth = $dbh->prepare("select tagfield,tab,kohafield from marc_subfield_structure where kohafield like \"items.%\"");
$sth->execute;
***************
*** 82,85 ****
--- 83,94 ----
}
}
+ $sth = $dbh->prepare("select kohafield from marc_subfield_structure where tagfield=$tagfield");
+ $sth->execute;
+ while (($res2) = $sth->fetchrow) {
+ if (!$res2 || $res2 =~ /^items/) {
+ } else {
+ $subtotal++;
+ }
+ }
if ($subtotal eq 0) {
$template->param(itemfields => 0);
***************
*** 92,96 ****
$sth->execute;
($res,$res2,$field) = $sth->fetchrow;
- warn "==> $res / $res2 / $field";
if ($res && $res2>=0 && $field eq "itemtypes") {
$template->param(itemtype => 0);
--- 101,104 ----
More information about the Koha-cvs
mailing list