Switched new functions to using C4::Context.
authorarensb <arensb>
Sat, 5 Oct 2002 16:55:09 +0000 (16:55 +0000)
committerarensb <arensb>
Sat, 5 Oct 2002 16:55:09 +0000 (16:55 +0000)
C4/Output.pm

index 40e78f0..f75f75e 100644 (file)
@@ -97,6 +97,7 @@ my $path = C4::Context->config('includes') ||
        "/usr/local/www/hdl/htdocs/includes";
 
 #---------------------------------------------------------------------------------------------------------
+# FIXME - POD
 sub gettemplate {
     my ($tmplbase, $opac) = @_;
 
@@ -119,11 +120,12 @@ sub gettemplate {
 }
 
 #---------------------------------------------------------------------------------------------------------
+# FIXME - POD
 sub themelanguage {
   my ($htdocs, $tmpl) = @_;
 
 # language preferences....
-  my $dbh=C4Connect;
+  my $dbh = C4::Context->dbh;
   my $sth=$dbh->prepare("SELECT value FROM systempreferences WHERE variable='opaclanguages'");
   $sth->execute;
   my ($lang) = $sth->fetchrow;
@@ -137,8 +139,6 @@ sub themelanguage {
   $sth->finish;
   my @themes = split " ", $theme;
 
-  $dbh->disconnect;
-
   my ($theme, $lang);
 # searches through the themes and languages. First template it find it returns.
 # Priority is for getting the theme right.