Remove another good intention from the import class
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 20 Apr 2022 09:40:06 +0000 (21:40 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 2 May 2022 00:52:56 +0000 (12:52 +1200)
Once upon a time - the import classes were written....

Back then it seemed like a good idea to give the derived classes
a way to abort processing.

Like unicorns and mermaids derived classes turned out to
be mythical creatures - not even found by searching the
git universe....

CRM/Activity/Import/Parser/Activity.php
CRM/Contact/Import/Parser/Contact.php
CRM/Contribute/Import/Parser/Contribution.php
CRM/Custom/Import/Parser/Api.php
CRM/Event/Import/Parser/Participant.php
CRM/Member/Import/Parser/Membership.php

index 2c7cce55cc74bb1b3351316417184375664fc237..19d40ae451b9323bcfd3a32e208db9baec88fc03 100644 (file)
@@ -594,12 +594,6 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Import_Parser {
         }
       }
 
-      // we give the derived class a way of aborting the process
-      // note that the return code could be multiple code or'ed together
-      if ($returnCode & self::STOP) {
-        break;
-      }
-
       // if we are done processing the maxNumber of lines, break
       if ($this->_maxLinesToProcess > 0 && $this->_validCount >= $this->_maxLinesToProcess) {
         break;
index 5caa074b9fc2668dbb5df5550cca4626bc3de78a..d87b8c02af03eec9fee98631c8de84585dc4b076 100644 (file)
@@ -2714,11 +2714,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
         array_unshift($values, $this->_rowCount);
         $this->_unparsedAddresses[] = $values;
       }
-      // we give the derived class a way of aborting the process
-      // note that the return code could be multiple code or'ed together
-      if ($returnCode & self::STOP) {
-        break;
-      }
 
       // see if we've hit our timeout yet
       /* if ( $the_thing_with_the_stuff ) {
index d68e0266085e9085b6714b353d967758d8ba91e9..3fe3493a49e4535e7071e88e4c6e7983e178b669 100644 (file)
@@ -340,12 +340,6 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser {
         }
       }
 
-      // we give the derived class a way of aborting the process
-      // note that the return code could be multiple code or'ed together
-      if ($returnCode == self::STOP) {
-        break;
-      }
-
       // if we are done processing the maxNumber of lines, break
       if ($this->_maxLinesToProcess > 0 && $this->_validCount >= $this->_maxLinesToProcess) {
         break;
index 6ad43712d6875328d6ece2150f6f15162aad1fa2..5bfb22f23839414ed079ffc78812636115c06fd5 100644 (file)
@@ -504,12 +504,6 @@ class CRM_Custom_Import_Parser_Api extends CRM_Import_Parser {
         }
       }
 
-      // we give the derived class a way of aborting the process
-      // note that the return code could be multiple code or'ed together
-      if ($returnCode & self::STOP) {
-        break;
-      }
-
       // if we are done processing the maxNumber of lines, break
       if ($this->_maxLinesToProcess > 0 && $this->_validCount >= $this->_maxLinesToProcess) {
         break;
index d279f048419eb9ee33af5f30f8f506105c90d35b..bd32fcf4d8db528a7c75d52c714f1776638d633f 100644 (file)
@@ -861,12 +861,6 @@ class CRM_Event_Import_Parser_Participant extends CRM_Import_Parser {
         }
       }
 
-      // we give the derived class a way of aborting the process
-      // note that the return code could be multiple code or'ed together
-      if ($returnCode & self::STOP) {
-        break;
-      }
-
       // if we are done processing the maxNumber of lines, break
       if ($this->_maxLinesToProcess > 0 && $this->_validCount >= $this->_maxLinesToProcess) {
         break;
index 5c90429fb66f1288cbb69e4255b4045284fe0c65..357339d5e529dc16e8fa83601b80d593d6798821 100644 (file)
@@ -231,12 +231,6 @@ class CRM_Member_Import_Parser_Membership extends CRM_Import_Parser {
         }
       }
 
-      // we give the derived class a way of aborting the process
-      // note that the return code could be multiple code or'ed together
-      if ($returnCode & self::STOP) {
-        break;
-      }
-
       // if we are done processing the maxNumber of lines, break
       if ($this->_maxLinesToProcess > 0 && $this->_validCount >= $this->_maxLinesToProcess) {
         break;