Skip to content

Commit

Permalink
Merge pull request #24442 from eileenmcnaughton/depp
Browse files Browse the repository at this point in the history
Increase the deprecation on some unused functions
  • Loading branch information
seamuslee001 authored Sep 3, 2022
2 parents 97e2ee3 + a475644 commit 96e0523
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions CRM/Import/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,6 @@ public function getContactSubType(): ?string {
*/
protected $_invalidRowCount;

/**
* Maximum number of non-empty/comment lines to process
*
* @var int
*/
protected $_maxLinesToProcess;

/**
* Array of error lines, bounded by MAX_ERROR
* @var array
Expand Down Expand Up @@ -437,20 +430,6 @@ protected function isFillDuplicates(): bool {
*/
protected $_rows;

/**
* Filename of error data
*
* @var string
*/
protected $_errorFileName;

/**
* Filename of duplicate data
*
* @var string
*/
protected $_duplicateFileName;

/**
* Contact type
*
Expand Down Expand Up @@ -485,13 +464,6 @@ public function setContactSubType(?int $contactSubType): self {
return $this;
}

/**
* Class constructor.
*/
public function __construct() {
$this->_maxLinesToProcess = 0;
}

/**
* Add progress bar to the import process. Calculates time remaining, status etc.
*
Expand All @@ -506,9 +478,12 @@ public function __construct() {
* @param $totalRowCount
* Total number of rows in the import file.
*
* @deprecated
*
* @return NULL|$currTimestamp
*/
public function progressImport($statusID, $startImport = TRUE, $startTimestamp = NULL, $prevTimestamp = NULL, $totalRowCount = NULL) {
CRM_Core_Error::deprecatedFunctionWarning('no replacement');
$statusFile = CRM_Core_Config::singleton()->uploadDir . "status_{$statusID}.txt";

if ($startImport) {
Expand Down Expand Up @@ -585,6 +560,7 @@ public function getHeaderPatterns(): array {
* @return void
*/
public static function encloseScrub(&$values, $enclosure = "'") {
CRM_Core_Error::deprecatedFunctionWarning('no replacement');
if (empty($values)) {
return;
}
Expand All @@ -604,6 +580,7 @@ public static function encloseScrub(&$values, $enclosure = "'") {
* @return void
*/
public function setMaxLinesToProcess($max) {
CRM_Core_Error::deprecatedFunctionWarning('no replacement');
$this->_maxLinesToProcess = $max;
}

Expand Down Expand Up @@ -774,6 +751,7 @@ private function tagImportedContactsWithNewTag(array $contactIDs, array $tags) {
* @return string
*/
public static function errorFileName($type) {
CRM_Core_Error::deprecatedFunctionWarning('no replacement');
$fileName = NULL;
if (empty($type)) {
return $fileName;
Expand Down Expand Up @@ -1307,6 +1285,7 @@ private function _civicrm_api3_deprecated_add_formatted_param(&$values, &$params
* @return mixed
*/
protected function parsePseudoConstantField($submittedValue, $fieldSpec) {
CRM_Core_Error::deprecatedFunctionWarning('no replacement');
// dev/core#1289 Somehow we have wound up here but the BAO has not been specified in the fieldspec so we need to check this but future us problem, for now lets just return the submittedValue
if (!isset($fieldSpec['bao'])) {
return $submittedValue;
Expand Down

0 comments on commit 96e0523

Please sign in to comment.