Bugfix for Bug 1790: Theme defaults to prog if other themes fail.
authorChris <cnighswonger@foundations.edu>
Tue, 29 Jan 2008 18:37:20 +0000 (12:37 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 30 Jan 2008 13:51:04 +0000 (07:51 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Output.pm

index d9714a5..e6b2659 100644 (file)
@@ -65,6 +65,7 @@ my $path = C4::Context->config('intrahtdocs') . "/prog/en/includes/";
 sub gettemplate {
     my ( $tmplbase, $interface, $query ) = @_;
     ($query) or warn "no query in gettemplate";
+       warn "Template base is $tmplbase";
     my $htdocs;
     if ( $interface ne "intranet" ) {
         $htdocs = C4::Context->config('opachtdocs');
@@ -138,10 +139,8 @@ sub themelanguage {
     } else {
         $lang = $languages[0];
     }      
-    my $theme = 'prog';
-
+    my $theme = 'prog';        # in the event of theme failure default to 'prog' -fbcit
     my $dbh = C4::Context->dbh;
-    my @languages;
     my @themes;
     if ( $interface eq "intranet" ) {
         @themes    = split " ", C4::Context->preference("template");