X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FConfig.php;h=72553ed90eec137d449a46ea199fd880713da50e;hb=c239e5835db683d75631585007664fe690420ef3;hp=8533d4be408716c4079228158211a15cf63fb1db;hpb=6de877255b5e0807eb4b6c660f6d013bd0d2a961;p=civicrm-core.git diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 8533d4be40..72553ed90e 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -41,6 +41,9 @@ require_once 'Mail.php'; require_once 'api/api.php'; +/** + * Class CRM_Core_Config + */ class CRM_Core_Config extends CRM_Core_Config_Variables { /// /// BASE SYSTEM PROPERTIES (CIVICRM.SETTINGS.PHP) @@ -82,6 +85,11 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { */ public $userSystem = NULL; + /** + * @var CRM_Core_Permission_Base + */ + public $userPermissionClass; + /** * The root directory where Smarty should store compiled files * @@ -213,7 +221,7 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { self::$_singleton->_initVariables(); - // I dont think we need to do this twice + // I don't think we need to do this twice // however just keeping this commented for now in 4.4 // in case we hit any issues - CRM-13064 // We can safely delete this once we release 4.4.4 @@ -227,7 +235,7 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { // CRM-9803, NYSS-4822 // this causes various settings to be reset and hence we should - // only use the config object that we retrived from memcache + // only use the config object that we retrieved from memcache } self::$_singleton->initialized = 1; @@ -499,7 +507,7 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { CRM_Utils_System::mapConfigToSSL(); } $rrb = parse_url($this->userFrameworkResourceURL); - // dont use absolute path if resources are stored on a different server + // don't use absolute path if resources are stored on a different server // CRM-4642 $this->resourceBase = $this->userFrameworkResourceURL; if (isset($_SERVER['HTTP_HOST']) && @@ -851,6 +859,22 @@ AND $this->userFramework = $userFramework; $this->_setUserFrameworkConfig($userFramework); } + + /** + * Is back office credit card processing enabled for this site - ie are there any installed processors that support + * on-site processing + * @return bool + */ + static function isEnabledBackOfficeCreditCardPayments() { + // restrict to type=1 (credit card) payment processor payment_types and only include billing mode types 1 and 3 + $processors = CRM_Core_PseudoConstant::paymentProcessor(FALSE, FALSE, + "billing_mode IN ( 1, 3 ) AND payment_type = 1" + ); + if (count($processors) > 0) { + return TRUE; + } + return FALSE; + } } // end CRM_Core_Config