Update references to TemplateHandler in common code paths

This commit is contained in:
Kijin Sung 2023-10-10 15:05:46 +09:00
parent d46d25c69f
commit 45f016d53b
7 changed files with 9 additions and 11 deletions

View file

@ -141,8 +141,6 @@ class PageView extends Page
function _getArticleContent()
{
$oTemplate = &TemplateHandler::getInstance();
$oDocumentModel = getModel('document');
$oDocument = $oDocumentModel->getDocument(0);
@ -154,6 +152,7 @@ class PageView extends Page
}
Context::set('oDocument', $oDocument);
$oTemplate = Rhymix\Framework\Template::getInstance();
$page_content = $oTemplate->compile($this->getTemplatePath(), 'content');
return $page_content;
@ -254,7 +253,7 @@ class PageView extends Page
if ($this->proc_tpl)
{
// Store compiled template in a temporary file.
$oTemplate = TemplateHandler::getInstance();
$oTemplate = Rhymix\Framework\Template::getInstance();
$real_target_dir = dirname($real_target_file);
$tmp_cache_file = preg_replace('/\.cache\.php$/', '.compiled.php', $cache_file);
$content = $oTemplate->compileDirect($real_target_dir . '/', basename($real_target_file));