koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/admin checkmarc.pl,1.6,1.6.2.1


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/admin checkmarc.pl,1.6,1.6.2.1
Date: Mon, 06 Jun 2005 09:11:00 -0700

Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30805/admin

Modified Files:
      Tag: rel_2_2
        checkmarc.pl 
Log Message:
adding 2 new checkings for MARC setup :
* only 1 MARC tag must be mapped to item tab
* warning if there is NULL in a frameworkcode

Index: checkmarc.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/checkmarc.pl,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -r1.6 -r1.6.2.1
*** checkmarc.pl        22 Dec 2003 19:16:58 -0000      1.6
--- checkmarc.pl        6 Jun 2005 16:10:57 -0000       1.6.2.1
***************
*** 77,80 ****
--- 77,81 ----
  my $tab = $res2;
  my $subtotal=0;
+ warn "TAGF : $tagfield";
  while (($res,$res2,$field) = $sth->fetchrow) {
        # (ignore itemnumber, that must be in -1 tab)
***************
*** 97,100 ****
--- 98,118 ----
        $total++;
  }
+ 
+ $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure 
where tab = 10");
+ $sth->execute;
+ my $totaltags = 0;
+ my $list = "";
+ while (($res2) = $sth->fetchrow) {
+       $totaltags++;
+       $list.=$res2.",";
+ }
+ if ($totaltags > 1) {
+       $template->param(itemtags => $list);
+       $total++;
+ } else {
+       $template->param(itemtags => 0);
+ }
+ 
+ 
  # checks biblioitems.itemtype must be mapped and use authorised_value=itemtype
  $sth = $dbh->prepare("select tagfield,tab,authorised_value from 
marc_subfield_structure where kohafield = \"biblioitems.itemtype\"");
***************
*** 146,149 ****
--- 164,189 ----
  }
  
+ $sth = $dbh->prepare("select count(*) from marc_biblio where frameworkcode is 
NULL");
+ $sth->execute;
+ ($res) = $sth->fetchrow;
+ if ($res) {
+       $template->param(frameworknull =>1);
+       $total++;
+ }
+ $sth = $dbh->prepare("select count(*) from marc_subfield_structure where 
frameworkcode is NULL");
+ $sth->execute;
+ ($res) = $sth->fetchrow;
+ if ($res) {
+       $template->param(frameworknull =>1);
+       $total++;
+ }
+ $sth = $dbh->prepare("select count(*) from marc_tag_structure where 
frameworkcode is NULL");
+ $sth->execute;
+ ($res) = $sth->fetchrow;
+ if ($res) {
+       $template->param(frameworknull =>1);
+       $total++;
+ }
+ 
  $template->param(total => $total);
  output_html_with_http_headers $input, $cookie, $template->output;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]