From: kurund Date: Mon, 25 Aug 2014 05:30:50 +0000 (+0530) Subject: Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-08-25-10-57-01 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9cc8b9b246a371b9621a8279545258073fbd0e48;p=civicrm-core.git Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-08-25-10-57-01 Conflicts: tests/phpunit/CiviTest/CiviUnitTestCase.php --- 9cc8b9b246a371b9621a8279545258073fbd0e48 diff --cc templates/CRM/Contact/Form/Merge.tpl index ae6eb0ac7c,bf1fdb5147..3b9eb8dab7 --- a/templates/CRM/Contact/Form/Merge.tpl +++ b/templates/CRM/Contact/Form/Merge.tpl @@@ -35,15 -35,15 +35,15 @@@ - +
- + - + {foreach from=$rows item=row key=field} diff --cc tests/phpunit/CiviTest/CiviUnitTestCase.php index b6d5a62298,496ca2df3b..deb4d67c49 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@@ -2803,8 -2534,6 +2803,9 @@@ AND ( TABLE_NAME LIKE 'civicrm_value * */ function setupACL() { + global $_REQUEST; + $_REQUEST = $this->_params; ++ CRM_Core_Config::singleton()->userPermissionClass->permissions = array('access CiviCRM'); $optionGroupID = $this->callAPISuccessGetValue('option_group', array('return' => 'id', 'name' => 'acl_role')); $optionValue = $this->callAPISuccess('option_value', 'create', array('option_group_id' => $optionGroupID, @@@ -2852,31 -2581,7 +2853,30 @@@ )); //flush cache CRM_ACL_BAO_Cache::resetCache(); - CRM_ACL_API::groupPermission('whatever', 9999, NULL, 'civicrm_saved_search', NULL, NULL, TRUE); + CRM_Contact_BAO_Group::getPermissionClause(TRUE); + CRM_ACL_API::groupPermission('whatever', 9999, NULL, 'civicrm_saved_search', NULL, NULL, TRUE); + } + + /** + * alter default price set so that the field numbers are not all 1 (hiding errors) + */ + function offsetDefaultPriceSet() { + $contributionPriceSet = $this->callAPISuccess('price_set', 'getsingle', array('name' => 'default_contribution_amount')); + $firstID = $contributionPriceSet['id']; + $this->callAPISuccess('price_set', 'create', array('id' => $contributionPriceSet['id'], 'is_active' => 0, 'name' => 'old')); + unset($contributionPriceSet['id']); + $newPriceSet = $this->callAPISuccess('price_set', 'create', $contributionPriceSet); + $priceField = $this->callAPISuccess('price_field', 'getsingle', array('price_set_id' => $firstID, 'options' => array('limit' => 1))); + unset($priceField['id']); + $priceField['price_set_id'] = $newPriceSet['id']; + $newPriceField = $this->callAPISuccess('price_field', 'create', $priceField); + $priceFieldValue = $this->callAPISuccess('price_field_value', 'getsingle', array('price_set_id' => $firstID, 'sequential' => 1, 'options' => array('limit' => 1))); + + unset($priceFieldValue['id']); + //create some padding to use up ids + $this->callAPISuccess('price_field_value', 'create', $priceFieldValue); + $this->callAPISuccess('price_field_value', 'create', $priceFieldValue); + $this->callAPISuccess('price_field_value', 'create', array_merge($priceFieldValue, array('price_field_id' => $newPriceField['id']))); - } /**
 {$other_name} {$other_contact_subtype} ({ts}duplicate{/ts}){$other_name} ({ts}duplicate{/ts}) {ts}Mark All{/ts}
=={$form.toggleSelect.html} ==>
{$main_name} {$main_contact_subtype}{$main_name}