X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FFinancial%2FForm%2FExport.php;h=e459d0cf38a046da0d11ee8f64410e2efecda805;hb=8616758a02e868d4cb837df3883bd8f0eace96f9;hp=71409920083ee6431a5dce9528fcf08b3c5d2a23;hpb=e425a965789b9e5a86069069c8fa18c50d3e2b6a;p=civicrm-core.git diff --git a/CRM/Financial/Form/Export.php b/CRM/Financial/Form/Export.php index 7140992008..e459d0cf38 100644 --- a/CRM/Financial/Form/Export.php +++ b/CRM/Financial/Form/Export.php @@ -1,7 +1,7 @@ _id = CRM_Utils_Request::retrieve('id', 'Positive', $this); // this mean it's a batch action - if (!$this->_id ) { + if (!$this->_id) { if (!empty($_GET['batch_id'])) { //validate batch ids $batchIds = explode(',', $_GET['batch_id']); - foreach($batchIds as $batchId) { - CRM_Utils_Type::validate($batchId,'Positive'); + foreach ($batchIds as $batchId) { + CRM_Utils_Type::validate($batchId, 'Positive'); } $this->_batchIds = $_GET['batch_id']; @@ -101,9 +99,9 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { //check if batch status is valid, do not allow exported batches to export again $batchStatus = CRM_Batch_BAO_Batch::getBatchStatuses($this->_batchIds); - foreach( $batchStatus as $batchStatusId ) { + foreach ($batchStatus as $batchStatusId) { if ($batchStatusId == $this->_exportStatusId) { - CRM_Core_Error::fatal(ts('You cannot exported the batches which were exported earlier.')); + CRM_Core_Error::fatal(ts('You cannot exported the batches which were exported earlier.')); } } @@ -113,12 +111,11 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { } /** - * Build the form + * Build the form object * - * @access public * @return void */ - function buildQuickForm() { + public function buildQuickForm() { // this mean it's a batch action if (!empty($this->_batchIds)) { $batchNames = CRM_Batch_BAO_Batch::getBatchNames($this->_batchIds); @@ -153,12 +150,11 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { } /** - * process the form after the input has been submitted and validated + * Process the form after the input has been submitted and validated * - * @access public * @return void */ - public function postProcess( ) { + public function postProcess() { if (!$this->_exportFormat) { $params = $this->exportValues(); $this->_exportFormat = $params['export_format']; @@ -167,7 +163,7 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { if ($this->_id) { $batchIds = array($this->_id); } - else if (!empty($this->_batchIds)) { + elseif (!empty($this->_batchIds)) { $batchIds = explode(',', $this->_batchIds); } // Recalculate totals @@ -180,7 +176,7 @@ class CRM_Financial_Form_Export extends CRM_Core_Form { $batchParams['status_id'] = $this->_exportStatusId; $ids = array(); - foreach($batchIds as $batchId) { + foreach ($batchIds as $batchId) { $batchParams['id'] = $ids['batchID'] = $batchId; // Update totals $batchParams = array_merge($batchParams, $totals[$batchId]);