comment & whitepace
authoreileenmcnaugton <eileen@fuzion.co.nz>
Thu, 26 Nov 2015 07:44:10 +0000 (20:44 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Thu, 26 Nov 2015 07:44:10 +0000 (20:44 +1300)
CRM/Contribute/BAO/ContributionPage.php
tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php
tests/phpunit/CiviTest/CiviMailUtils.php

index 93ea158132b68c5bcdccb16319002d423ef91bb0..eacce736551c4bc56b1302983bcf485d73ff3804 100644 (file)
@@ -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.
index ab1c8a628ff38a3934276995913c964b8e2f8e11..964270c9650d3b20da8d9def4e44172b230ce766 100644 (file)
@@ -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();
index e3ba1266af19344f9233e317fd6fc33aea1738c0..6250b2274079679e3d2d8cc3c66fbfd4688c8592 100644 (file)
@@ -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);
     }
   }