Instantiate template and set template path from seperate method

git-svn-id: file:///svn/phpbb/trunk@2882 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-08-22 21:40:51 +00:00
parent eca02e139c
commit 0226e8602a
2 changed files with 28 additions and 32 deletions

View file

@ -143,6 +143,7 @@ require($phpbb_root_path . 'includes/functions.'.$phpEx);
require($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx); require($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
$session = new session(); $session = new session();
$template = new Template();
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); $db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
// //

View file

@ -62,14 +62,9 @@ class Template {
var $include_counter = 1; var $include_counter = 1;
var $block_nesting_level = 0; var $block_nesting_level = 0;
/** function set_template($template = '')
* Constructor. Simply sets the root dir.
*
*/
function Template($template = '')
{ {
global $phpbb_root_path; global $phpbb_root_path;
$this->root = $phpbb_root_path . 'templates/' . $template; $this->root = $phpbb_root_path . 'templates/' . $template;
$this->cachedir = $phpbb_root_path . 'templates/cache/' . $template . '/'; $this->cachedir = $phpbb_root_path . 'templates/cache/' . $template . '/';