From 08ffe40c3580ea3c8199ac3e6577c950a7ab4400 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 13:09:21 -0800 Subject: [PATCH] INFRA-132 - CRM/Friend - phpcbf --- CRM/Friend/BAO/Friend.php | 1 - CRM/Friend/Form.php | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CRM/Friend/BAO/Friend.php b/CRM/Friend/BAO/Friend.php index 8d679c51bc..95f5c55861 100644 --- a/CRM/Friend/BAO/Friend.php +++ b/CRM/Friend/BAO/Friend.php @@ -120,7 +120,6 @@ class CRM_Friend_BAO_Friend extends CRM_Friend_DAO_Friend { $frndParams['entity_table'] = $params['entity_table']; self::getValues($frndParams); - $activityTypeId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', 'Tell a Friend', 'value', 'name'); //create activity diff --git a/CRM/Friend/Form.php b/CRM/Friend/Form.php index bab5258040..2d3ecec1bc 100644 --- a/CRM/Friend/Form.php +++ b/CRM/Friend/Form.php @@ -303,18 +303,18 @@ class CRM_Friend_Form extends CRM_Core_Form { $this->assign('linkTextUrl', $linkTextUrl); $this->assign('linkText', $linkText); } - } else if ( $this->_entityTable == 'civicrm_event' ) { - // If this is tell a friend after registering for an event, give donor link to create their own fundraising page - require_once 'CRM/PCP/BAO/PCP.php'; - if ( $linkText = CRM_PCP_BAO_PCP::getPcpBlockStatus( $defaults['entity_id'], $defaults['entity_table'] ) ) { - $linkTextUrl = CRM_Utils_System::url( 'civicrm/contribute/campaign', + } else if ( $this->_entityTable == 'civicrm_event' ) { + // If this is tell a friend after registering for an event, give donor link to create their own fundraising page + require_once 'CRM/PCP/BAO/PCP.php'; + if ( $linkText = CRM_PCP_BAO_PCP::getPcpBlockStatus( $defaults['entity_id'], $defaults['entity_table'] ) ) { + $linkTextUrl = CRM_Utils_System::url( 'civicrm/contribute/campaign', "action=add&reset=1&pageId={$defaults['entity_id']}&component=event", - false, null, true, - true ); - $this->assign( 'linkTextUrl', $linkTextUrl ); - $this->assign( 'linkText', $linkText ); + FALSE, NULL, TRUE, + TRUE ); + $this->assign( 'linkTextUrl', $linkTextUrl ); + $this->assign( 'linkText', $linkText ); + } } - } CRM_Utils_System::setTitle($defaults['thankyou_title']); $this->assign('thankYouText', $defaults['thankyou_text']); -- 2.25.1