Skip to content

Commit

Permalink
Fixed issue #12906: Extended vanilla template cannot be assigned to s…
Browse files Browse the repository at this point in the history
…urvey
  • Loading branch information
LouisGac committed Nov 14, 2017
1 parent 1169029 commit 11e48a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/models/TemplateManifest.php
Expand Up @@ -290,6 +290,8 @@ public static function importManifest($sTemplateName, $aDatas=array() )
$aDatas['packages_to_load'] = self::formatArrayFields($oREngineTemplate, 'engine', 'packages');




// If empty in manifest, it should be the field in db, so the Mother Template css/js files will be used...
if (is_object($oTemplate->config->files)){
$aDatas['files_css'] = self::formatArrayFields($oTemplate, 'files', 'css');
Expand Down Expand Up @@ -335,7 +337,7 @@ public static function getTemplateForXPath($oTemplate, $sFieldPath)
*/
public static function formatArrayFields($oTemplate, $sFieldPath, $sFieldName)
{
return !empty($oTemplate->config->$sFieldPath->$sFieldName) ? ((array) $oTemplate->config->$sFieldPath->$sFieldName) : array();
return (empty($oTemplate->config->$sFieldPath->$sFieldName->value) )?array():$oTemplate->config->$sFieldPath->$sFieldName;
}

/**
Expand Down

0 comments on commit 11e48a5

Please sign in to comment.