@@ -, +, @@ basket.pl http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat Or, add to basket from existing record with a search Refresh the page (url has no parameters) http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat&booksellerid=1 --- acqui/neworderbiblio.pl | 2 ++ acqui/neworderempty.pl | 3 +++ koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt | 2 ++ 5 files changed, 11 insertions(+) --- a/acqui/neworderbiblio.pl +++ a/acqui/neworderbiblio.pl @@ -97,6 +97,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +output_and_exit( $input, $cookie, $template, 'unknown_vendor') unless $bookseller; + # Searching the catalog. my @operands = $query; --- a/acqui/neworderempty.pl +++ a/acqui/neworderempty.pl @@ -138,6 +138,9 @@ my $basketobj = Koha::Acquisition::Baskets->find( $basketno ); $booksellerid = $basket->{booksellerid} unless $booksellerid; my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); +output_and_exit( $input, $cookie, $template, 'unknown_basket') unless $basketobj; +output_and_exit( $input, $cookie, $template, 'unknown_vendor') unless $bookseller; + my $contract = GetContract({ contractnumber => $basket->{contractnumber} }); --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc @@ -11,6 +11,8 @@
Subscription not found.
[% CASE 'unknown_basket' %]
Basket not found.
+ [% CASE 'unknown_vendor' %] +
Vendor not found.
[% CASE 'wrong_csrf_token' %]
The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.
[% CASE %][% blocking_error | html %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt @@ -12,6 +12,8 @@ +[% INCLUDE 'blocking_errors.inc' %] +
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -17,6 +17,8 @@ +[% INCLUDE 'blocking_errors.inc' %] +
--