diff options
| author | 2016-02-28 12:13:19 +0100 | |
|---|---|---|
| committer | 2016-02-28 12:13:19 +0100 | |
| commit | 3b2f9533c363406087cf77c56db16a120b9523c7 (patch) | |
| tree | 14743e94e95a6970e5dfe06bd5414deaed25d0ee /app/Models | |
| parent | 830c5aad03ff4d0cfbde4fcf275b04de6c4f4019 (diff) | |
| parent | 995cf58d249c6a2ddfd042cc5b509914295c882f (diff) | |
Merge pull request #1078 from Alkarex/CSP-no-inline
Content-Security-Policy
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/StatsDAO.php | 20 | ||||
| -rw-r--r-- | app/Models/StatsDAOSQLite.php | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php index 80caccc49..5ca333396 100644 --- a/app/Models/StatsDAO.php +++ b/app/Models/StatsDAO.php @@ -55,9 +55,9 @@ SQL; /** * Calculates entry count per day on a 30 days period. - * Returns the result as a JSON string. + * Returns the result as a JSON object. * - * @return string + * @return JSON object */ public function calculateEntryCount() { $count = $this->initEntryCountArray(); @@ -257,9 +257,9 @@ SQL; /** * Calculates feed count per category. - * Returns the result as a JSON string. + * Returns the result as a JSON object. * - * @return string + * @return JSON object */ public function calculateFeedByCategory() { $sql = <<<SQL @@ -282,7 +282,7 @@ SQL; * Calculates entry count per category. * Returns the result as a JSON string. * - * @return string + * @return JSON object */ public function calculateEntryByCategory() { $sql = <<<SQL @@ -357,7 +357,7 @@ SQL; $serie[] = array($key, $value); } - return json_encode($serie); + return $serie; } protected function convertToPieSerie($data) { @@ -368,7 +368,7 @@ SQL; $serie[] = $value; } - return json_encode($serie); + return $serie; } /** @@ -411,17 +411,17 @@ SQL; } /** - * Translates array content and encode it as JSON + * Translates array content * * @param array $data - * @return string + * @return JSON object */ private function convertToTranslatedJson($data = array()) { $translated = array_map(function($a) { return _t('gen.date.' . $a); }, $data); - return json_encode($translated); + return $translated; } } diff --git a/app/Models/StatsDAOSQLite.php b/app/Models/StatsDAOSQLite.php index bb2336532..9bfe8b20a 100644 --- a/app/Models/StatsDAOSQLite.php +++ b/app/Models/StatsDAOSQLite.php @@ -4,9 +4,9 @@ class FreshRSS_StatsDAOSQLite extends FreshRSS_StatsDAO { /** * Calculates entry count per day on a 30 days period. - * Returns the result as a JSON string. + * Returns the result as a JSON object. * - * @return string + * @return JSON object */ public function calculateEntryCount() { $count = $this->initEntryCountArray(); |
