From 152171006218a1ecfbaf567c8e20ce854d09c613 Mon Sep 17 00:00:00 2001 From: tetragon Date: Thu, 18 Oct 2007 23:00:16 +0000 Subject: Some template handling tweaking to allow for escaping scalar references git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1788 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Template.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'LedgerSMB/Template.pm') diff --git a/LedgerSMB/Template.pm b/LedgerSMB/Template.pm index 8c302e91..5248ab78 100755 --- a/LedgerSMB/Template.pm +++ b/LedgerSMB/Template.pm @@ -120,6 +120,9 @@ your software. package LedgerSMB::Template; +use warnings; +use strict; + use Error qw(:try); use LedgerSMB::Sysconfig; use LedgerSMB::Mailer; @@ -164,9 +167,9 @@ sub new { throw Error::Simple "Invalid format"; } if (!$self->{include_path}){ -## SC: hardcoding due to config migration -## $self->{include_path} = $self->{'myconfig'}->{'templates'}; - $self->{include_path} = 'templates/demo'; +## SC: XXX hardcoding due to config migration, will need adjustment + $self->{include_path} = $self->{'myconfig'}->{'templates'}; + $self->{include_path} ||= 'templates/demo'; if (defined $self->{language}){ if (!$self->_valid_language){ throw Error::Simple 'Invalid language'; -- cgit v1.2.3