Lines 503-508
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
503 |
|
503 |
|
504 |
like( $newresults[0]->{XSLTResultsRecord}, qr/<variable name="anonymous_session">1<\/variable>/, "Variable injected correctly" ); |
504 |
like( $newresults[0]->{XSLTResultsRecord}, qr/<variable name="anonymous_session">1<\/variable>/, "Variable injected correctly" ); |
505 |
|
505 |
|
|
|
506 |
my $biblio_id = $newresults[0]->{biblionumber}; |
507 |
my $fw = C4::Biblio::GetFrameworkCode($biblio_id); |
508 |
|
509 |
my $dbh = C4::Context->dbh; |
510 |
# Hide subfield 'p' in OPAC |
511 |
$dbh->do(qq{ |
512 |
UPDATE marc_subfield_structure |
513 |
SET hidden=4 |
514 |
WHERE frameworkcode='$fw' AND |
515 |
tagfield=952 AND |
516 |
tagsubfield='p'; |
517 |
}); |
518 |
|
519 |
# Hide subfield 'y' in Staff |
520 |
$dbh->do(qq{ |
521 |
UPDATE marc_subfield_structure |
522 |
SET hidden=-7 |
523 |
WHERE frameworkcode='$fw' AND |
524 |
tagfield=952 AND |
525 |
tagsubfield='y'; |
526 |
}); |
527 |
|
528 |
Koha::Caches->get_instance->flush_all; |
529 |
|
530 |
@newresults = searchResults( |
531 |
{ 'interface' => 'opac' }, |
532 |
$query_desc, |
533 |
$results_hashref->{'biblioserver'}->{'hits'}, |
534 |
17, |
535 |
0, |
536 |
0, |
537 |
$results_hashref->{'biblioserver'}->{"RECORDS"} |
538 |
); |
539 |
|
540 |
unlike( $newresults[0]->{XSLTResultsRecord}, qr/<subfield code="p">TEST11111<\/subfield>/, '952\$p hidden in OPAC' ); |
541 |
|
542 |
@newresults = searchResults( |
543 |
{ 'interface' => 'intranet' }, |
544 |
$query_desc, |
545 |
$results_hashref->{'biblioserver'}->{'hits'}, |
546 |
17, |
547 |
0, |
548 |
0, |
549 |
$results_hashref->{'biblioserver'}->{"RECORDS"} |
550 |
); |
551 |
|
552 |
unlike( $newresults[0]->{XSLTResultsRecord}, qr/<subfield code="y">Books<\/subfield>/, '952\$y hidden on staff interface' ); |
553 |
|
506 |
( $error, $query, $simple_query, $query_cgi, |
554 |
( $error, $query, $simple_query, $query_cgi, |
507 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
555 |
$query_desc, $limit, $limit_cgi, $limit_desc, |
508 |
$query_type ) = buildQuery([], [ 'pqf=@attr 1=_ALLRECORDS @attr 2=103 ""' ], [], [], [], 0, 'en'); |
556 |
$query_type ) = buildQuery([], [ 'pqf=@attr 1=_ALLRECORDS @attr 2=103 ""' ], [], [], [], 0, 'en'); |
Lines 852-858
sub run_unimarc_search_tests {
Link Here
|
852 |
} |
900 |
} |
853 |
|
901 |
|
854 |
subtest 'MARC21 + DOM' => sub { |
902 |
subtest 'MARC21 + DOM' => sub { |
855 |
plan tests => 85; |
903 |
plan tests => 87; |
856 |
run_marc21_search_tests(); |
904 |
run_marc21_search_tests(); |
857 |
}; |
905 |
}; |
858 |
|
906 |
|
859 |
- |
|
|