From 7964ef53a8e761cd99549a5b6e0248d831c9eef5 Mon Sep 17 00:00:00 2001 From: Deepak Srivastava Date: Tue, 26 Mar 2013 15:03:04 +0530 Subject: [PATCH] CRM-12213 --- CRM/Activity/Form/Activity.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php index bee06e27af..f5ebf354e7 100644 --- a/CRM/Activity/Form/Activity.php +++ b/CRM/Activity/Form/Activity.php @@ -372,7 +372,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { // 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)) { @@ -403,9 +403,14 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { 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'; } -- 2.25.1