Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/CronArchive.php')
-rw-r--r--core/CronArchive.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php
index fb17b960b6..6e7d186db2 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -1104,7 +1104,16 @@ class CronArchive
return Request::ABORT;
}
+ $urlBefore = $request->getUrl();
$request->changeDate($newDate);
+ $request->makeSureDateIsNotSingleDayRange();
+
+ // check again if we are already archiving the URL since we just changed it
+ if ($request->getUrl() !== $urlBefore
+ && $self->isAlreadyArchivingSegment($request->getUrl(), $idSite, $period, $segment)
+ ) {
+ return Request::ABORT;
+ }
$this->logArchiveWebsite($idSite, $period, $newDate);
});
@@ -1972,9 +1981,17 @@ class CronArchive
return Request::ABORT;
}
- $url = $request->getUrl();
- $url = preg_replace('/([&?])date=[^&]*/', '$1date=' . $newDate, $url);
+ $urlBefore = $request->getUrl();
+ $url = preg_replace('/([&?])date=[^&]*/', '$1date=' . $newDate, $urlBefore);
$request->setUrl($url);
+ $request->makeSureDateIsNotSingleDayRange();
+
+ // check again if we are already archiving the URL since we just changed it
+ if ($request->getUrl() !== $urlBefore
+ && $self->isAlreadyArchivingSegment($request->getUrl(), $idSite, $period, $segment)
+ ) {
+ return Request::ABORT;
+ }
$processedSegmentCount++;
$logger->info(sprintf(