From: Tim Otten Date: Thu, 10 Sep 2015 23:34:05 +0000 (-0700) Subject: CRM_Extension_System - Make it a little easier to skim. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=918eeb342157f26f70a8a93454556f6e1584b771;p=civicrm-core.git CRM_Extension_System - Make it a little easier to skim. --- 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']; }