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

(-)a/about.pl (-7 / +5 lines)
Lines 474-480 $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_arrayref(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
Lines 485-501 $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; Link Here
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
    if ( $wrong_relationships or $bad_relationships_count ) {
490
    if ( @wrong_relationships or $bad_relationships_count ) {
491
490
492
        $template->param(
491
        $template->param(
493
            warnRelationships => 1,
492
            warnRelationships => 1,
494
        );
493
        );
495
494
496
        if ( @wrong_relationships ) {
495
        if ( $wrong_relationships ) {
497
            $template->param(
496
            $template->param(
498
                wrong_relationships => \@wrong_relationships
497
                wrong_relationships => $wrong_relationships
499
            );
498
            );
500
        }
499
        }
501
        if ($bad_relationships_count) {
500
        if ($bad_relationships_count) {
502
- 

Return to bug 24215