|
From: Paul S. O. <ps...@us...> - 2002-07-14 14:33:33
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv11652/includes
Modified Files:
template.php
Log Message:
This should work fine with existing templates ... note that you will need to create a directory called cache/ in your templates directory ... give it a+w access (chmod 700)
Index: template.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/template.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** template.php 22 Jun 2002 11:48:10 -0000 1.11
--- template.php 14 Jul 2002 14:33:30 -0000 1.12
***************
*** 1,5 ****
<?php
/***************************************************************************
! * template.inc
* -------------------
* begin : Saturday, Feb 13, 2001
--- 1,5 ----
<?php
/***************************************************************************
! * template.php
* -------------------
[...1158 lines suppressed...]
+ $_str = preg_replace($match_tags, $replace_tags, $_str);
+ $text_blocks = preg_split('#<!-- PHP -->#s', $_str);
+
+ $_str = '';
+ for ($i = 0; $i < count($text_blocks); $i++)
+ {
+ $_str .= $text_blocks[$i] . ( ( !empty($php_blocks[$i]) ) ? '<!-- PHP -->' . $php_blocks[$i] . '<!-- ENDPHP -->' : '' );
+ }
+
+ $tmpfile = '';
+ if ( $savefile )
+ {
+ $tmpfile = tmpfile();
+ fwrite($tmpfile, $_str);
+ }
+
+ return $tmpfile;
+ }
}
|