$key = NULL,
$compContext = NULL) {
static $activityActTypes = NULL;
+ //CRM-14277 added addtitional param to handle activity search
+ $extraParams = "&searchContext=activity";
- $extraParams = ($key) ? "&key={$key}" : NULL;
+ $extraParams .= ($key) ? "&key={$key}" : NULL;
if ($compContext) {
$extraParams .= "&compContext={$compContext}";
}
);
$compContext = CRM_Utils_Request::retrieve('compContext', 'String', $this);
+ $searchContext = CRM_Utils_Request::retrieve('searchContext', 'String', $this);
+
//swap the context.
if ($context == 'search' && $compContext) {
$context = $compContext;
if ($context == 'advanced') {
$url = CRM_Utils_System::url('civicrm/contact/search/advanced', $extraParams);
}
+ else if ($searchContext) {
+ $url = CRM_Utils_System::url("civicrm/$searchContext/search", $extraParams);
+ }
else {
$url = CRM_Utils_System::url('civicrm/contribute/search', $extraParams);
}
'String', $this
);
+ $searchContext = CRM_Utils_Request::retrieve('searchContext', 'String', $this);
+
$qfKey = CRM_Utils_Request::retrieve('key', 'String', $this);
//validate the qfKey
if ($compContext == 'advanced') {
$url = CRM_Utils_System::url('civicrm/contact/search/advanced', $urlParams);
}
+ else if ($searchContext) {
+ $url = CRM_Utils_System::url('civicrm/activity/search', $urlParams);
+ }
else {
$url = CRM_Utils_System::url('civicrm/event/search', $urlParams);
}
$context = CRM_Utils_Request::retrieve('context', 'String', $form, FALSE, 'search' );
$qfKey = CRM_Utils_Request::retrieve('key', 'String', $form);
+
+ $searchContext = CRM_Utils_Request::retrieve('searchContext', 'String', $this);
+
//validate the qfKey
if (!CRM_Utils_Rule::qfKey($qfKey)) {
$qfKey = NULL;
$urlParams .= "&qfKey=$qfKey";
}
$form->assign('searchKey', $qfKey);
-
- $url = CRM_Utils_System::url('civicrm/member/search', $urlParams);
+
+ if ($searchContext) {
+ $url = CRM_Utils_System::url("civicrm/$searchContext/search", $urlParams);
+ }
+ else {
+ $url = CRM_Utils_System::url('civicrm/member/search', $urlParams);
+ }
break;
case 'home':