CRM-15070 Fix for defualt value.
[civicrm-core.git] / CRM / Contribute / Form / Task.php
index c2143001d82a27e9d3aae3b710a209c1f59b1ba8..431552df0549b48270866b5afa1440ec45aff02e 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -100,6 +100,10 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form {
     self::preProcessCommon($this);
   }
 
+  /**
+   * @param $form
+   * @param bool $useTable
+   */
   static function preProcessCommon(&$form, $useTable = FALSE) {
     $form->_contributionIds = array();
 
@@ -152,7 +156,7 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form {
 
       $form->assign('totalSelectedContributions', count($ids));
     }
-    if ($form->_includesSoftCredits && !empty($contactIds)) {
+    if (!empty($form->_includesSoftCredits) && !empty($contactIds)) {
       $form->_contactIds = $contactIds;
       $form->_contributionContactIds = $contributionContactIds;
     }
@@ -197,7 +201,11 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form {
    * the form with a customized title for the main Submit
    *
    * @param string $title title of the main button
-   * @param string $type  button type for the form after processing
+   * @param string $nextType
+   * @param string $backType
+   * @param bool $submitOnce
+   *
+   * @internal param string $type button type for the form after processing
    *
    * @return void
    * @access public