Skip to content

Commit

Permalink
Dev: call $oTemplate if it's empty in replacement_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Feb 8, 2016
1 parent 04e8080 commit f32f8d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions application/helpers/replacements_helper.php
Expand Up @@ -136,7 +136,12 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
*
* oTemplate is defined in controller/survey/index
*/

global $oTemplate;
if(empty($oTemplate))
{
$oTemplate = Template::model()->getTemplateConfiguration($templatename);
}
$aCssFiles = $oTemplate->config->files->css->filename;
$aJsFiles = $oTemplate->config->files->js->filename;
if(stripos ($line,"{TEMPLATECSS}"))
Expand Down

0 comments on commit f32f8d0

Please sign in to comment.