// set user context
$urlParams = $urlString = NULL;
- $qfKey = CRM_Utils_Request::retrieve('key', 'String', $this);
+ $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
//validate the qfKey
if (!CRM_Utils_Rule::qfKey($qfKey)) {
if ($qfKey) {
$urlParams .= "&qfKey=$qfKey";
}
- if ($this->_compContext == 'advanced') {
+ $path = CRM_Utils_System::currentPath();
+ if ($this->_compContext == 'advanced' ||
+ $path == 'civicrm/contact/search/advanced') {
$urlString = 'civicrm/contact/search/advanced';
}
+ else if ($path == 'civicrm/contact/search') {
+ $urlString = 'civicrm/contact/search';
+ }
else {
$urlString = 'civicrm/activity/search';
}