CRM-14944 QA fixes
authoratif-shaikh <shaikh388@gmail.com>
Mon, 7 Jul 2014 11:38:12 +0000 (17:08 +0530)
committeratif-shaikh <shaikh388@gmail.com>
Mon, 7 Jul 2014 11:38:12 +0000 (17:08 +0530)
----------------------------------------
* CRM-14944: function should not be called statically - pledge page
  https://issues.civicrm.org/jira/browse/CRM-14944

CRM/Pledge/Page/Tab.php

index 152e8b7caf354b5d3a1498b31bb89608de8a34a1..15b9f2f8ff6dc1ed8dc60618aa0f66de787c47a5 100644 (file)
@@ -159,7 +159,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
     return parent::run();
   }
 
-  function setContext(&$form) {
+  public static function setContext(&$form) {
     $context = CRM_Utils_Request::retrieve('context', 'String', $form, FALSE, 'search');
 
     $qfKey = CRM_Utils_Request::retrieve('key', 'String', $form);
@@ -189,7 +189,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
 
       case 'pledge':
         $url = CRM_Utils_System::url('civicrm/contact/view',
-          "reset=1&force=1&cid={$this->_contactId}&selectedChild=pledge"
+          "reset=1&force=1&cid={$form->_contactId}&selectedChild=pledge"
         );
         break;
 
@@ -199,7 +199,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
 
       case 'activity':
         $url = CRM_Utils_System::url('civicrm/contact/view',
-          "reset=1&force=1&cid={$this->_contactId}&selectedChild=activity"
+          "reset=1&force=1&cid={$form->_contactId}&selectedChild=activity"
         );
         break;