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

(-)a/C4/Output.pm (-1 / +1 lines)
Lines 311-317 sub parametrized_url { Link Here
311
    my $vars = shift || {}; # ie { LANG => en }
311
    my $vars = shift || {}; # ie { LANG => en }
312
    my $ret = $url;
312
    my $ret = $url;
313
    while ( my ($key,$val) = each %$vars) {
313
    while ( my ($key,$val) = each %$vars) {
314
        my $val_url = URI::Escape::uri_escape_utf8($val);
314
        my $val_url = defined($val) ? URI::Escape::uri_escape_utf8($val) : q{};
315
        $ret =~ s/\{$key\}/$val_url/g;
315
        $ret =~ s/\{$key\}/$val_url/g;
316
    }
316
    }
317
    $ret =~ s/\{[^\{]*\}//g; # remove not defined vars
317
    $ret =~ s/\{[^\{]*\}//g; # remove not defined vars
(-)a/opac/opac-ISBDdetail.pl (-2 / +4 lines)
Lines 191-198 my $marcissns = GetMarcISSN ( $record, $marcflavour ); Link Here
191
my $issn = $marcissns->[0] || '';
191
my $issn = $marcissns->[0] || '';
192
192
193
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
193
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
194
    $dat->{title} =~ s/\/+$//; # remove trailing slash
194
    if (defined($dat->{title})) {
195
    $dat->{title} =~ s/\s+$//; # remove trailing space
195
        $dat->{title} =~ s/\/+$//; # remove trailing slash
196
        $dat->{title} =~ s/\s+$//; # remove trailing space
197
    }
196
    $search_for_title = parametrized_url(
198
    $search_for_title = parametrized_url(
197
        $search_for_title,
199
        $search_for_title,
198
        {
200
        {
(-)a/opac/opac-MARCdetail.pl (-2 / +4 lines)
Lines 325-332 my $marcissns = GetMarcISSN( $record, $marcflavour ); Link Here
325
my $issn = $marcissns->[0] || '';
325
my $issn = $marcissns->[0] || '';
326
326
327
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
327
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
328
    $dat->{title} =~ s/\/+$//; # remove trailing slash
328
    if (defined($dat->{title})) {
329
    $dat->{title} =~ s/\s+$//; # remove trailing space
329
        $dat->{title} =~ s/\/+$//; # remove trailing slash
330
        $dat->{title} =~ s/\s+$//; # remove trailing space
331
    }
330
    $search_for_title = parametrized_url(
332
    $search_for_title = parametrized_url(
331
        $search_for_title,
333
        $search_for_title,
332
        {
334
        {
(-)a/opac/opac-detail.pl (-6 / +9 lines)
Lines 89-103 if ( ! $record ) { Link Here
89
    print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
89
    print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
90
    exit;
90
    exit;
91
}
91
}
92
my $framework = &GetFrameworkCode( $biblionumber );
92
93
my $dat = &GetBiblioData($biblionumber);
93
my $record_processor = Koha::RecordProcessor->new({
94
my $record_processor = Koha::RecordProcessor->new({
94
    filters => 'ViewPolicy',
95
    filters => 'ViewPolicy',
95
    options => {
96
    options => {
96
        interface => 'opac',
97
        interface => 'opac',
97
        frameworkcode => $framework
98
        frameworkcode => $dat->{'frameworkcode'}
98
    }
99
    }
99
});
100
});
100
$record_processor->process($record);
101
102
# Only run filtering on record if not XSLT.
103
my $xslfile = C4::Context->preference('OPACXSLTDetailsDisplay');
104
if (! $xslfile ) {
105
    $record_processor->process($record);
106
}
101
107
102
# redirect if opacsuppression is enabled and biblio is suppressed
108
# redirect if opacsuppression is enabled and biblio is suppressed
103
if (C4::Context->preference('OpacSuppression')) {
109
if (C4::Context->preference('OpacSuppression')) {
Lines 149-155 my $marcflavour = C4::Context->preference("marcflavour"); Link Here
149
my $ean = GetNormalizedEAN( $record, $marcflavour );
155
my $ean = GetNormalizedEAN( $record, $marcflavour );
150
156
151
# XSLT processing of some stuff
157
# XSLT processing of some stuff
152
my $xslfile = C4::Context->preference('OPACXSLTDetailsDisplay');
153
my $lang   = $xslfile ? C4::Languages::getlanguage()  : undef;
158
my $lang   = $xslfile ? C4::Languages::getlanguage()  : undef;
154
my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
159
my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
155
160
Lines 530-536 if ( C4::Context->preference('HighlightOwnItemsOnOPAC') ) { Link Here
530
    }
535
    }
531
}
536
}
532
537
533
my $dat = &GetBiblioData($biblionumber);
534
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(
538
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(
535
    {
539
    {
536
        frameworkcode => $dat->{'frameworkcode'},
540
        frameworkcode => $dat->{'frameworkcode'},
537
- 

Return to bug 17527