Skip to content

Commit

Permalink
Dev: changed libxml_disable_entity_loader position
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 24, 2017
1 parent ead73ba commit f98bf32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/models/TemplateConfiguration.php
Expand Up @@ -91,7 +91,7 @@ class TemplateConfiguration extends CFormModel
public function setTemplateConfiguration($sTemplateName='', $iSurveyId='')
{

$this->setTemplateName($sTemplateName);
$this->setTemplateName($sTemplateName, $iSurveyId);

// We check if it is a CORE template
$this->setIsStandard();
Expand All @@ -109,7 +109,8 @@ public function setTemplateConfiguration($sTemplateName='', $iSurveyId='')

// Using PHP >= 5.4 then no need to decode encode + need attributes : then other function if needed :https://secure.php.net/manual/en/book.simplexml.php#108688 for example
$this->config = simplexml_load_string($sXMLConfigFile);

libxml_disable_entity_loader($bOldEntityLoaderState); // Put back entity loader to its original state, to avoid contagion to other applications on the server

// Recursive mother templates configuration
$this->setMotherTemplates();

Expand All @@ -120,7 +121,6 @@ public function setTemplateConfiguration($sTemplateName='', $iSurveyId='')

$this->createTemplatePackage($this);

libxml_disable_entity_loader($bOldEntityLoaderState); // Put back entity loader to its original state, to avoid contagion to other applications on the server
return $this;
}

Expand Down Expand Up @@ -161,7 +161,7 @@ private function setPath()
}
}

private function setTemplateName($sTemplateName)
private function setTemplateName($sTemplateName, $iSurveyId)
{
// If it is called from the template editor, a template name will be provided.
// If it is called for survey taking, a survey id will be provided
Expand Down

0 comments on commit f98bf32

Please sign in to comment.