Merge branch 4.5 into master
authorColeman Watts <coleman@civicrm.org>
Tue, 3 Feb 2015 13:50:35 +0000 (08:50 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 3 Feb 2015 13:52:10 +0000 (08:52 -0500)
Conflicts:
CRM/Core/BAO/CustomValueTable.php

1  2 
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/CustomValueTable.php
CRM/Core/Invoke.php
CRM/Pledge/Form/Payment.php
templates/CRM/Pledge/Form/Payment.tpl

Simple merge
Simple merge
index 531954ede60a4e604082946e9558dfd571f3eb95,ca79bbfe8f6e48d046e0515911c815ff0520ee3d..48d71a52c2905abef8345a5852fe263b48c0c1bc
@@@ -59,29 -58,66 +59,33 @@@ class CRM_Core_Invoke 
    }
  
    /**
 -   * @param $args
 +   * This is the same as invoke(), but it does *not* include exception
 +   * handling.
 +   *
 +   * @param array $args
 +   *   The parts of the URL which identify the intended CiviCRM page
 +   *   (e.g. array('civicrm', 'event', 'register')).
 +   * @return string
 +   *   HTML. For non-HTML content, invoke() may call print() and exit().
     */
 -  protected static function _invoke($args) {
 +  public static function _invoke($args) {
      if ($args[0] !== 'civicrm') {
 -      return;
 +      return NULL;
      }
+     // CRM-15901: Turn off PHP errors display for all ajax calls
+     if (CRM_Utils_Array::value(1, $args) == 'ajax' || CRM_Utils_Array::value('snippet', $_REQUEST)) {
+       ini_set('display_errors', 0);
+     }
  
      if (!defined('CIVICRM_SYMFONY_PATH')) {
 -      try {
 -        // Traditional Civi invocation path
 -        self::hackMenuRebuild($args); // may exit
 -        self::init($args);
 -        self::hackStandalone($args);
 -        $item = self::getItem($args);
 -        return self::runItem($item);
 -      }
 -      catch (CRM_Core_EXCEPTION $e) {
 -        $params = $e->getErrorData();
 -        $message = $e->getMessage();
 -        if (isset($params['legacy_status_bounce'])) {
 -          //@todo remove this- see comments on
 -          //https://github.com/eileenmcnaughton/civicrm-core/commit/ae686b09e2c987091612bb25ba0a58e520a203e7
 -          CRM_Core_Error::statusBounce($params['message']);
 -        }
 -        else {
 -          $session = CRM_Core_Session::singleton();
 -          $session->setStatus(
 -            $message,
 -            CRM_Utils_Array::value('message_title', $params),
 -            CRM_Utils_Array::value('message_type', $params, 'error')
 -          );
 -
 -          // @todo remove this code - legacy redirect path is an interim measure for moving redirects out of BAO
 -          // to somewhere slightly more acceptable. they should not be part of the exception class & should
 -          // be managed @ the form level - if you find a form that is triggering this piece of code
 -          // you should log a ticket for it to be removed with details about the form you were on.
 -          if(!empty($params['legacy_redirect_path'])) {
 -            if(CRM_Utils_System::isDevelopment()) {
 -              // here we could set a message telling devs to log it per above
 -            }
 -            CRM_Utils_System::redirect($params['legacy_redirect_path'], $params['legacy_redirect_query']);
 -          }
 -        }
 -      }
 -      catch (Exception $e) {
 -        // Recall: CRM_Core_Config is initialized before calling CRM_Core_Invoke
 -        $config = CRM_Core_Config::singleton();
 -        return CRM_Core_Error::handleUnhandledException($e);
 -        /*
 -        if ($config->backtrace) {
 -          return CRM_Core_Error::formatHtmlException($e);
 -        } else {
 -         // TODO
 -        }*/
 -      }
 -    } else {
 +      // Traditional Civi invocation path
 +      self::hackMenuRebuild($args); // may exit
 +      self::init($args);
 +      self::hackStandalone($args);
 +      $item = self::getItem($args);
 +      return self::runItem($item);
 +    }
 +    else {
        // Symfony-based invocation path
        require_once CIVICRM_SYMFONY_PATH . '/app/bootstrap.php.cache';
        require_once CIVICRM_SYMFONY_PATH . '/app/AppKernel.php';
index 6f0b6f99760e07ed323c24c7cd5a4180b363125d,182c1c2f41be525127e9080bdc8007bccad45e49..5d06b4686732a9f0d418c81859a6756ae9068289
@@@ -96,17 -100,14 +96,15 @@@ class CRM_Pledge_Form_Payment extends C
  
      $this->addMoney('scheduled_amount',
        ts('Scheduled Amount'), TRUE,
-       array(
-         'READONLY' => TRUE,
-         'style' => "background-color:#EBECE4",
-       ),
+       array('readonly' => TRUE),
        TRUE,
        'currency',
-       NULL, TRUE
+       NULL,
+       TRUE
      );
  
 -    $optionTypes = array('1' => ts('Adjust Pledge Payment Schedule?'),
 +    $optionTypes = array(
 +      '1' => ts('Adjust Pledge Payment Schedule?'),
        '2' => ts('Adjust Total Pledge Amount?'),
      );
      $element = $this->addRadio('option_type',
Simple merge