Skip to content

Commit b05d29e

Browse files
authored
Merge branch '5.x-dev' into fix/icon/vertical-align
2 parents 4b7a480 + 1cbd682 commit b05d29e

19 files changed

Lines changed: 290 additions & 130 deletions

File tree

core/API/Proxy.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace Piwik\API;
1111

1212
use Exception;
13+
use Piwik\Http\BadRequestException;
1314
use Piwik\Common;
1415
use Piwik\Container\StaticContainer;
1516
use Piwik\Context;
@@ -615,7 +616,7 @@ private function loadMethodMetadata($class, $method)
615616
private function checkMethodExists($className, $methodName)
616617
{
617618
if (!$this->isMethodAvailable($className, $methodName)) {
618-
throw new Exception(Piwik::translate('General_ExceptionMethodNotFound', array($methodName, $className)));
619+
throw new BadRequestException(Piwik::translate('General_ExceptionMethodNotFound', [$methodName, $className]));
619620
}
620621
}
621622

core/Archive/ArchiveInvalidator.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -295,23 +295,6 @@ public function markArchivesAsInvalidated(
295295

296296
$invalidationInfo = new InvalidationResult();
297297

298-
// quick fix for #15086, if we're only invalidating today's date for a site, don't add the site to the list of sites
299-
// to reprocess.
300-
$hasMoreThanJustToday = [];
301-
foreach ($idSites as $idSite) {
302-
$hasMoreThanJustToday[$idSite] = true;
303-
$tz = Site::getTimezoneFor($idSite);
304-
305-
if (
306-
($period == 'day' || $period === false)
307-
&& count($dates) == 1
308-
&& ((string)$dates[0]) == ((string)Date::factoryInTimezone('today', $tz))
309-
) {
310-
// date is for today
311-
$hasMoreThanJustToday[$idSite] = false;
312-
}
313-
}
314-
315298
/**
316299
* Triggered when a Matomo user requested the invalidation of some reporting archives. Using this event, plugin
317300
* developers can automatically invalidate another site, when a site is being invalidated. A plugin may even

core/CronArchive.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,12 +1040,14 @@ protected function isSegmentAvailable($segmentDefinition, $idSites)
10401040
*
10411041
* @params Parameters $params The parameters for the archive we want to invalidate.
10421042
*/
1043-
public function canWeSkipInvalidatingBecauseThereIsAUsablePeriod(Parameters $params, $doNotIncludeTtlInExistingArchiveCheck = false)
1043+
public function canWeSkipInvalidatingBecauseThereIsAUsablePeriod(Parameters $params, $doNotIncludeTtlInExistingArchiveCheck = false): bool
10441044
{
1045-
$today = Date::factoryInTimezone('today', Site::getTimezoneFor($params->getSite()->getId()));
1046-
1047-
$isYesterday = $params->getPeriod()->getLabel() == 'day' && $params->getPeriod()->getDateStart()->toString() == Date::factory('yesterday')->toString();
1045+
$timezone = Site::getTimezoneFor($params->getSite()->getId());
1046+
$today = Date::factoryInTimezone('today', $timezone);
1047+
$yesterday = Date::factoryInTimezone('yesterday', $timezone);
10481048

1049+
// The period provided in params is in the sites timezone, so we need to compare against dates in the sites timezone
1050+
$isYesterday = $params->getPeriod()->getLabel() === 'day' && $params->getPeriod()->getDateStart()->toString() === $yesterday->toString();
10491051
$isPeriodIncludesToday = $params->getPeriod()->isDateInPeriod($today);
10501052

10511053
$minArchiveProcessedTime = $doNotIncludeTtlInExistingArchiveCheck ? null :
@@ -1057,10 +1059,11 @@ public function canWeSkipInvalidatingBecauseThereIsAUsablePeriod(Parameters $par
10571059
$tsArchived = $archiveInfo['tsArchived'];
10581060

10591061
// day has changed since the archive was created, we need to reprocess it
1062+
// ts_archived is stored in UTC, so we need to convert it to site's timezone
10601063
if (
10611064
$isYesterday
10621065
&& !empty($idArchive)
1063-
&& Date::factory($tsArchived)->toString() != $today->toString()
1066+
&& Date::factory($tsArchived, $timezone)->toString() !== $today->toString()
10641067
) {
10651068
return false;
10661069
}

core/Http/BadRequestException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ class BadRequestException extends \Exception implements HttpCodeException
1313
{
1414
public function __construct($message, $code = 400)
1515
{
16-
parent::__construct($message);
16+
parent::__construct($message, $code);
1717
}
1818
}

lang/eu.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
"PleaseUpgradeYourPhpVersionSoYourPiwikDataStaysSecure": "Eguneratu zure PHP bertsioa gutxienez PHP %s(e)ra, zure Matomoko analitika datuak seguru egon daitezen.",
381381
"Plugin": "Plugina",
382382
"Plugins": "Pluginak",
383-
"PoweredBy": "Garatzailea:",
383+
"PoweredBy": "Garatzailea",
384384
"Previous": "Aurrekoa",
385385
"PreviousDays": "Aurreko %s egunak (gaur ezik)",
386386
"PreviousDaysShort": "Aurreko %s egunak",

plugins/CoreAdminHome/lang/fr.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"AddNewTrustedHost": "Ajouter un nouvel hôte de confiance",
55
"Administration": "Administration",
66
"ArchivingSettings": "Paramètres d'archivage",
7-
"BrandingSettings": "Paramètres de logo",
7+
"BrandingSettings": "Paramètres de la marque",
88
"BruteForce": "Force brute",
9-
"CheckToOptIn": "Cochez cette case pour ne plus être exclu(e).",
10-
"ClickHereToOptIn": "Cliquez ici pour inclure votre ordinateur.",
11-
"ClickHereToOptOut": "Cliquez ici pour exclure votre ordinateur.",
9+
"CheckToOptIn": "Cochez cette case si vous acceptez d'être suivi.",
10+
"ClickHereToOptIn": "Cliquez ici pour vous inscrire.",
11+
"ClickHereToOptOut": "Cliquez ici pour vous désinscrire.",
1212
"CloudflareDescription": "Si votre site web est hébergé sur Cloudflare, veuillez consulter %1$sce guide%2$s.",
13-
"ConfirmDeleteAllTrackingFailures": "Voulez-vous vraiment supprimer toutes les erreurs de suivi ?",
14-
"ConfirmDeleteThisTrackingFailure": "Voulez-vous vraiment supprimer cette erreur de suivi ?",
13+
"ConfirmDeleteAllTrackingFailures": "Voulez-vous vraiment supprimer toutes les erreurs de suivi?",
14+
"ConfirmDeleteThisTrackingFailure": "Voulez-vous vraiment supprimer cette erreur de suivi?",
1515
"Cors": "cors",
1616
"CorsDomains": "Domaines CORS (Cross-Origin Resource Sharing)",
1717
"CorsDomainsHelp": "Vous pouvez définir des noms de domaines ou sous-domaines tels que http://exemple.com ou http://stats.exemple.com. Pour autoriser les requêtes entre tous les domaines ajoutez simplement une *",
@@ -58,6 +58,8 @@
5858
"JSTracking_CrossDomain_NeedsMultipleDomains": "Note : pour utiliser les cookies inter-domaine, vous devez spécifier plus qu'un nom de domaine (URL) pour votre site web.",
5959
"JSTracking_CustomCampaignQueryParam": "Utiliser des noms de paramètres de requête personnalisés pour le nom de la campagne et le mot clé",
6060
"JSTracking_CustomCampaignQueryParamDesc": "Note : %1$sMatomo détectera automatiquement les paramètres de Google Analytics.%2$s",
61+
"JSTracking_DisableCampaignParameters": "Désactiver les paramètres de suivi de la campagne",
62+
"JSTracking_DisableCampaignParametersDesc": "Quand cette option est cochée, Matomo ne va pas suivre les paramètres de la campagne et ils seront supprimés des URLs suivies.",
6163
"JSTracking_DisableCookies": "Désactiver tous les cookies de suivi",
6264
"JSTracking_DisableCookiesDesc": "Désactive tous les cookies originaux. Les cookies Matomo existants pour ce site web seront supprimés lors de la prochaine visite de la page.",
6365
"JSTracking_EnableCrossDomainLinking": "Active les cookies inter-domaines",
@@ -124,6 +126,7 @@
124126
"ReactDescription": "Si votre site web utilise React, veuillez consulter %1$sce guide%2$s.",
125127
"ReleaseChannel": "Canal de publication",
126128
"SecurityNotificationAllTokenAuthDeletedBody": "Quelqu'un a supprimé tous les jetons d'authentification de votre compte.",
129+
"SecurityNotificationAnonymousAccessEnabledBody": "Quelqu'un a activé l'accès utilisateur anonyme pour %1$s. Cela veut dire que les données de ce site sont maintenant accessibles publiquement. Si cela est correct, vous pouvez ignorer ce courriel.",
127130
"SecurityNotificationCheckTwoFactor": "Veuillez vérifier votre application ou appareil pour l'authentification à deux facteurs.",
128131
"SecurityNotificationEmailSubject": "Notification de sécurité",
129132
"SecurityNotificationIfItWasYou": "Si c'était vous, continuez. Si vous ne reconnaissez pas cette activité, veuillez réinitialiser votre mot de passe.",

plugins/CoreHome/lang/sv.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"PageDownShortcutDescription": "för att komma till botten av sidan",
6969
"PageUpShortcutDescription": "för att komma till toppen av sidan",
7070
"PeriodHasOnlyRawData": "Det verkar som att rapporterna för den här perioden inte har behandlats än. Vill du se vad som händer nu? Kolla in %1$sBesöksloggen%2$s eller välj en annorlunda datum-period tills det att rapporterna är genererade.",
71+
"PeriodHasOnlyRawDataNoVisitsLog": "Det ser ut som att rapporterna för perioden inte bearbetats ännu, men de kommer synas inom några timmar. Du kan välja en annan datumperiod medan rapporterna skapas.",
7172
"PeriodRange": "Intervall",
7273
"PivotBySubtable": "Denna rapport är inte pivoterad %1$s Pivotera med %2$s",
7374
"Profilable": "Profilabel",

plugins/CoreUpdater/lang/de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"UpdateAutomatically": "Aktualisierung automatisch ausführen",
8080
"UpdateErrorTitle": "Aktualisierungsfehler",
8181
"UpdateHasBeenCancelledExplanation": "Die Matomo Ein-Klick-Aktualisierung wurde abgebrochen. Wenn die oben stehende Fehlermeldung nicht behoben werden kann, sollten Sie Matomo manuell aktualisieren. %1$s Bitte lesen Sie die %2$sDokumentation zur Aktualisierung%3$s, um die Einzelheiten zu erfahren!",
82-
"UpdateLog": "Log aktualisieren",
82+
"UpdateLog": "Aktualisierungsprotokoll",
8383
"UpdateSuccessTitle": "Matomo wurde erfolgreich aktualisiert!",
8484
"UpdateTitle": "Aktualisieren",
8585
"UpdateUsingHttpsFailed": "Das Herunterladen der neuesten Matomo Version über eine sichere HTTPS-Verbindung war aufgrund des folgenden Fehlers nicht erfolgreich:",

plugins/Diagnostics/lang/sv.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"EnableRequiredDirectoriesDiagnostic": "Den här kontrollen hoppades över eftersom den här kontrollen är inaktiverad i konfigurationen. För att aktivera den här kontrollen ställer du in [Allmänt] enable_required_directories_diagnostic = 1 i filen \"config/config.ini.php\".",
2020
"HideUnchanged": "Om du vill se endast ändrade värden så kan du %1$s dölja alla oförändrade värden%2$s.",
2121
"HtaccessWarningNginx": "För att säkerställa att känsliga filer inte kan nås direkt rekommenderas du att konfigurera din webbserver att begränsa åtkomsten till vissa kataloger. För mer information kan du läsa om den %1$s officiella nginx server konfigurationen %2$s",
22+
"MariaDbNotConfigured": "Din databasversion indikerar att du nog använder en MariaDb-server. Om så är fallet så säkerställ att följande sätts i filen \"config/config.ini.php\" för att databasen ska fungera som förväntat: <code>[database] schema = Mariadb</code>",
2223
"MysqlMaxPacketSize": "Max paketstorlek",
2324
"MysqlMaxPacketSizeWarning": "Det rekommenderas att du konfigurerar en '%1$smax_allowed_packet%2$s'-storlek i din MySQL-databas med minst %3$s. Konfigurerad är för närvarande %4$s.",
2425
"MysqlTemporaryTablesWarning": "MySQL-tillstånd CREATE TEMPORARY TABLES krävs för att Matomo ska fungera korrekt.",

plugins/Diagnostics/lang/tr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"EnableRequiredDirectoriesDiagnostic": "Yapılandırma ayarlarında kapatıldığından bu denetim atlandı. Bu denetimi açmak için \"config/config.ini.php\" dosyasında [General] enable_required_directories_diagnostic = 1 ayarını yapın.",
2020
"HideUnchanged": "Yalnızca değiştirilmiş değerlerin görüntülenmesi için %1$sdeğiştirilmemiş tüm değerleri gizleyin%2$s.",
2121
"HtaccessWarningNginx": "Hassas dosyalara doğrudan erişilemediğinden emin olmak için, site sunucunuzu belirli klasörlere erişimi engelleyecek şekilde yapılandırmanız önerilir. Ayrıntılı bilgi almak için %1$s resmi Nginx sunucu yapılandırmasına %2$s bakabilirsiniz",
22+
"MariaDbNotConfigured": "Veri tabanı sürümünüz bir MariaDB sunucusu kullanıyor olabileceğinizi gösteriyor. Bu durumda, tüm veri tabanı özelliklerinin beklendiği gibi çalıştığından emin olmak için lütfen \"config/config.ini.php\" dosyasında <code>[database] schema = Mariadb</code> ayarladığınızdan emin olun.",
2223
"MysqlMaxPacketSize": "En büyük paket boyutu",
2324
"MysqlMaxPacketSizeWarning": "MySQL veri tabanınız için '%1$smax_allowed_packet%2$s' değerini en az %3$s olarak ayarlamanız önerilir. Şu anda %4$s olarak ayarlanmış.",
2425
"MysqlTemporaryTablesWarning": "Matomo uygulamasının düzgün çalışabilmesi için CREATE TEMPORARY TABLES MySQL izninin verilmiş olması gereklidir.",

0 commit comments

Comments
 (0)