1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[feature/template-engine] Deleted $template from phpbb_template_compile class.

phpbb_template_compile is now much simpler. It takes complete file paths
as inputs, either source template path or source template path and output
compiled template path. The number of methods also went down to two -
compile template and returned compiled text or compile and write to file.

phpbb_compile class is responsible for determining source and compiled
paths. It already had all the data necessary for this, now the code is
in the same place as the data it uses.

PHPBB3-9726
This commit is contained in:
Oleg Pudeyev
2011-04-24 21:18:18 -04:00
parent 81962d1d8f
commit a2c75f6053
3 changed files with 75 additions and 97 deletions

View File

@@ -275,7 +275,7 @@ class phpbb_template_template_test extends phpbb_test_case
$this->template->set_filenames(array('test' => $filename));
$this->assertFileNotExists($this->template_path . '/' . $filename, 'Testing missing file, file cannot exist');
$expecting = sprintf('template->_tpl_load_file(): File %s does not exist or is empty', realpath($this->template_path . '/../') . '/templates/' . $filename);
$expecting = sprintf('_source_file_for_handle(): File %s does not exist', realpath($this->template_path . '/../') . '/templates/' . $filename);
$this->setExpectedTriggerError(E_USER_ERROR, $expecting);
$this->display('test');
@@ -530,4 +530,3 @@ EOT
}
}