From 918eeb342157f26f70a8a93454556f6e1584b771 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 10 Sep 2015 16:34:05 -0700 Subject: [PATCH] CRM_Extension_System - Make it a little easier to skim. --- CRM/Extension/System.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/CRM/Extension/System.php b/CRM/Extension/System.php index 35062c2350..e453bc167f 100644 --- a/CRM/Extension/System.php +++ b/CRM/Extension/System.php @@ -92,17 +92,10 @@ class CRM_Extension_System { */ public function __construct($parameters = array()) { $config = CRM_Core_Config::singleton(); - $configKeys = array( - 'extensionsDir', - 'extensionsURL', - 'resourceBase', - 'userFrameworkBaseURL', - ); - foreach ($configKeys as $key) { - if (!array_key_exists($key, $parameters)) { - $parameters[$key] = $config->{$key}; - } - } + $parameters['extensionsDir'] = CRM_Utils_Array::value('extensionsDir', $parameters, $config->extensionsDir); + $parameters['extensionsURL'] = CRM_Utils_Array::value('extensionsURL', $parameters, $config->extensionsURL); + $parameters['resourceBase'] = CRM_Utils_Array::value('resourceBase', $parameters, $config->resourceBase); + $parameters['userFrameworkBaseURL'] = CRM_Utils_Array::value('userFrameworkBaseURL', $parameters, $config->userFrameworkBaseURL); if (!array_key_exists('civicrm_root', $parameters)) { $parameters['civicrm_root'] = $GLOBALS['civicrm_root']; } -- 2.25.1