Skip to content
Snippets Groups Projects
Unverified Commit 44907a93 authored by colemanw's avatar colemanw Committed by GitHub
Browse files

Merge pull request #749 from eileenmcnaughton/patch-6

Remove pass-by-reference from form variable
parents f973bdd6 517c50db
No related branches found
No related tags found
No related merge requests found
......@@ -21,12 +21,12 @@ a form or an API, use the pre and post hooks instead.
* @param string $formName
* @param CRM_Core_Form $form
*/
hook_civicrm_postProcess($formName, &$form)
hook_civicrm_postProcess($formName, $form)
## Parameters
- string $formName - the name of the form
- object $form - reference to the form object
- CRM_Core_Form $form - form object
## Returns
......@@ -59,7 +59,7 @@ a form or an API, use the pre and post hooks instead.
* @param string $formName
* @param CRM_Core_Form $form
*/
function drupalptsav2_civicrm_postProcess($formName, &$form) {
function drupalptsav2_civicrm_postProcess($formName, $form) {
if ( is_a( $form, 'CRM_Profile_Form_Contact' ) ) {
$gid = $form->getVar( '_gid' );
// Get your profile id from Administer CiviCRM >> Profile; I'm using 3 and 4
......@@ -77,7 +77,7 @@ a form or an API, use the pre and post hooks instead.
}
function drupalptsav2_civicrm_postProcess_CRM_Profile_Form_Edit_3($formName, &$form, $gid) {
function drupalptsav2_civicrm_postProcess_CRM_Profile_Form_Edit_3($formName, $form, $gid) {
$userID = $form->getVar( '_id' );
......@@ -99,7 +99,7 @@ a form or an API, use the pre and post hooks instead.
}
function drupalptsav2_civicrm_postProcess_CRM_Profile_Form_Edit_4($formName, &$form, $gid) {
function drupalptsav2_civicrm_postProcess_CRM_Profile_Form_Edit_4($formName, $form, $gid) {
$userID = $form->getVar('_id');
......@@ -112,4 +112,4 @@ a form or an API, use the pre and post hooks instead.
$params = array(1 => array(CRM_Utils_Date::getToday(null, 'YmdHis'), 'Timestamp'),
2 => array( $userID, 'Integer'));
CRM_Core_DAO::executeQuery($query, $params);
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment