From ab435bd44953b72a4947e78b7f490e3fb66f2832 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Thu, 14 Nov 2013 06:16:20 -0800 Subject: [PATCH] CRM-13621 - suppress entryURL for snippet forms ---------------------------------------- * CRM-13621: Handle invalid session errors for public pages in a nicer manner http://issues.civicrm.org/jira/browse/CRM-13621 --- CRM/Core/Form.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 91728c21be..5e6f2c78d3 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -358,9 +358,12 @@ class CRM_Core_Form extends HTML_QuickForm_Page { ) { $this->addElement('hidden', 'qfKey', $this->controller->_key); $this->assign('qfKey', $this->controller->_key); + } - if ($this->controller->_entryURL) { + // _generateQFKey suppresses the qfKey generation on form snippets that + // are part of other forms, hence we use that to avoid adding entryURL + if ($this->controller->_generateQFKey && $this->controller->_entryURL) { $this->addElement('hidden', 'entryURL', $this->controller->_entryURL); } -- 2.25.1