Skip to content

Commit

Permalink
Dev: added cache for parent template configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Aug 14, 2017
1 parent aba5052 commit a19ddd6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions application/models/TemplateConfiguration.php
Expand Up @@ -578,11 +578,17 @@ protected function getFrameworkAssetsReplacement( $sType )


public function getParentConfiguration(){
//check for surveygroup id
if($this->sid != null && $this->gsid != null)
return Template::getTemplateConfiguration(null,null,$this->gsid);
//check for general global template
return Template::getTemplateConfiguration($this->templates_name);
if (empty($this->oParentTemplate)){
//check for surveygroup id
if($this->sid != null && $this->gsid != null){
$this->oParentTemplate = Template::getTemplateConfiguration(null,null,$this->gsid);
}else{
//check for general global template
$this->oParentTemplate = Template::getTemplateConfiguration($this->templates_name);
}
}
return $this->oParentTemplate;

}

public function getFieldFromParentConfiguration($sField){
Expand Down

0 comments on commit a19ddd6

Please sign in to comment.