Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
jimyhuang committed Apr 11, 2024
2 parents 0105375 + 7de6d02 commit 1339207
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CRM/Contribute/Form/PCP/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public function postProcess() {
if (!$attachmentIsExist && !empty($params['preset_image'])) {
$config = CRM_Core_Config::singleton();
$pcpPresetNum = CRM_Utils_Type::escape($params['preset_image'], 'Integer');
$pcpPresetFile = 'pcp_preset_'.$pcpPresetNum.'.png';
$pcpPresetFile = 'pcp_preset_'.$pcpPresetNum.'.webp';
$dest = $config->customFileUploadDir.$pcpPresetFile;
global $civicrm_root;
if (!file_exists($dest) && file_exists($civicrm_root.'packages/midjourney/'.$pcpPresetFile)) {
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Form/attachment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
if (!$('.pcp-preset-img-list').length && $('.pcp-select-from-gallery').length && $('input[name="preset_image"][type="hidden"]').length) {
let pcpPresetImgList = '<ul class="pcp-preset-img-list is-active">';
for (let i = presetImgStartIndex; i <= presetImgMaxNum; i++) {
pcpPresetImgList += `<li class='item' data-img-id="${i}"><img src="{/literal}{$config->resourceBase}{literal}packages/midjourney/pcp_preset_${i}.png"></li>`;
pcpPresetImgList += `<li class='item' data-img-id="${i}"><img src="{/literal}{$config->resourceBase}{literal}packages/midjourney/pcp_preset_${i}.webp"></li>`;
}
pcpPresetImgList += '</ul>';
$('.pcp-select-from-gallery').prepend(pcpPresetImgList);
Expand Down

0 comments on commit 1339207

Please sign in to comment.