http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13473
--- Comment #7 from Kyle M Hall <[email protected]> --- Excellent work! I was able to create a patch based on your fix here! (In reply to Pete Edwards from comment #2) > I'm not familiar enough with Koha to offer a patch but here is a workaround > that is OK for me. > > I had to modify C4::Templates::themelanguage(). For normal pages this is > fine but plugin templates have an absolute path (in $tmpl) so the code to > check for a template in the correct language completely fails: > for my $theme (@themes) { > if ( -e "$htdocs/$theme/$lang/$where/$tmpl" ) { > return ( $theme, $lang, uniq( \@themes ) ); > } > } > Instead, we drop through both loops and come out of the function without any > return. This seems pretty bad practice. At the end of the function I added: > if ($tmpl =~ /^\//) { > return ( $themes[0], $lang, uniq( \@themes ) ); > } > This probably doesn't fix every possible situation, nor do I know about > themes but it might help whoever does try and fix the problem. > > As an aside, it would be better to run uniq on the themes array before > checking for files existing so it reduces the number of times it may try the > wrong location. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
