Skip to content

Commit

Permalink
Merge pull request #19067 from eileenmcnaughton/weight
Browse files Browse the repository at this point in the history
Quick fix on summary actions conflict
  • Loading branch information
colemanw authored Dec 3, 2020
2 parents e10c022 + 76b6a55 commit a11f15b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CRM/Contact/BAO/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,11 @@ public static function contextMenu($contactId = NULL) {
}

// finally get menu item for -more- action widget.
while (!empty($contextMenu['moreActions'][$values['weight']])) {
// Quick & dirty way of handling 2 items with the same weight
// without clobbering one.
$values['weight']++;
}
$contextMenu['moreActions'][$values['weight']] = [
'title' => $values['title'],
'ref' => $values['ref'],
Expand All @@ -3198,6 +3203,11 @@ public static function contextMenu($contactId = NULL) {
}

// finally get menu item for -more- action widget.
while (!empty($contextMenu['otherActions'][$value['weight']])) {
// Quick & dirty way of handling 2 items with the same weight
// without clobbering one.
$value['weight']++;
}
$contextMenu['otherActions'][$value['weight']] = [
'title' => $value['title'],
'ref' => $value['ref'],
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Contact/Form/Search/CriteriaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CRM_Contact_Form_Search_CriteriaTest extends CiviUnitTestCase {
* Test that the 'multiple bulk email' setting correctly affects the type of
* field used for the 'email on hold' criteria in Advanced Search.
*/
public function testAdvancedHSearchObservesMultipleBulkEmailSetting() {
public function testAdvancedHSearchObservesMultipleBulkEmailSetting(): void {

// If setting is enabled, criteria should be a select element.
Civi::settings()->set('civimail_multiple_bulk_emails', 1);
Expand Down

0 comments on commit a11f15b

Please sign in to comment.