Bug 336315: Throw*Error() are unable to find templates - Patch by Fr�d�ric Buclin <LpSolit@gmail.com> r=myk

This commit is contained in:
lpsolit%gmail.com 2006-05-02 22:34:11 +00:00
Родитель 2f982277fc
Коммит dc6ba715b6
2 изменённых файлов: 2 добавлений и 10 удалений

Просмотреть файл

@ -11,6 +11,7 @@ use File::Temp qw(tempfile tempdir);
use Template;
use AppConfig qw(:expand :argcount);
use CGI;
use Cwd qw(getcwd);
# Create an AppConfig object and populate it with parameters defined
# in the configuration file.
@ -29,7 +30,7 @@ my $_template;
sub template {
my $class = shift;
# INCLUDE_PATH is a colon-separated list of directories containing templates.
$_template ||= Template->new({INCLUDE_PATH => "templates",
$_template ||= Template->new({INCLUDE_PATH => getcwd() . "/templates",
PRE_CHOMP => 1,
POST_CHOMP => 1});
return $_template;

Просмотреть файл

@ -38,15 +38,6 @@ my $template = Doctor->template;
my $vars = {};
$vars->{'config'} = \%CONFIG;
################################################################################
# Script Configuration
################################################################################
# Store the home directory so we can get back to it after changing directories
# in certain places in the code.
use Cwd;
my $HOME = cwd;
################################################################################
# Main Body Execution
################################################################################