$skipColumnHeader = FALSE,
$mode = self::MODE_PREVIEW,
$contactType = self::CONTACT_INDIVIDUAL,
- $onDuplicate = self::DUPLICATE_SKIP
+ $onDuplicate = self::DUPLICATE_SKIP,
+ $statusID = NULL,
+ $totalRowCount = NULL
) {
if (!is_array($fileName)) {
CRM_Core_Error::fatal();
$this->_conflicts = array();
$this->_pledgePaymentErrors = array();
$this->_softCreditErrors = array();
+ if ($statusID) {
+ $this->progressImport($statusID);
+ $startTimestamp = $currTimestamp = $prevTimestamp = time();
+ }
$this->_fileSize = number_format(filesize($fileName) / 1024.0, 2);
}
elseif ($mode == self::MODE_IMPORT) {
$returnCode = $this->import($onDuplicate, $values);
+ if ($statusID && (($this->_lineCount % 50) == 0)) {
+ $prevTimestamp = $this->progressImport($statusID, FALSE, $startTimestamp, $prevTimestamp, $totalRowCount);
+ }
}
else {
$returnCode = self::ERROR;