Commit Graph

31 Commits

Author SHA1 Message Date
Alexandre Alapetite
e3e5954394 PDO refactoring for code simplification (#2522)
* PDO refactor

* Automatic prefix when using the syntax `_tableName`
* Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query
* Use PDO methods exec(), query(), prepare() + execute() in a more efficient way
* Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old)
* The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language)
* Rename `->bd` to `->pdo` (less of a frenshism, and more informative)
* Fix some requests, which were not compatible with MySQL prepared statements

* Whitespace

* Fix syntax for PostgreSQL sequences

+ MySQL install

* Minor formatting

* Fix lastInsertId for PostgreSQL

* Use PHP 5.6+ const

Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527
https://www.php.net/manual/en/migration56.new-features.php

* A bit of forgotten PHP 5.6 simplification for cURL

* Forgotten $s

* Mini fix custom user config

https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346

* More work on install.php but not finished

* install.php working

* More cleaning of PDO in install

* Even more simplification

Take advantage of PDO->exec() to run multiple statements

* Disallow changing the name of the default category

https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-09-29 16:22:50 +02:00
Alexandre Alapetite
07cce02ad3 May abbreviation conflict 2017-08-20 11:10:22 +02:00
Alexandre Alapetite
4f74193b4a May abbreviation
https://github.com/FreshRSS/FreshRSS/issues/1560
2017-08-20 11:02:00 +02:00
Alexandre Alapetite
c35111fe53 Fix SQLite 2016-09-29 23:36:25 +02:00
Alexandre Alapetite
dbc68590da A bit more PostgreSQL
Simplified statistics https://github.com/FreshRSS/FreshRSS/pull/1250
2016-09-27 23:35:39 +02:00
Alexandre Alapetite
c1c5279109 Merge branch 'FreshRSS/dev' into PostgreSQL 2016-09-25 01:38:32 +02:00
Alexandre Alapetite
ccb56bcbf3 Simplify SQL in statistics
Reduce the use of product-specific date functions. Improve performances.
Remove redundant functions.
2016-09-11 11:24:32 +02:00
Alexandre Alapetite
e098119441 Merge branch 'FreshRSS/dev' into PostgreSQL 2016-08-31 15:56:59 +02:00
Alexandre Alapetite
961407b4e0 Variable initialization
PHP warning when not feed is iddle
https://github.com/FreshRSS/FreshRSS/issues/1227#issuecomment-242702464
2016-08-28 13:36:11 +02:00
Alexandre Alapetite
bee833bf52 Problematic MySQL reserved keyword
`read` and `reads` are reserved keywords
2016-08-07 00:54:49 +02:00
Alexandre Alapetite
7c1b5e322c PostgreSQL draft
https://github.com/FreshRSS/FreshRSS/issues/416
Based on @Damstre work https://github.com/FreshRSS/FreshRSS/pull/1071
Not tested
2016-08-02 22:49:35 +02:00
Alexandre Alapetite
264d05297c CSP for statistics
https://github.com/FreshRSS/FreshRSS/issues/1075
2016-02-21 17:26:37 +01:00
Marien Fressinaud
f43b273706 Update i18n for statistics 2014-12-11 16:10:39 +01:00
Alexis Degrugillier
960abfcc65 Refactor some if statements 2014-11-08 09:29:51 -05:00
Alexis Degrugillier
38cf7a109e Add more info in article repartition page
I added the same information than on the main stat page (total, read, unread and favorite) on the repartition page. Some refactoring was needed.
2014-11-08 09:26:01 -05:00
Alexis Degrugillier
eb40dbccdb Change statistic average
I was using the stats and it feels that the stat average was useless in that form since the line is always at the same position no matter what is the value.
So I deleted that line and added the average in the title. It is way more useful this way.

I updated some translations both on i18n files and on http://i18n.freshrss.org
2014-10-09 21:44:44 -04:00
Marien Fressinaud
b5dee73ea0 Coding style
Remove spaces before parenthesis bis

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-05 18:51:08 +02:00
Marien Fressinaud
6c8b36f04e Let's begin the big refactoring!
Minz_Translate::t\s? replaces by _t

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-05 15:55:20 +02:00
Alexis Degrugillier
cd88414abc Add an average per day for the 30 day period 2014-09-29 18:54:03 -04:00
Marien Fressinaud
55843ff7a5 Few fixes about statistics 2014-09-19 16:45:16 +02:00
Marien Fressinaud
8731de5c3a Fix repartition stats with 0 or 1 article. 2014-09-19 10:37:29 +02:00
Alexis Degrugillier
f002dbe4ce Add average on repartition charts.
It needs some verification on the value used to calculate the averages.
2014-09-01 20:58:05 -04:00
Alexis Degrugillier
aa317eb294 Add repartition statistic support in Sqlite 2014-07-24 22:57:31 -04:00
Alexis Degrugillier
d049c1bc80 Add article repartition in stats
Add article repartition per hour, per day of week, per month for all feeds but also for individual feeds.
2014-07-24 21:57:59 -04:00
Alexandre Alapetite
937cb4b066 Idle feeds: link to configuration page
https://github.com/marienfressinaud/FreshRSS/issues/544
2014-07-22 13:41:31 +02:00
Alexis Degrugillier
68c0a827d2 Add statistics support for Sqlite
Add statistics support for Sqlite by tweeking one query and rewrite an other. The rewrite implied a complete refactor of the MySql query as well.
Now the code is more flexible and make less queries to the database.

See #527
2014-07-18 20:35:03 -04:00
Alexandre Alapetite
3bbd0e446f Prepare statistics for SQLite
Temporarily disable 30-day statistics for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
https://github.com/marienfressinaud/FreshRSS/issues/90
2014-07-06 11:54:00 +02:00
Alexis Degrugillier
60fe99344e Refactor and formatting 2014-06-15 12:13:33 -04:00
Alexis Degrugillier
181fcd9889 Refactor statistics
I made a new controller to handle statistics. The old statistics have been moved in that controller and a new action has been added to display idle feeds. I also added a menu in the left panel to navigate between the statistics pages.
See #90
2014-06-15 12:05:21 -04:00
Alexis Degrugillier
b0641fd0eb Modification des statistiques.
Ajout de la liste des 10 plus gros contributeurs
Ajout de règles CSS pour les thèmes Flat et Dark
Modification de l'affichage des camemberts (tri par nombre qui remplace le tri alphabétique)
2014-01-26 08:54:52 -05:00
Alexis Degrugillier
e98ac32716 Ajout de statistiques de l'application
Conflicts:
	app/i18n/en.php
	app/i18n/fr.php
2014-01-25 15:15:04 -05:00