Skip to content
Snippets Groups Projects
Unverified Commit 4dee4841 authored by DaveD's avatar DaveD Committed by GitHub
Browse files

Merge pull request #31015 from totten/master-dompdf-formula

dompdf - Abide by configurable path to "upload" dir
parents c1464885 7313fed2
No related branches found
No related tags found
No related merge requests found
......@@ -290,7 +290,7 @@ class CRM_Utils_PDF_Utils {
foreach (['font_dir', 'chroot', 'log_output_file'] as $setting) {
$value = \Civi::settings()->get("dompdf_$setting");
if (isset($value)) {
$settings[$setting] = $value;
$settings[$setting] = Civi::paths()->getPath($value);
}
}
......@@ -315,7 +315,7 @@ class CRM_Utils_PDF_Utils {
$cacheDir = $settings['font_dir'] . DIRECTORY_SEPARATOR . 'font_cache';
}
else {
$cacheDir = Civi::paths()->getPath('[civicrm.files]/upload/font_cache');
$cacheDir = CRM_Core_Config::singleton()->uploadDir . '/font_cache';
}
// Try to create dir if it doesn't exist or return empty string
if ((!is_dir($cacheDir)) && (!mkdir($cacheDir))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment