User: sits
Date: 06/08/10 18:46:06
Modified: . CHANGELOG
lib/Codestriker/Http Template.pm
Log:
Make sure template toolkit temporary files are stored in the right location.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -r1.194 -r1.195
--- CHANGELOG 12 Jul 2006 00:07:20 -0000 1.194
+++ CHANGELOG 11 Aug 2006 01:46:05 -0000 1.195
@@ -100,6 +100,11 @@
warning text that was not parsed correctly. This has now been
fixed. Contributed by Vladimir Sizikov <[EMAIL PROTECTED]>.
+* Make sure the generated Template Toolkit files are stored in
+ the web server's temporary directory, or $Codestriker::tmpdir if
+ that is defined. Previously, the temporary files were being stored
+ in sub-directories of cgi-bin.
+
Version 1.9.1
* Correct problem introduced in 1.9.0 release where the email address
Index: Template.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Template.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Template.pm 24 Jan 2006 23:53:03 -0000 1.15
+++ Template.pm 11 Aug 2006 01:46:06 -0000 1.16
@@ -20,8 +20,9 @@
my $self = {};
$self->{name} = $name;
- $self->{template} =
- Template->new({
+
+ # Template configuration.
+ my $config = {
# Location of templates.
INCLUDE_PATH =>
$Codestriker::BASEDIR . "/template/en/custom:" .
@@ -35,14 +36,18 @@
# DIRECTIVE %]).
PRE_CHOMP => 1,
TRIM => 1,
-
- # Where to compile the templates.
- COMPILE_DIR => $Codestriker::BASEDIR . '/cgi-bin/data/',
# Codestriker-specific plugins.
PLUGIN_BASE => 'Codestriker::Template::Plugin'
- })
- || die Template->error();
+ };
+
+ # If the Codestriker tmpdir has been defined, use that for
+ # location for generating the templates.
+ if (defined $Codestriker::tmpdir && $Codestriker::tmpdir ne '') {
+ $config->{COMPILE_DIR} = $Codestriker::tmpdir;
+ }
+
+ $self->{template} = Template->new($config) || die Template->error();
return bless $self, $type;
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits