Skip to content

Commit

Permalink
Merge pull request #512 from francescbassas/patch-1
Browse files Browse the repository at this point in the history
Define customTemplatesUrl absolute as templatesUrl
  • Loading branch information
mattwire authored May 22, 2022
2 parents 640ad12 + 8e5d9c5 commit 4c8248b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Mosaico/BAO/MosaicoTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public static function findBaseTemplates($ignoreCache = FALSE, $dispatchHooks =

$templatesLocation[] = ['dir' => $templatesDir, 'url' => $templatesUrl];

$customTemplatesDir = \Civi::paths()->getPath(CRM_Core_BAO_Setting::getItem('Mosaico Preferences', 'mosaico_custom_templates_dir'));
$customTemplatesUrl = \Civi::paths()->getUrl(CRM_Core_BAO_Setting::getItem('Mosaico Preferences', 'mosaico_custom_templates_url'));
$customTemplatesDir = \Civi::paths()->getPath(\Civi::settings()->get('mosaico_custom_templates_dir'));
$customTemplatesUrl = \Civi::paths()->getUrl(\Civi::settings()->get('mosaico_custom_templates_url'),'absolute');
if (!is_null($customTemplatesDir) && !is_null($customTemplatesUrl)) {
if (is_dir($customTemplatesDir)) {
$templatesLocation[] = ['dir' => $customTemplatesDir, 'url' => $customTemplatesUrl];
Expand Down

0 comments on commit 4c8248b

Please sign in to comment.