|
Lines 496-512
$template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
Link Here
|
| 496 |
{ |
496 |
{ |
| 497 |
my $dbh = C4::Context->dbh; |
497 |
my $dbh = C4::Context->dbh; |
| 498 |
my ($bad_relationships_count) = $dbh->selectall_arrayref(q{ |
498 |
my ($bad_relationships_count) = $dbh->selectall_arrayref(q{ |
| 499 |
SELECT COUNT(*) |
499 |
SELECT COUNT(*) FROM borrower_relationships WHERE relationship='_bad_data' |
| 500 |
FROM ( |
|
|
| 501 |
SELECT relationship FROM borrower_relationships WHERE relationship='_bad_data' |
| 502 |
}); |
500 |
}); |
| 503 |
|
501 |
|
| 504 |
$bad_relationships_count = $bad_relationships_count->[0]->[0]; |
502 |
$bad_relationships_count = $bad_relationships_count->[0]->[0]; |
| 505 |
|
503 |
|
| 506 |
my $existing_relationships = $dbh->selectall_arrayref(q{ |
504 |
my $existing_relationships = $dbh->selectall_arrayref(q{ |
| 507 |
SELECT DISTINCT(relationship) |
505 |
SELECT DISTINCT(relationship) FROM borrower_relationships WHERE relationship IS NOT NULL |
| 508 |
FROM ( |
|
|
| 509 |
SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL |
| 510 |
}); |
506 |
}); |
| 511 |
|
507 |
|
| 512 |
my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') ); |
508 |
my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') ); |
| 513 |
- |
|
|