From: Tim Otten Date: Wed, 15 Jan 2020 21:48:58 +0000 (-0800) Subject: CRM_Badge_Form_Layout - (Partially) Fix loading with alternate packages path X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6b51b85c55ab5293548f57ac38f06a2b3a2a7ef4;p=civicrm-core.git CRM_Badge_Form_Layout - (Partially) Fix loading with alternate packages path This change should work as well as before, and it's more correct. However, it's not a full fix making the badge-editor work in D8 - the relevant code probably needs more of a rethink. But... this is cleaner... --- diff --git a/CRM/Badge/Form/Layout.php b/CRM/Badge/Form/Layout.php index 5018dfaf73..25834a1901 100644 --- a/CRM/Badge/Form/Layout.php +++ b/CRM/Badge/Form/Layout.php @@ -34,7 +34,7 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form { $resources = CRM_Core_Resources::singleton(); $resources->addSetting( [ - 'kcfinderPath' => $config->userFrameworkResourceURL . 'packages' . DIRECTORY_SEPARATOR, + 'kcfinderPath' => CRM_Utils_File::addTrailingSlash(Civi::paths()->getVariable('civicrm.packages', 'url'), '/'), ] ); $resources->addScriptFile('civicrm', 'templates/CRM/Badge/Form/Layout.js', 1, 'html-header');