Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] [Import] Remove warning count - never returned #23240

Merged
merged 1 commit into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions CRM/Activity/Import/Parser/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public function run(
return FALSE;
}

$this->_lineCount = $this->_warningCount = 0;
$this->_lineCount = 0;
$this->_invalidRowCount = $this->_validCount = 0;
$this->_totalCount = $this->_conflictCount = 0;

Expand Down Expand Up @@ -578,13 +578,6 @@ public function run(
}
}

if ($returnCode & self::WARNING) {
$this->_warningCount++;
if ($this->_warningCount < $this->_maxWarningCount) {
$this->_warningCount[] = $line;
}
}

if ($returnCode & self::ERROR) {
$this->_invalidRowCount++;
$recordNumber = $this->_lineCount;
Expand Down
11 changes: 3 additions & 8 deletions CRM/Contact/Import/Parser/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public function mapField(&$values) {
*
* @return bool
* the result of this processing
* CRM_Import_Parser::ERROR or CRM_Import_Parser::VALID
*/
public function preview(&$values) {
return $this->summary($values);
Expand All @@ -295,6 +296,7 @@ public function preview(&$values) {
*
* @return bool
* the result of this processing
* CRM_Import_Parser::ERROR or CRM_Import_Parser::VALID
*/
public function summary(&$values): int {
$erroneousField = NULL;
Expand Down Expand Up @@ -2605,7 +2607,7 @@ public function run(

$this->init();

$this->_rowCount = $this->_warningCount = 0;
$this->_rowCount = 0;
$this->_invalidRowCount = $this->_validCount = 0;
$this->_totalCount = $this->_conflictCount = 0;

Expand Down Expand Up @@ -2690,13 +2692,6 @@ public function run(
}
}

if ($returnCode & self::WARNING) {
$this->_warningCount++;
if ($this->_warningCount < $this->_maxWarningCount) {
$this->_warningCount[] = $line;
}
}

if ($returnCode & self::ERROR) {
$this->_invalidRowCount++;
array_unshift($values, $this->_rowCount);
Expand Down
9 changes: 1 addition & 8 deletions CRM/Contribute/Import/Parser/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function run(
return FALSE;
}

$this->_lineCount = $this->_warningCount = $this->_validSoftCreditRowCount = $this->_validPledgePaymentRowCount = 0;
$this->_lineCount = $this->_validSoftCreditRowCount = $this->_validPledgePaymentRowCount = 0;
$this->_invalidRowCount = $this->_validCount = $this->_invalidSoftCreditRowCount = $this->_invalidPledgePaymentRowCount = 0;
$this->_totalCount = $this->_conflictCount = 0;

Expand Down Expand Up @@ -287,13 +287,6 @@ public function run(
}
}

if ($returnCode == self::WARNING) {
$this->_warningCount++;
if ($this->_warningCount < $this->_maxWarningCount) {
$this->_warningCount[] = $line;
}
}

if ($returnCode == self::ERROR) {
$this->_invalidRowCount++;
$recordNumber = $this->_lineCount;
Expand Down
9 changes: 1 addition & 8 deletions CRM/Custom/Import/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function run(
return FALSE;
}

$this->_lineCount = $this->_warningCount = 0;
$this->_lineCount = 0;
$this->_invalidRowCount = $this->_validCount = 0;
$this->_totalCount = $this->_conflictCount = 0;

Expand Down Expand Up @@ -164,13 +164,6 @@ public function run(
}
}

if ($returnCode & self::WARNING) {
$this->_warningCount++;
if ($this->_warningCount < $this->_maxWarningCount) {
$this->_warnings[] = $this->_lineCount;
}
}

if ($returnCode & self::ERROR) {
$this->_invalidRowCount++;
$recordNumber = $this->_lineCount;
Expand Down
9 changes: 1 addition & 8 deletions CRM/Event/Import/Parser/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ public function run(
return FALSE;
}

$this->_lineCount = $this->_warningCount = 0;
$this->_lineCount = 0;
$this->_invalidRowCount = $this->_validCount = 0;
$this->_totalCount = $this->_conflictCount = 0;

Expand Down Expand Up @@ -851,13 +851,6 @@ public function run(
}
}

if ($returnCode & self::WARNING) {
$this->_warningCount++;
if ($this->_warningCount < $this->_maxWarningCount) {
$this->_warningCount[] = $line;
}
}

if ($returnCode & self::ERROR) {
$this->_invalidRowCount++;
$recordNumber = $this->_lineCount;
Expand Down
6 changes: 0 additions & 6 deletions CRM/Import/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ abstract class CRM_Import_Parser {
*/
protected $_duplicates;

/**
* Running total number of warnings
* @var int
*/
protected $_warningCount;

/**
* Maximum number of warnings to store
* @var int
Expand Down
9 changes: 1 addition & 8 deletions CRM/Member/Import/Parser/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function run(
return FALSE;
}

$this->_lineCount = $this->_warningCount = 0;
$this->_lineCount = 0;
$this->_invalidRowCount = $this->_validCount = 0;
$this->_totalCount = $this->_conflictCount = 0;

Expand Down Expand Up @@ -207,13 +207,6 @@ public function run(
}
}

if ($returnCode & self::WARNING) {
$this->_warningCount++;
if ($this->_warningCount < $this->_maxWarningCount) {
$this->_warningCount[] = $line;
}
}

if ($returnCode & self::ERROR) {
$this->_invalidRowCount++;
$recordNumber = $this->_lineCount;
Expand Down