Skip to content

Commit

Permalink
Merge pull request #13480 from pradpnayak/AdvanceSearch
Browse files Browse the repository at this point in the history
dev/core/issues/506, Fatal error on advance search when using cases from display results as
  • Loading branch information
monishdeb authored Jan 23, 2019
2 parents 173855d + 8424571 commit 1ba3579
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CRM/Contact/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,17 @@ public static function getModeToComponentMapping() {
public static function getModeSelect() {
self::setModeValues();

$enabledComponents = CRM_Core_Component::getEnabledComponents();
$componentModes = array();
foreach (self::$_modeValues as $id => & $value) {
if (strpos($value['component'], 'Civi') !== FALSE
&& !array_key_exists($value['component'], $enabledComponents)
) {
continue;
}
$componentModes[$id] = $value['selectorLabel'];
}

$enabledComponents = CRM_Core_Component::getEnabledComponents();

// unset disabled components
if (!array_key_exists('CiviMail', $enabledComponents)) {
unset($componentModes[CRM_Contact_BAO_Query::MODE_MAILING]);
Expand Down

0 comments on commit 1ba3579

Please sign in to comment.