Bug 32693: Preparation: About script: docdir

docdir is used in both team + history tabs
was previously being loaded in team and additionally used in history
but because now we're only loading one tab at a time, we need to move this

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-02-15 13:27:50 -01:00 committed by Katrin Fischer
parent bde460da6b
commit 29357f69b4
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -70,6 +70,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
}
);
my $docdir;
if ( defined C4::Context->config('docdir') ) {
$docdir = C4::Context->config('docdir');
} else {
# if no <docdir> is defined in koha-conf.xml, use the default location
# this is a work-around to stop breakage on upgraded Kohas, bug 8911
$docdir = C4::Context->config('intranetdir') . '/docs';
}
my $config_timezone = C4::Context->config('timezone') // '';
my $config_invalid = !DateTime::TimeZone->is_valid_name( $config_timezone );
my $env_timezone = $ENV{TZ} // '';
@ -737,14 +747,6 @@ $template->param( table => $table );
## ------------------------------------------
## Koha contributions
my $docdir;
if ( defined C4::Context->config('docdir') ) {
$docdir = C4::Context->config('docdir');
} else {
# if no <docdir> is defined in koha-conf.xml, use the default location
# this is a work-around to stop breakage on upgraded Kohas, bug 8911
$docdir = C4::Context->config('intranetdir') . '/docs';
}
## Release teams
my $teams =