Skip to content

Commit

Permalink
Fixed issue # 17207: When attaching using the theme editor, full path…
Browse files Browse the repository at this point in the history
… is displayed on the screen (#1840)
  • Loading branch information
gabrieljenik committed Apr 8, 2021
1 parent 1ba16bf commit c127f5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions application/controllers/admin/themes.php
Expand Up @@ -938,11 +938,14 @@ protected function _templatesummary($templatename, $screenname, $editfile, $rela
break;
}

$sFileDisplayName = ltrim(str_replace(Yii::app()->getConfig('rootdir'), '', $editfile), DIRECTORY_SEPARATOR);

$editableCssFiles = $oEditedTemplate->getValidScreenFiles("css");
$filesdir = $oEditedTemplate->filesPath;
$aData['oEditedTemplate'] = $oEditedTemplate;
$aData['screenname'] = $screenname;
$aData['editfile'] = $editfile;
$aData['filedisplayname'] = $sFileDisplayName;
$aData['relativePathEditfile'] = $relativePathEditfile;
$aData['tempdir'] = $tempdir;
$aData['templatename'] = $templatename;
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/themes/templatesummary_view.php
Expand Up @@ -8,7 +8,7 @@
<div class="row template-sum">
<div class="col-lg-12">
<div class="h4">
<?php echo sprintf(gT("Viewing file '%s'"),$editfile); ?>
<?php echo sprintf(gT("Viewing file '%s'"), $filedisplayname); ?>
</div>

<?php if (!is_writable($templates[$templatename])) { ?>
Expand Down

0 comments on commit c127f5b

Please sign in to comment.