Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-01-18-17-02-24
authorTim Otten <totten@civicrm.org>
Sun, 19 Jan 2014 01:20:23 +0000 (17:20 -0800)
committerTim Otten <totten@civicrm.org>
Sun, 19 Jan 2014 01:20:23 +0000 (17:20 -0800)
Conflicts:
CRM/Contribute/Form/Contribution/Main.php
api/v3/Generic/Setvalue.php
templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl

21 files changed:
1  2 
CRM/Admin/Form/Setting/UpdateConfigBackend.php
CRM/Contact/BAO/Query.php
CRM/Contact/Form/Edit/Address.php
CRM/Contact/Form/Search/Builder.php
CRM/Contact/Selector.php
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/Form/Contribution/Main.php
CRM/Core/BAO/ActionSchedule.php
CRM/Core/BAO/Mapping.php
CRM/Core/Invoke.php
CRM/Event/Form/ManageEvent/Fee.php
CRM/Event/Form/Registration/Register.php
CRM/Export/BAO/Export.php
CRM/Mailing/Form/Upload.php
CRM/Report/Form.php
api/v3/Generic/Setvalue.php
api/v3/utils.php
css/civicrm.css
templates/CRM/Contribute/Form/Contribution/Main.tpl
templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl
templates/CRM/Contribute/Form/SoftCredit.tpl

index fca554346eb9f5e3f4cdb936d2909bccb62c3f22,623b8acd609d1b14e19769701a6d4b612636ce12..061c0933af27f2616eccfc93951c4014704df01a
@@@ -754,17 -759,32 +759,35 @@@ class CRM_Contact_BAO_Query 
                  }
                  elseif ($fieldName != 'id') {
                    if ($fieldName == 'prefix_id') {
-                     $this->_pseudoConstantsSelect['individual_prefix'] = array('pseudoField' => 'prefix_id', 'idCol' => "prefix_id", 'bao' => 'CRM_Contact_BAO_Contact');
+                     // Hack - profile views use different field name than normal views!
+                     $this->_pseudoConstantsSelect['prefix_id'] =
+                     $this->_pseudoConstantsSelect['individual_prefix'] = array(
+                       'pseudoField' => 'prefix_id',
+                       'idCol' => "prefix_id",
+                       'bao' => 'CRM_Contact_BAO_Contact'
+                     );
                    }
                    if ($fieldName == 'suffix_id') {
-                     $this->_pseudoConstantsSelect['individual_suffix'] = array('pseudoField' => 'suffix_id', 'idCol' => "suffix_id", 'bao' => 'CRM_Contact_BAO_Contact');
+                     // Hack - profile views use different field name than normal views!
+                     $this->_pseudoConstantsSelect['suffix_id'] =
+                     $this->_pseudoConstantsSelect['individual_suffix'] = array(
+                       'pseudoField' => 'suffix_id',
+                       'idCol' => "suffix_id",
+                       'bao' => 'CRM_Contact_BAO_Contact'
+                     );
                    }
                    if ($fieldName == 'gender_id') {
-                     $this->_pseudoConstantsSelect['gender'] = array('pseudoField' => 'gender_id', 'idCol' => "gender_id", 'bao' => 'CRM_Contact_BAO_Contact');
+                     // Hack - profile views use different field name than normal views!
+                     $this->_pseudoConstantsSelect['gender_id'] =
+                     $this->_pseudoConstantsSelect['gender'] = array(
+                       'pseudoField' => 'gender_id',
+                       'idCol' => "gender_id",
+                       'bao' => 'CRM_Contact_BAO_Contact'
+                     );
                    }
 +                  if ($name == 'communication_style_id') {
 +                    $this->_pseudoConstantsSelect['communication_style'] = array('pseudoField' => 'communication_style_id', 'idCol' => "communication_style_id", 'bao' => 'CRM_Contact_BAO_Contact');
 +                  }
                    $this->_select[$name] = "contact_a.{$fieldName}  as `$name`";
                  }
                }
Simple merge
Simple merge
Simple merge
Simple merge
index 64b90320fcdb709ff3407799d9ef56fba32add0f,f1fb2d6aac7185ca3f9cf0cf35be0def8cafb3bf..65c688ef2a77b79f460307b24a0df686571398cd
@@@ -114,9 -111,10 +111,14 @@@ class CRM_Contribute_Form_Contribution_
      }
      $this->assign('onBehalfRequired', $this->_onBehalfRequired);
  
-         CRM_Contact_Form_ProfileContact::preprocess($this);
-       }
 +    if (CRM_Utils_Array::value('honor_block_is_active', $this->_values)) {
++      CRM_Contact_Form_ProfileContact::preprocess($this);
++    }
++
+     if ($this->_snippet) {
+       $this->assign('isOnBehalfCallback', CRM_Utils_Array::value('onbehalf', $_GET, FALSE));
+       return;
+     }
  
      if (!empty($this->_pcpInfo['id']) && !empty($this->_pcpInfo['intro_text'])) {
        $this->assign('intro_text', $this->_pcpInfo['intro_text']);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index abe405a5eea6a30e53ea57771953e3ced2f0bde6,9802d97bc594e56a18b0f7041f9d1b036194b62e..be0553354b44757f5411e414676e0118447e6625
@@@ -26,7 -26,9 +26,10 @@@ function civicrm_api3_generic_setValue(
    }
  
    $def = $fields[$field];
-   if (array_key_exists('required', $def) && CRM_Utils_System::isNull($value)) {
+   // Disallow empty values except for the number zero.
+   // TODO: create a utility for this since it's needed in many places
++  // if (array_key_exists('required', $def) && CRM_Utils_System::isNull($value)) {
+   if (array_key_exists('required', $def) && empty($value) && $value !== '0' && $value !== 0) {
      return civicrm_api3_create_error(ts("This can't be empty, please provide a value"), array("error_code" => "required", "field" => $field));
    }
  
Simple merge
diff --cc css/civicrm.css
Simple merge
index f218ab69367f7be49792eebd7b600889a79ab8bc,b6ec06bf925d6f65fc01e7c3ec07ae100625afc1..c5c5506fe65ab42dc6dafef524b535470a8a1511
    }
  
  function showOnBehalf(onBehalfRequired) {
-   if ( cj( "#is_for_organization" ).prop('checked' ) || onBehalfRequired ) {
-     var urlPath = {/literal}"{crmURL p=$urlPath h=0 q='snippet=4&onbehalf=1'}";
-     urlPath += "{$urlParams}";
 -  if ( cj( "#is_for_organization" ).attr( 'checked' ) || onBehalfRequired ) {
++  if ( cj( "#is_for_organization" ).prop( 'checked' ) || onBehalfRequired ) {
+     var urlPath = {/literal}"{crmURL p=$urlPath h=0 q="snippet=4&onbehalf=1&id=$contributionPageID&qfKey=$qfKey"}";
      {if $mode eq 'test'}
        urlPath += '&action=preview';
      {/if}