From 4d3d0c7f1c6856d29678100271ae31e1aaf76546 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Thu, 26 Nov 2015 20:44:10 +1300 Subject: [PATCH] comment & whitepace --- CRM/Contribute/BAO/ContributionPage.php | 7 ++++++- .../CRM/Core/Payment/AuthorizeNetIPNTest.php | 16 ++++++++-------- tests/phpunit/CiviTest/CiviMailUtils.php | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CRM/Contribute/BAO/ContributionPage.php b/CRM/Contribute/BAO/ContributionPage.php index 93ea158132..eacce73655 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -615,7 +615,12 @@ class CRM_Contribute_BAO_ContributionPage extends CRM_Contribute_DAO_Contributio } /** - * Add the custom fields for contribution page (ie profile) + * Add the custom fields for contribution page (ie profile). + * + * @deprecated assigning values to smarty like this is risky because + * - it is hard to debug since $name is used in the assign + * - it is potentially 'leaky' - it's better to do this on the form + * or close to where it is used / required. See CRM-17519 for leakage e.g. * * @param int $gid * Uf group id. diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php index ab1c8a628f..964270c965 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php @@ -181,14 +181,14 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase { 'This membership will be automatically renewed every', 'Dear Mrs. Antonia Anderson II', 'Thanks for your auto renew membership sign-up', - ), array( - 'First Name: Anthony', - 'First Name: Antonia', - 'Last Name: Anderson', - 'Supporter Profile', - 'Email Address: antonia_anderson@civicrm.org', - ) - ); + ), + array( + 'First Name: Anthony', + 'First Name: Antonia', + 'Last Name: Anderson', + 'Supporter Profile', + 'Email Address: antonia_anderson@civicrm.org', + )); $mut->stop(); $mut->clearMessages(); diff --git a/tests/phpunit/CiviTest/CiviMailUtils.php b/tests/phpunit/CiviTest/CiviMailUtils.php index e3ba1266af..6250b22740 100644 --- a/tests/phpunit/CiviTest/CiviMailUtils.php +++ b/tests/phpunit/CiviTest/CiviMailUtils.php @@ -327,7 +327,7 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase { throw new Exception("Not implementated: clearMessages for WebTest"); } else { - CRM_Core_DAO::executeQuery('DELETE FROM civicrm_mailing_spool ORDER BY id DESC LIMIT '. $limit); + CRM_Core_DAO::executeQuery('DELETE FROM civicrm_mailing_spool ORDER BY id DESC LIMIT ' . $limit); } } -- 2.25.1