diff --git a/classes/ChecklistVoucherReport.php b/classes/ChecklistVoucherReport.php index eac7448bfc..fb25ed3018 100644 --- a/classes/ChecklistVoucherReport.php +++ b/classes/ChecklistVoucherReport.php @@ -271,8 +271,6 @@ private function getMissingTaxaBaseSql($sqlFrag){ public function getMissingProblemTaxa(){ $retArr = Array(); if($sqlFrag = $this->getSqlFrag()){ - //Make sure tidinterpreted are valid - //$this->conn->query('UPDATE omoccurrences o INNER JOIN taxa t ON o.sciname = t.sciname SET o.tidinterpreted = t.tid WHERE o.tidinterpreted IS NULL'); //Grab records $sql = 'SELECT DISTINCT o.occid, c.institutioncode, c.collectioncode, o.catalognumber, o.sciname, o.recordedby, o.recordnumber, o.eventdate, '. 'CONCAT_WS("; ",o.country, o.stateprovince, o.county, o.locality) as locality '. diff --git a/classes/ImageLocalProcessor.php b/classes/ImageLocalProcessor.php index 09f799fb8f..fb1708e450 100644 --- a/classes/ImageLocalProcessor.php +++ b/classes/ImageLocalProcessor.php @@ -1557,7 +1557,8 @@ private function updateCollectionStats(){ $this->logOrEcho('Cleaning house...'); $collString = implode(',',$this->collProcessedArr); - if(!$occurMain->generalOccurrenceCleaning($collString)){ + $occurMain->setCollidStr($collString); + if(!$occurMain->generalOccurrenceCleaning()){ $errorArr = $occurMain->getErrorArr(); foreach($errorArr as $errorStr){ $this->logOrEcho($errorStr,1); @@ -1570,7 +1571,8 @@ private function updateCollectionStats(){ $this->logOrEcho('Updating statistics...'); foreach($this->collProcessedArr as $collid){ - if(!$occurMain->updateCollectionStats($collid)){ + $occurMain->setCollidStr($collid); + if(!$occurMain->updateCollectionStatsBasic()){ $errorArr = $occurMain->getErrorArr(); foreach($errorArr as $errorStr){ $this->logOrEcho($errorStr,1); diff --git a/classes/ImageProcessor.php b/classes/ImageProcessor.php index 8ec52c8f55..0b13aaba43 100644 --- a/classes/ImageProcessor.php +++ b/classes/ImageProcessor.php @@ -347,7 +347,8 @@ public function loadFileData($postArr){ $occurMain = new OccurrenceMaintenance($this->conn); $this->logOrEcho('Updating statistics...'); - if(!$occurMain->updateCollectionStats($this->collid)){ + $occurMain->setCollidStr($this->collid); + if(!$occurMain->updateCollectionStatsBasic()){ $errorArr = $occurMain->getErrorArr(); foreach($errorArr as $errorStr){ $this->logOrEcho($errorStr,1); @@ -545,7 +546,8 @@ private function cleanHouse($collList){ /* $this->logOrEcho('General cleaning...',2); $collString = implode(',',$collList); - if(!$occurMain->generalOccurrenceCleaning($collString)){ + $occurMain->setCollidStr($collString); + if(!$occurMain->generalOccurrenceCleaning()){ $errorArr = $occurMain->getErrorArr(); foreach($errorArr as $errorStr){ $this->logOrEcho($errorStr,1); @@ -559,7 +561,8 @@ private function cleanHouse($collList){ if($collList){ $this->logOrEcho('Updating collection statistics...',2); foreach($collList as $collid){ - if(!$occurMain->updateCollectionStats($collid)){ + $occurMain->setCollidStr($collid); + if(!$occurMain->updateCollectionStatsBasic()){ $errorArr = $occurMain->getErrorArr(); foreach($errorArr as $errorStr){ $this->logOrEcho($errorStr,1); diff --git a/classes/OccurrenceCollectionProfile.php b/classes/OccurrenceCollectionProfile.php index bdded68a8b..45965a91b8 100644 --- a/classes/OccurrenceCollectionProfile.php +++ b/classes/OccurrenceCollectionProfile.php @@ -507,6 +507,7 @@ public function getBasicStats(){ public function updateStatistics($verbose = false){ $occurMaintenance = new OccurrenceMaintenance(); + $occurMaintenance->setCollidStr($this->collid); if($verbose){ echo '