</div>
<div class="action-link">
- <a id='notDuplicate' href="#" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}' );return false;">» {ts}Mark this pair as not a duplicate.{/ts}</a>
+ <a id='notDuplicate' href="#" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{if $rgid}{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}{/if}' );return false;">» {ts}Mark this pair as not a duplicate.{/ts}</a>
</div>
-<table>
+<table class="row-highlight">
<tr class="columnheader">
<th> </th>
- <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$other_cid"}">{$other_name} <em>{$other_contact_subtype}</em></a> ({ts}duplicate{/ts})</th>
+ <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$other_cid"}">{$other_name}</a> ({ts}duplicate{/ts})</th>
<th>{ts}Mark All{/ts}<br />=={$form.toggleSelect.html} ==></th>
- <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$main_cid"}">{$main_name} <em>{$main_contact_subtype}</em></a></th>
+ <th><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$main_cid"}">{$main_name}</a></th>
</tr>
{foreach from=$rows item=row key=field}
<tr class="{cycle values="odd-row,even-row"}">
*
*/
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,
));
//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'])));
-
}
/**