Example #1
0
 /**
  * Returns the idArchive if the archive is available in the database for the requested plugin.
  * Returns false if the archive needs to be processed.
  *
  * @return array
  */
 protected function loadExistingArchiveIdFromDb()
 {
     $noArchiveFound = array(false, false, false);
     // see isArchiveTemporary()
     $minDatetimeArchiveProcessedUTC = $this->getMinTimeArchiveProcessed();
     if ($this->isArchivingForcedToTrigger()) {
         return $noArchiveFound;
     }
     $idAndVisits = ArchiveSelector::getArchiveIdAndVisits($this->params, $minDatetimeArchiveProcessedUTC);
     if (!$idAndVisits) {
         return $noArchiveFound;
     }
     return $idAndVisits;
 }
Example #2
0
 /**
  * Returns the idArchive if the archive is available in the database for the requested plugin.
  * Returns false if the archive needs to be processed.
  *
  * @return array
  */
 protected function loadExistingArchiveIdFromDb()
 {
     $noArchiveFound = array(false, false, false);
     // see isArchiveTemporary()
     $minDatetimeArchiveProcessedUTC = $this->getMinTimeArchiveProcessed();
     if ($this->isArchivingForcedToTrigger()) {
         return $noArchiveFound;
     }
     $site = $this->params->getSite();
     $period = $this->params->getPeriod();
     $segment = $this->params->getSegment();
     $requestedPlugin = $this->params->getRequestedPlugin();
     $idAndVisits = ArchiveSelector::getArchiveIdAndVisits($site, $period, $segment, $minDatetimeArchiveProcessedUTC, $requestedPlugin);
     if (!$idAndVisits) {
         return $noArchiveFound;
     }
     return $idAndVisits;
 }