Bug 3150: (QA follow-up) Don't load unused and deleted tt files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Kyle Hall 2023-03-14 17:01:50 +00:00 committed by Tomas Cohen Arazi
parent 128517fe66
commit a426134fe3
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 2 additions and 20 deletions

View file

@ -60,15 +60,6 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
if ( $email ) {
my $comment = $query->param('comment');
my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
{
template_name => "opac-sendshelf.tt",
query => $query,
type => "opac",
authnotrequired => 1,
}
);
my $patron = Koha::Patrons->find( $borrowernumber );
my $user_email = $patron->first_valid_email_address;
my $shelf = Koha::Virtualshelves->find( $shelfid );

View file

@ -40,7 +40,7 @@ use Koha::Virtualshelves;
my $query = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{
template_name => "virtualshelves/sendshelfform.tt",
query => $query,
@ -55,20 +55,11 @@ my $to_address = $query->param('email');
my $shelf = Koha::Virtualshelves->find( $shelfid );
output_and_exit( $query, $cookie, $template, 'insufficient_permission' )
if $shelf && !$shelf->can_be_viewed( $loggedinuser );
if $shelf && !$shelf->can_be_viewed( $borrowernumber );
if ($to_address) {
my $comment = $query->param('comment');
my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
{
template_name => "virtualshelves/sendshelf.tt",
query => $query,
type => "intranet",
flagsrequired => { catalogue => 1 },
}
);
my $patron = Koha::Patrons->find( $borrowernumber );
my $user_email = $patron->first_valid_email_address;
my $contents = $shelf->get_contents;