From c7e7164fd84835ac7c74479e096a78654212bfe3 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 e3fbe0fa69..092c6a2ed7 100644 --- a/CRM/Contribute/BAO/ContributionPage.php +++ b/CRM/Contribute/BAO/ContributionPage.php @@ -604,7 +604,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 5ad7f70bfb..ca3d7eb392 100644 --- a/tests/phpunit/CiviTest/CiviMailUtils.php +++ b/tests/phpunit/CiviTest/CiviMailUtils.php @@ -348,7 +348,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