View | Details | Raw Unified | Return to bug 23655
Collapse All | Expand All

(-)a/about.pl (-4 / +3 lines)
Lines 474-491 $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; Link Here
474
474
475
    $bad_relationships_count = $bad_relationships_count->[0]->[0];
475
    $bad_relationships_count = $bad_relationships_count->[0]->[0];
476
476
477
    my @existing_relationships = $dbh->selectall_array(q{
477
    my $existing_relationships = $dbh->selectall_arrayref(q{
478
        SELECT DISTINCT(relationship)
478
        SELECT DISTINCT(relationship)
479
        FROM (
479
        FROM (
480
            SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL
480
            SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL
481
            UNION ALL
481
            UNION ALL
482
            SELECT relationship FROM borrowers WHERE relationship IS NOT NULL) a
482
            SELECT relationship FROM borrowers WHERE relationship IS NOT NULL) a
483
    });
483
    }, { Slice => {} });
484
484
485
    my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') );
485
    my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') );
486
    $valid_relationships{ _bad_data } = 1; # we handle this case in another way
486
    $valid_relationships{ _bad_data } = 1; # we handle this case in another way
487
487
488
    my @wrong_relationships = grep { !$valid_relationships{ $_->[0] } } @existing_relationships;
488
    my @wrong_relationships = grep { !$valid_relationships{ $_->[0] } } @{$existing_relationships};
489
489
490
    if ( @wrong_relationships or $bad_relationships_count ) {
490
    if ( @wrong_relationships or $bad_relationships_count ) {
491
491
492
- 

Return to bug 23655