If a language that doesn't exist gets accessed, then it will fall back
to en for the templates, but not for the includes, so everything still
dies. This allows the process to work in this case too.
---
 C4/Templates.pm |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/C4/Templates.pm b/C4/Templates.pm
index 4368492..f84fad3 100644
--- a/C4/Templates.pm
+++ b/C4/Templates.pm
@@ -51,12 +51,13 @@ sub new {
 
     my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, $interface );
     my $template = Template->new(
-        {
-            EVAL_PERL    => 1,
+        {   EVAL_PERL    => 1,
             ABSOLUTE     => 1,
-            INCLUDE_PATH => "$htdocs/$theme/$lang/includes",
-            FILTERS      => {},
-
+            INCLUDE_PATH => [
+                "$htdocs/$theme/$lang/includes",
+                "$htdocs/$theme/en/includes"
+            ],
+            FILTERS => {},
         }
     ) or die Template->error();
     my $self = {
-- 
1.7.4.1

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to