Bug 26734: Rename activethemes with availablethemes
There was an existing call to $self->activethemes that behave as setter: 85 $self->activethemes($activethemes); I am not sure what are the side-effects but it does not look good. It caused warning in the logs: Use of uninitialized value $interface in string eq at /kohadevbox/koha/C4/Templates.pm line 279. Use of uninitialized value $interface in string eq at /kohadevbox/koha/C4/Templates.pm line 280. Use of uninitialized value $interface in string eq at /kohadevbox/koha/C4/Templates.pm line 282. Use of uninitialized value $lang in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 296. Use of uninitialized value $lang in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 296. Use of uninitialized value $lang in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 296 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
9cc6fca618
commit
e66d69fa3e
|
|
@ -1546,12 +1546,12 @@ sub _process_tt {
|
|||
my $loops = $params->{loops};
|
||||
my $substitute = $params->{substitute} || {};
|
||||
my $lang = defined($params->{lang}) && $params->{lang} ne 'default' ? $params->{lang} : 'en';
|
||||
my ($theme, $activethemes);
|
||||
my ($theme, $availablethemes);
|
||||
|
||||
my $htdocs = C4::Context->config('intrahtdocs');
|
||||
($theme, $lang, $activethemes)= C4::Templates::activethemes( $htdocs, 'about.tt', 'intranet', $lang);
|
||||
($theme, $lang, $availablethemes)= C4::Templates::availablethemes( $htdocs, 'about.tt', 'intranet', $lang);
|
||||
my @includes;
|
||||
foreach (@$activethemes) {
|
||||
foreach (@$availablethemes) {
|
||||
push @includes, "$htdocs/$_/$lang/includes";
|
||||
push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,10 +268,10 @@ sub themelanguage {
|
|||
# Select a language based on cookie, syspref available languages & browser
|
||||
my $lang = C4::Languages::getlanguage($query);
|
||||
|
||||
return activethemes($htdocs, $tmpl, $interface, $lang);
|
||||
return availablethemes($htdocs, $tmpl, $interface, $lang);
|
||||
}
|
||||
|
||||
sub activethemes {
|
||||
sub availablethemes {
|
||||
my ($htdocs, $tmpl, $interface, $lang) = @_;
|
||||
|
||||
# Get theme
|
||||
|
|
|
|||
Loading…
Reference in New Issue