mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 09:14:48 +09:00
Update references to TemplateHandler in common code paths
This commit is contained in:
parent
d46d25c69f
commit
45f016d53b
7 changed files with 9 additions and 11 deletions
|
|
@ -49,7 +49,7 @@ class HTMLDisplayHandler
|
||||||
*/
|
*/
|
||||||
public function toDoc(&$oModule)
|
public function toDoc(&$oModule)
|
||||||
{
|
{
|
||||||
$oTemplate = TemplateHandler::getInstance();
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
|
|
||||||
// SECISSUE https://github.com/xpressengine/xe-core/issues/1583
|
// SECISSUE https://github.com/xpressengine/xe-core/issues/1583
|
||||||
$oSecurity = new Security();
|
$oSecurity = new Security();
|
||||||
|
|
@ -291,7 +291,7 @@ class HTMLDisplayHandler
|
||||||
|
|
||||||
// convert the final layout
|
// convert the final layout
|
||||||
Context::set('content', $output);
|
Context::set('content', $output);
|
||||||
$oTemplate = TemplateHandler::getInstance();
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
if(Mobile::isFromMobilePhone())
|
if(Mobile::isFromMobilePhone())
|
||||||
{
|
{
|
||||||
$this->_loadMobileJSCSS();
|
$this->_loadMobileJSCSS();
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class RawDisplayHandler
|
||||||
$tpl_file = $oModule->getTemplateFile();
|
$tpl_file = $oModule->getTemplateFile();
|
||||||
if ($tpl_path && $tpl_file)
|
if ($tpl_path && $tpl_file)
|
||||||
{
|
{
|
||||||
$oTemplate = TemplateHandler::getInstance();
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
$output = $oTemplate->compile($tpl_path, $tpl_file);
|
$output = $oTemplate->compile($tpl_path, $tpl_file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ class ModuleObject extends BaseObject
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$oTemplate = TemplateHandler::getInstance();
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
$oTemplate->compile('modules/admin/tpl', '_admin_common.html');
|
$oTemplate->compile('modules/admin/tpl', '_admin_common.html');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ class PageAdminView extends Page
|
||||||
$security->encodeHTML('widget_list..title','module_info.mid');
|
$security->encodeHTML('widget_list..title','module_info.mid');
|
||||||
|
|
||||||
// Load admin resources
|
// Load admin resources
|
||||||
$oTemplate = TemplateHandler::getInstance();
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
$oTemplate->compile('modules/admin/tpl', '_admin_common.html');
|
$oTemplate->compile('modules/admin/tpl', '_admin_common.html');
|
||||||
|
|
||||||
// Set a template file
|
// Set a template file
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ class PageMobile extends PageView
|
||||||
{
|
{
|
||||||
function _getArticleContent()
|
function _getArticleContent()
|
||||||
{
|
{
|
||||||
$oTemplate = &TemplateHandler::getInstance();
|
|
||||||
|
|
||||||
$oDocumentModel = getModel('document');
|
$oDocumentModel = getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument(0);
|
$oDocument = $oDocumentModel->getDocument(0);
|
||||||
|
|
||||||
|
|
@ -24,6 +22,7 @@ class PageMobile extends PageView
|
||||||
}
|
}
|
||||||
Context::set('oDocument', $oDocument);
|
Context::set('oDocument', $oDocument);
|
||||||
|
|
||||||
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
$template_path = $this->getTemplatePath();
|
$template_path = $this->getTemplatePath();
|
||||||
if (preg_match('!/skins/!', $template_path))
|
if (preg_match('!/skins/!', $template_path))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,6 @@ class PageView extends Page
|
||||||
|
|
||||||
function _getArticleContent()
|
function _getArticleContent()
|
||||||
{
|
{
|
||||||
$oTemplate = &TemplateHandler::getInstance();
|
|
||||||
|
|
||||||
$oDocumentModel = getModel('document');
|
$oDocumentModel = getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument(0);
|
$oDocument = $oDocumentModel->getDocument(0);
|
||||||
|
|
||||||
|
|
@ -154,6 +152,7 @@ class PageView extends Page
|
||||||
}
|
}
|
||||||
Context::set('oDocument', $oDocument);
|
Context::set('oDocument', $oDocument);
|
||||||
|
|
||||||
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
$page_content = $oTemplate->compile($this->getTemplatePath(), 'content');
|
$page_content = $oTemplate->compile($this->getTemplatePath(), 'content');
|
||||||
|
|
||||||
return $page_content;
|
return $page_content;
|
||||||
|
|
@ -254,7 +253,7 @@ class PageView extends Page
|
||||||
if ($this->proc_tpl)
|
if ($this->proc_tpl)
|
||||||
{
|
{
|
||||||
// Store compiled template in a temporary file.
|
// Store compiled template in a temporary file.
|
||||||
$oTemplate = TemplateHandler::getInstance();
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
$real_target_dir = dirname($real_target_file);
|
$real_target_dir = dirname($real_target_file);
|
||||||
$tmp_cache_file = preg_replace('/\.cache\.php$/', '.compiled.php', $cache_file);
|
$tmp_cache_file = preg_replace('/\.cache\.php$/', '.compiled.php', $cache_file);
|
||||||
$content = $oTemplate->compileDirect($real_target_dir . '/', basename($real_target_file));
|
$content = $oTemplate->compileDirect($real_target_dir . '/', basename($real_target_file));
|
||||||
|
|
|
||||||
|
|
@ -747,7 +747,7 @@ class WidgetController extends Widget
|
||||||
}
|
}
|
||||||
// Compilation
|
// Compilation
|
||||||
$widgetstyle_path = $oWidgetModel->getWidgetStylePath($widgetStyle);
|
$widgetstyle_path = $oWidgetModel->getWidgetStylePath($widgetStyle);
|
||||||
$oTemplate = &TemplateHandler::getInstance();
|
$oTemplate = Rhymix\Framework\Template::getInstance();
|
||||||
$tpl = $oTemplate->compile($widgetstyle_path, 'widgetstyle');
|
$tpl = $oTemplate->compile($widgetstyle_path, 'widgetstyle');
|
||||||
|
|
||||||
return $tpl;
|
return $tpl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue