From a52313bd830f4d4c52176893bbee99d9c6c2e7a9 Mon Sep 17 00:00:00 2001 From: NASDAMI Quatadah Date: Tue, 14 Jun 2022 11:02:14 +0200 Subject: [PATCH 1/2] changing function name to the existing one --- htdocs/core/class/stats.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index ae9a8e56e58..8128dd07ed8 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -86,7 +86,7 @@ abstract class Stats $year = $year - 1; } while ($year <= $endyear) { - $datay[$year] = $this->getNbByMonth($year, $format); + $datay[$year] = $this->_getNbByMonth($year, $format); $year++; } From 20ce5c53230321fe5737c3c60a6b8eb80ef78860 Mon Sep 17 00:00:00 2001 From: NASDAMI Quatadah Date: Wed, 15 Jun 2022 11:10:31 +0200 Subject: [PATCH 2/2] declaring a used abstract function in the Stats class --- htdocs/core/class/stats.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 8128dd07ed8..a31c9fc3349 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -33,6 +33,13 @@ abstract class Stats protected $lastfetchdate = array(); // Dates of cache file read by methods public $cachefilesuffix = ''; // Suffix to add to name of cache file (to avoid file name conflicts) + /** + * @param int $year number + * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month + * @return int value + */ + protected abstract function getNbByMonth($year, $format = 0); + /** * Return nb of elements by month for several years * @@ -86,7 +93,7 @@ abstract class Stats $year = $year - 1; } while ($year <= $endyear) { - $datay[$year] = $this->_getNbByMonth($year, $format); + $datay[$year] = $this->getNbByMonth($year, $format); $year++; }