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 <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2007-10-18 18:53:53 -05:00 committed by Joshua Ferraro
parent af466ca41a
commit 9578340d77
2 changed files with 33 additions and 11 deletions

View file

@ -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;

View file

@ -104,6 +104,30 @@
</tr>
<!-- /TMPL_IF -->
<!-- -->
<!-- TMPL_IF name="itemtypes_empty" -->
<tr>
<td>item type not defined</td>
<td>at least 1 item type must be defined</td>
</tr>
<!-- TMPL_ELSE -->
<tr>
<td>OK</td>
<td>at least 1 item type defined</td>
</tr>
<!-- /TMPL_IF -->
<!-- -->
<!-- TMPL_IF name="branches_empty" -->
<tr>
<td>branch not defined</td>
<td>at least 1 branch must be defined</td>
</tr>
<!-- TMPL_ELSE -->
<tr>
<td>OK</td>
<td>at least 1 branch defined</td>
</tr>
<!-- /TMPL_IF -->
<!-- -->
<!-- TMPL_IF name="biblionumber" -->
<tr>
<td>biblio and biblionumber</td>
@ -122,7 +146,7 @@
<td>there is a null value in a frameworkcode. Check the following tables<br />
<li>select * from marc_subfield_structure where frameworkcode is NULL</li>
<li>select * from marc_tag_structure where frameworkcode is NULL</li>
<li>select * from marc_biblio where frameworkcode is NULL</li></td>
</td>
</tr>
<!-- TMPL_ELSE -->
<tr>