CRM-14826 preserve context with custom search results
authorBrian Shaughnessy <brian@lcdservices.biz>
Mon, 9 Jun 2014 19:05:20 +0000 (15:05 -0400)
committerBrian Shaughnessy <brian@lcdservices.biz>
Mon, 9 Jun 2014 19:05:20 +0000 (15:05 -0400)
CRM/Contact/Selector/Custom.php

index 95a773c0ba2e1b6957289d77f4bdd6be2a3f51d7..36a12037cf96a389646151a841f615884f5dd855 100644 (file)
@@ -172,6 +172,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
    */
   static function &links() {
     list($key) = func_get_args();
+    $searchContext = "&context=custom";
     $extraParams = ($key) ? "&key={$key}" : NULL;
 
     if (!(self::$_links)) {
@@ -179,7 +180,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector {
         CRM_Core_Action::VIEW => array(
           'name' => ts('View'),
           'url' => 'civicrm/contact/view',
-          'qs' => "reset=1&cid=%%id%%{$extraParams}",
+          'qs' => "reset=1&cid=%%id%%{$extraParams}{$searchContext}",
           'title' => ts('View Contact Details'),
         ),
         CRM_Core_Action::UPDATE => array(