Skip to content
Extraits de code Groupes Projets
Valider f85ec8f8 rédigé par Benaka's avatar Benaka Validation de Matthieu Aubry
Parcourir les fichiers

Do not allow piwik global frontend date properties to have value of...

Do not allow piwik global frontend date properties to have value of previous7/last7, since the frontend does not expect those values. (#12324)
parent 2ba94099
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -31,6 +31,16 @@
piwik.period = period;
var dateRange = piwikPeriods.parse(period, date).getDateRange();
piwik.startDateString = $.datepicker.formatDate('yy-mm-dd', dateRange[0]);
piwik.endDateString = $.datepicker.formatDate('yy-mm-dd', dateRange[1]);
// do not set anything to previous7/last7, as piwik frontend code does not
// expect those values.
if (piwik.period === 'range') {
date = piwik.startDateString + ',' + piwik.endDateString;
}
if (date && date.indexOf(',') > -1) {
var dateParts = date.split(',');
if (dateParts[1]) {
......@@ -41,10 +51,6 @@
} else {
piwik.currentDateString = date;
}
var dateRange = piwikPeriods.parse(period, date).getDateRange();
piwik.startDateString = $.datepicker.formatDate('yy-mm-dd', dateRange[0]);
piwik.endDateString = $.datepicker.formatDate('yy-mm-dd', dateRange[1]);
}
function isValidPeriod(periodStr, dateStr) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter