Skip to content

Commit

Permalink
fixed issue #11847: Don't move all template in asset directory (views…
Browse files Browse the repository at this point in the history
… not needed)
  • Loading branch information
Louis Gac committed Nov 15, 2016
1 parent e874baa commit 3085e0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/config/internal.php
Expand Up @@ -105,8 +105,9 @@
),
// These are defaults and are later overwritten in LSYii_Application by a path based on config tempdir/tempurl
'assetManager' => array(
'excludeFiles' => array("config.xml", "assessment.pstpl", "clearall.pstpl", "completed.pstpl", "endgroup.pstpl", "endpage.pstpl", "groupdescription.pstpl", "load.pstpl", "navigator.pstpl", "printanswers.pstpl", "print_group.pstpl", "print_question.pstpl", "print_survey.pstpl", "privacy.pstpl", "question.pstpl", "register.pstpl", "save.pstpl", "startgroup.pstpl", "startpage.pstpl", "surveylist.pstpl", "survey.pstpl", "welcome.pstpl" ),
'baseUrl' => '/tmp/assets',
'basePath'=> dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'assets'
'basePath'=> dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'assets',
),

'request' => array(
Expand Down

3 comments on commit 3085e0a

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that it can't be done at package level...

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested in develop : we can not excludeFiles with complete directory (without fixing/update Yii framework)
https://github.com/LimeSurvey/LimeSurvey/blob/develop/application/models/TemplateConfiguration.php#L226

My idea is to exclude /var/www/limesurvey/templates/templatename/views/ and /var/www/limesurvey/templates/templatename/pstpl/ , but the test done in https://github.com/LimeSurvey/LimeSurvey/blob/master/framework/utils/CFileHelper.php#L144 always add $base, then test : /var/www/limesurvey/templates/templatename/var/www/limesurvey/templates/templatename/views/.

It's silly .... Yii2 seems to have a 'only' options : yiisoft/yii2@8a506e1 , then for template package we can publish only css/ js/ files/ and (maybe) favicon.ico .

Leave for Yii2 update ?

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here the discussion of the Yii team about it:
yiisoft/yii#258

Maybe we'll do the PR

Please sign in to comment.