Skip to content

Commit

Permalink
Fixed issue : empty template list if user don't have global rights on…
Browse files Browse the repository at this point in the history
… template

Dev: don't remove htmlspecialchars but unsure still need it ?
  • Loading branch information
Shnoulle committed Apr 18, 2018
1 parent e06a14d commit d7ef51d
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -276,8 +276,7 @@ function checkSelect2Languages(mylangs) {
<?php
$aTemplateList = Template::getTemplateListWithPreviews();
foreach ($aTemplateList as $templateName => $preview) {

if (Permission::model()->hasGlobalPermission('templates','read') || hasTemplateManageRights(Yii::app()->session["loginID"], $tname) == 1 || $oSurvey->template==htmlspecialchars($tname) ) { ?>
if (Permission::model()->hasGlobalPermission('templates','read') || Permission::model()->hasTemplatePermission($templateName) || $oSurvey->template==htmlspecialchars($templateName) ) { ?>
<option value='<?php echo $templateName; ?>'
<?php if ($oSurvey->template && htmlspecialchars($templateName) == $oSurvey->template) { ?>
selected='selected'
Expand Down

0 comments on commit d7ef51d

Please sign in to comment.