From 9578340d77d7cffc883d141d83901f397a6c6ba2 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 18 Oct 2007 18:53:53 -0500 Subject: [PATCH] fix for bug 1501 - removed reference to marc_biblio from framework test Also added results of two subtests missing from the template. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- admin/checkmarc.pl | 18 ++++++------- .../prog/en/modules/admin/checkmarc.tmpl | 26 ++++++++++++++++++- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/admin/checkmarc.pl b/admin/checkmarc.pl index e5df99b2da..6fb4a946f6 100755 --- a/admin/checkmarc.pl +++ b/admin/checkmarc.pl @@ -38,7 +38,7 @@ my ($template, $borrowernumber, $cookie) }); my $dbh = C4::Context->dbh; -my $total; +my $total = 0; # checks itemnum field my $sth = $dbh->prepare("select tab from marc_subfield_structure where kohafield=\"items.itemnumber\""); $sth->execute; @@ -148,26 +148,24 @@ if ($res && $res2 eq 10 && $field eq "branches") { $sth = $dbh->prepare("select count(*) from itemtypes"); $sth->execute; ($res) = $sth->fetchrow; -unless ($res) { +if ($res) { + $template->param(itemtypes_empty =>0); +} else { $template->param(itemtypes_empty =>1); $total++; } + $sth = $dbh->prepare("select count(*) from branches"); $sth->execute; ($res) = $sth->fetchrow; -unless ($res) { +if ($res) { + $template->param(branches_empty =>0); +} else { $template->param(branches_empty =>1); $total++; } -$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; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl index 27f526bbfc..81a04cb8a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl @@ -104,6 +104,30 @@ + + + item type not defined + at least 1 item type must be defined + + + + OK + at least 1 item type defined + + + + + + branch not defined + at least 1 branch must be defined + + + + OK + at least 1 branch defined + + + biblio and biblionumber @@ -122,7 +146,7 @@ there is a null value in a frameworkcode. Check the following tables
  • select * from marc_subfield_structure where frameworkcode is NULL
  • select * from marc_tag_structure where frameworkcode is NULL
  • -
  • select * from marc_biblio where frameworkcode is NULL
  • + -- 2.39.5