Merge pull request #4277 from rohankatkar/webtest_4.5.0
[civicrm-core.git] / CRM / Core / Block.php
index bbf5ec6e52fb19465a4417cd1496aa651c69587a..b191735ea780dc5bc7711dca81e0d1a1c60414fa 100644 (file)
@@ -368,7 +368,7 @@ class CRM_Core_Block {
 
       if (!empty($config->enableComponents)) {
         // check if we can process credit card contribs
-        $newCredit = CRM_Core_Payment::allowBackofficeCreditCard();
+        $newCredit = CRM_Core_Config::isEnabledBackOfficeCreditCardPayments();
 
         foreach ($components as $componentName => $obj) {
           if (in_array($componentName, $config->enableComponents)) {
@@ -431,6 +431,11 @@ class CRM_Core_Block {
     self::setProperty(self::CREATE_NEW, 'templateValues', array('shortCuts' => $values));
   }
 
+  /**
+   * @param $short
+   *
+   * @return array
+   */
   private static function setShortcutValues($short) {
     $value = array();
     if (isset($short['url'])) {
@@ -549,6 +554,8 @@ class CRM_Core_Block {
       $session = CRM_Core_Session::singleton();
       // check if registration link should be displayed
       foreach ($info as $id => $event) {
+        //@todo FIXME  - validRegistraionRequest takes eventID not contactID as a param
+        // this is called via an obscure patch from Joomla event block rendering (only)
         $info[$id]['onlineRegistration'] = CRM_Event_BAO_Event::validRegistrationRequest($event,
           $session->get('userID')
         );