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

(-)a/C4/Output.pm (-6 / +9 lines)
Lines 50-56 BEGIN { Link Here
50
    );
50
    );
51
    push @EXPORT, qw(
51
    push @EXPORT, qw(
52
        &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers
52
        &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers
53
        &output_and_exit_if_error
53
        &output_and_exit_if_error &output_and_exit
54
    );
54
    );
55
55
56
}
56
}
Lines 338-351 sub output_and_exit_if_error { Link Here
338
        }
338
        }
339
    }
339
    }
340
340
341
    if ( $error ) {
341
    output_and_exit( $query, $cookie, $template, $error ) if $error;
342
        $template->param( blocking_error => $error );
343
        output_html_with_http_headers ( $query, $cookie, $template->output );
344
        exit;
345
    }
346
    return;
342
    return;
347
}
343
}
348
344
345
sub output_and_exit {
346
    my ( $query, $cookie, $template, $error ) = @_;
347
    $template->param( blocking_error => $error );
348
    output_html_with_http_headers ( $query, $cookie, $template->output );
349
    exit;
350
}
351
349
sub parametrized_url {
352
sub parametrized_url {
350
    my $url = shift || ''; # ie page.pl?ln={LANG}
353
    my $url = shift || ''; # ie page.pl?ln={LANG}
351
    my $vars = shift || {}; # ie { LANG => en }
354
    my $vars = shift || {}; # ie { LANG => en }
(-)a/circ/bookcount.pl (-16 / +15 lines)
Lines 39-60 my $biblionumber = $input->param('biblionumber'); Link Here
39
my $biblio = Koha::Biblios->find( $biblionumber );
39
my $biblio = Koha::Biblios->find( $biblionumber );
40
my $item   = Koha::Items->find( $itm );
40
my $item   = Koha::Items->find( $itm );
41
41
42
if ( !defined $biblio or !defined $item ) {
43
    print $input->redirect("/cgi-bin/koha/errors/400.pl");
44
}
45
46
my $lastmove = lastmove($itm);
47
48
my $lastdate;
49
my $count;
50
if ( not $lastmove ) {
51
    $count = issuessince( $itm, 0 );
52
} else {
53
    $lastdate = $lastmove->{'datearrived'};
54
    $count = issuessince( $itm, $lastdate );
55
}
56
57
# make the page ...
58
42
59
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
43
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
60
    {
44
    {
Lines 67-72 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
67
    }
51
    }
68
);
52
);
69
53
54
output_and_exit( $input, $cookie, $template, 'unknown_biblio')
55
    unless $biblio;
56
output_and_exit( $input, $cookie, $template, 'unknown_item')
57
    unless $item;
58
59
my $lastdate;
60
my $count;
61
my $lastmove = lastmove($itm);
62
if ( not $lastmove ) {
63
    $count = issuessince( $itm, 0 );
64
} else {
65
    $lastdate = $lastmove->{'datearrived'};
66
    $count = issuessince( $itm, $lastdate );
67
}
68
70
my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed;
69
my $libraries = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed;
71
for my $library ( @$libraries ) {
70
for my $library ( @$libraries ) {
72
    $library->{selected} = 1 if $library->{branchcode} eq C4::Context->userenv->{branch};
71
    $library->{selected} = 1 if $library->{branchcode} eq C4::Context->userenv->{branch};
(-)a/circ/request-article.pl (+3 lines)
Lines 44-49 my $patron_cardnumber = $cgi->param('patron_cardnumber'); Link Here
44
my $patron_id         = $cgi->param('patron_id');
44
my $patron_id         = $cgi->param('patron_id');
45
45
46
my $biblio = Koha::Biblios->find($biblionumber);
46
my $biblio = Koha::Biblios->find($biblionumber);
47
output_and_exit( $cgi, $cookie, $template, 'unknown_biblio')
48
    unless $biblio;
49
47
my $patron =
50
my $patron =
48
    $patron_id         ? Koha::Patrons->find($patron_id)
51
    $patron_id         ? Koha::Patrons->find($patron_id)
49
  : $patron_cardnumber ? Koha::Patrons->find( { cardnumber => $patron_cardnumber } )
52
  : $patron_cardnumber ? Koha::Patrons->find( { cardnumber => $patron_cardnumber } )
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc (+4 lines)
Lines 3-8 Link Here
3
    [% CASE 'unknown_patron' %]
3
    [% CASE 'unknown_patron' %]
4
        <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
4
        <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
5
    [% CASE 'cannot_see_patron_infos' %]You are not allowed to see the information of this patron.
5
    [% CASE 'cannot_see_patron_infos' %]You are not allowed to see the information of this patron.
6
    [% CASE 'unknown_biblio' %]
7
        <div class="dialog message">This bibliographic record does not exist.</div>
8
    [% CASE 'unknown_item' %]
9
        <div class="dialog message">This item does not exist.</div>
6
    [% CASE %][% blocking_error %]
10
    [% CASE %][% blocking_error %]
7
    [% END %]
11
    [% END %]
8
12
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt (-3 / +7 lines)
Lines 10-16 Link Here
10
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
11
[% INCLUDE 'circ-search.inc' %]
11
[% INCLUDE 'circ-search.inc' %]
12
12
13
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Circulation statistics for [% title |html %]</div>
13
<div id="breadcrumbs">
14
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
15
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
16
    [% UNLESS blocking_error %]&rsaquo; Circulation statistics for [% title |html %][% END %]
17
</div>
14
18
15
<div id="doc3" class="yui-t2">
19
<div id="doc3" class="yui-t2">
16
   
20
   
Lines 18-25 Link Here
18
	<div id="yui-main">
22
	<div id="yui-main">
19
	<div class="yui-b">
23
	<div class="yui-b">
20
24
21
<h2>
25
[% INCLUDE 'blocking_errors.inc' %]
22
[% title |html %] [% IF ( author ) %] by [% author |html %][% END %]</h2>
26
<h2>[% title |html %] [% IF ( author ) %] by [% author |html %][% END %]</h2>
23
<h3>Barcode [% barcode %]</h3>
27
<h3>Barcode [% barcode %]</h3>
24
<table>
28
<table>
25
        <tr><th>Home library</th><th>Current library</th><th>Date arrived<br />at current library </th><th>Number of checkouts<br />since last transfer</th></tr>
29
        <tr><th>Home library</th><th>Current library</th><th>Date arrived<br />at current library </th><th>Number of checkouts<br />since last transfer</th></tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt (-1 / +3 lines)
Lines 19-30 Link Here
19
        <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19
        <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20
        &rsaquo;
20
        &rsaquo;
21
        <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
21
        <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
22
        [% UNLESS blocking_error %]
22
        &rsaquo;
23
        &rsaquo;
23
        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]">[% biblio.title | html %]</a>
24
        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]">[% biblio.title | html %]</a>
24
        &rsaquo;
25
        &rsaquo;
25
        Request article
26
        Request article
27
        [% END %]
26
    </div>
28
    </div>
27
29
30
    [% INCLUDE 'blocking_errors.inc' %]
28
    <div id="doc3" class="yui-t2">
31
    <div id="doc3" class="yui-t2">
29
        <div id="bd">
32
        <div id="bd">
30
            <div id="yui-main">
33
            <div id="yui-main">
31
- 

Return to bug 20661