Skip to content

Commit

Permalink
Dev: follow up : old template compatibility
Browse files Browse the repository at this point in the history
Dev: efb3542 child
  • Loading branch information
Shnoulle committed Feb 6, 2016
1 parent efb3542 commit 2aba8f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion application/models/Template.php
Expand Up @@ -173,10 +173,11 @@ public static function getTemplateConfiguration($sTemplateName='', $iSurveyId=''
{
$oTemplate->name = $sTemplateName;
$oTemplate->path = Yii::app()->getConfig("usertemplaterootdir").DIRECTORY_SEPARATOR.$oTemplate->name;
$oTemplate->config = Yii::app()->getConfig("standardtemplaterootdir").DIRECTORY_SEPARATOR.'/minimal-config.xml';
$oTemplate->config = simplexml_load_file(Yii::app()->getConfig("standardtemplaterootdir").DIRECTORY_SEPARATOR.'/minimal-config.xml');
/* /./ working for linux, untested with windows
$oTemplate->viewPath = $oTemplate->path.DIRECTORY_SEPARATOR.$oTemplate->config->engine->pstpldirectory.DIRECTORY_SEPARATOR;
* */
$oTemplate->cssFramework = null;
$oTemplate->viewPath = $oTemplate->path.DIRECTORY_SEPARATOR;
$oTemplate->packages = (array) $oTemplate->config->engine->packages->package;
return $oTemplate;
Expand Down
4 changes: 2 additions & 2 deletions templates/minimal-config.xml
Expand Up @@ -24,8 +24,8 @@
</files>
<engine>
<packages>
<!-- If need a specific system for 206 template -->
<!-- <cssframework>206</cssframework> -->
<cssframework></cssframework>
<pstpldirectory>.</pstpldirectory>
<package>jqueryui</package>
<package>jquery-touch-punch</package>
</packages>
Expand Down

0 comments on commit 2aba8f0

Please sign in to comment.