From 11cf613fe445a754ac8d91cd73f528309e02dca9 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Sat, 15 Aug 2015 20:22:07 +1200 Subject: [PATCH] CRM-16955 ensure cid & checksum vars from the url are available to js so they can be passed when loading billing form --- CRM/Core/Form.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index ea8615f5c3..f865ed1d91 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1885,12 +1885,14 @@ class CRM_Core_Form extends HTML_QuickForm_Page { // from that page // we don't really need to set it when $tempID is set because the params have that stored $this->set('cid', 0); + CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $tempID)); return (int) $tempID; } $userID = $this->getLoggedInUserContactID(); if (!is_null($tempID) && $tempID === $userID) { + CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $tempID)); return (int) $userID; } @@ -1900,11 +1902,14 @@ class CRM_Core_Form extends HTML_QuickForm_Page { //check for anonymous user. $validUser = CRM_Contact_BAO_Contact_Utils::validChecksum($tempID, $userChecksum); if ($validUser) { + CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $tempID)); + CRM_Core_Resources::singleton()->addVars('coreForm', array('checksum' => (int) $tempID)); return $tempID; } } // check if user has permission, CRM-12062 elseif ($tempID && CRM_Contact_BAO_Contact_Permission::allow($tempID)) { + CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $tempID)); return $tempID; } -- 2.25.1