Explorar el Código

Fix displaying of current date in main statistics (#7892)

Before

<img width="1034" height="543" alt="image" src="https://github.com/user-attachments/assets/09408f81-42f1-4613-948b-b2c7e3ff2409" />

After

<img width="1031" height="536" alt="image" src="https://github.com/user-attachments/assets/d4dd3702-c8a5-4f8d-9014-b419a982d9ec" />

The current day is now included within statistics.

The `-1` thing started happening after #7752 but I'm not sure whether the correct solution is to display the current day or just fix it in the JS

For reference here's what the chart used to looked like:

<img width="1027" height="536" alt="image" src="https://github.com/user-attachments/assets/47a27bad-6593-4e84-a04f-e4385f601c6a" />
Inverle hace 7 meses
padre
commit
e20b0c8c02
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/Controllers/statsController.php

+ 1 - 1
app/Controllers/statsController.php

@@ -85,7 +85,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
 		$this->view->topFeed = $statsDAO->calculateTopFeed();
 		$this->view->topFeed = $statsDAO->calculateTopFeed();
 
 
 		$last30DaysLabels = [];
 		$last30DaysLabels = [];
-		for ($i = 0; $i < 30; $i++) {
+		for ($i = 0; $i < 31; $i++) {
 			$last30DaysLabels[$i] = date('d.m.Y', strtotime((-30 + $i) . ' days') ?: null);
 			$last30DaysLabels[$i] = date('d.m.Y', strtotime((-30 + $i) . ' days') ?: null);
 		}
 		}