Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/template_helper.php
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
function _getSourceTemplate() | function _getSourceTemplate() | ||||
{ | { | ||||
// get source template | // get source template | ||||
$t = $this->Application->GetVar('source'); | $t = $this->Application->GetVar('source'); | ||||
if (!$this->Application->TemplatesCache->TemplateExists($t)) { | if (!$this->Application->TemplatesCache->TemplateExists($t)) { | ||||
/** @var CategoriesEventHandler $cms_handler */ | |||||
$cms_handler = $this->Application->recallObject('st_EventHandler'); | $cms_handler = $this->Application->recallObject('st_EventHandler'); | ||||
/* @var $cms_handler CategoriesEventHandler */ | |||||
$t = ltrim($cms_handler->GetDesignTemplate($t), '/'); | $t = ltrim($cms_handler->GetDesignTemplate($t), '/'); | ||||
} | } | ||||
$this->_sourceTemplate = $t; | $this->_sourceTemplate = $t; | ||||
} | } | ||||
function _getThemeName() | function _getThemeName() | ||||
▲ Show 20 Lines • Show All 339 Lines • ▼ Show 20 Line(s) | |||||
$new_template_body = substr($template_body, 0, $this->_blockLocation['start_pos']) . | $new_template_body = substr($template_body, 0, $this->_blockLocation['start_pos']) . | ||||
$new_content . | $new_content . | ||||
substr($template_body, $this->_blockLocation['end_pos']); | substr($template_body, $this->_blockLocation['end_pos']); | ||||
return crc32($template_body) == crc32($new_template_body) ? true : $new_template_body; | return crc32($template_body) == crc32($new_template_body) ? true : $new_template_body; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |