3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class summarizes the import results
21 class CRM_Member_Import_Form_Summary
extends CRM_Import_Form_Summary
{
24 * Set variables up before form is built.
28 public function preProcess() {
29 // set the error message path to display
30 $this->assign('errorFile', $this->get('errorFile'));
32 $totalRowCount = $this->get('totalRowCount');
33 $this->set('totalRowCount', $totalRowCount);
35 $invalidRowCount = $this->get('invalidRowCount');
36 $duplicateRowCount = $this->get('duplicateRowCount');
37 $onDuplicate = $this->get('onDuplicate');
39 if ($duplicateRowCount > 0) {
40 $urlParams = 'type=' . CRM_Import_Parser
::DUPLICATE
. '&parser=CRM_Member_Import_Parser_Membership';
41 $this->set('downloadDuplicateRecordsUrl', CRM_Utils_System
::url('civicrm/export', $urlParams));
44 $duplicateRowCount = 0;
45 $this->set('duplicateRowCount', $duplicateRowCount);
48 $this->assign('dupeError', FALSE);
50 if ($onDuplicate == CRM_Import_Parser
::DUPLICATE_UPDATE
) {
51 $dupeActionString = ts('These records have been updated with the imported data.');
53 elseif ($onDuplicate == CRM_Import_Parser
::DUPLICATE_FILL
) {
54 $dupeActionString = ts('These records have been filled in with the imported data.');
59 $dupeActionString = ts('These records have not been imported.');
61 $this->assign('dupeError', TRUE);
63 /* only subtract dupes from successful import if we're skipping */
65 $this->set('validRowCount', $totalRowCount - $invalidRowCount -
69 $this->assign('dupeActionString', $dupeActionString);
75 'downloadErrorRecordsUrl',
77 'downloadDuplicateRecordsUrl',
80 foreach ($properties as $property) {
81 $this->assign($property, $this->get($property));