aboutsummaryrefslogtreecommitdiff
path: root/app/Models
AgeCommit message (Collapse)Author
2019-11-21Fix updateTagAttribute (#2682)Gravatar Alexandre Alapetite
2019-11-18Fix adding categories in MySQL 5.5 (#2672)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2670 (from https://github.com/FreshRSS/FreshRSS/pull/2335 ) Tested with MySQL 5.5.40, the oldest version on Docker Hub Debian 8.0 Jessie ships MySQL 5.5.43
2019-11-11Sanitize UTF-8 before commiting entries (#2649)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2645
2019-11-11Fix DB optimize for MySQL (#2647)Gravatar Alexandre Alapetite
`pdo->exec()` is not appropriate for MySQL `OPTIMIZE` because `OPTIMIZE` returns some data and not only a code and then fails.
2019-11-06More reset default category name (#2639)Gravatar Alexandre Alapetite
Improve https://github.com/FreshRSS/FreshRSS/pull/2638
2019-11-06Fix name of default category (#2638)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2637
2019-11-06Fix database autocreate at install (#2635)Gravatar Alexandre Alapetite
* Fix database autocreate at install Several bugs prevented the auto-creation of the database in Web and CLI installs. Fix https://github.com/YunoHost-Apps/freshrss_ynh/issues/84#issuecomment-549818408 * initDb https://github.com/FreshRSS/FreshRSS/pull/2635#discussion_r343107795
2019-11-04Fix PostgreSQL size bug for uppercase (#2631)Gravatar Alexandre Alapetite
Crash for users with uppercase letters
2019-11-04Default or custom OPML (#2627)Gravatar Alexandre Alapetite
* Default or custom OPML Fix https://github.com/FreshRSS/FreshRSS/issues/2075 Replaces https://github.com/FreshRSS/FreshRSS/pull/2515 https://github.com/FreshRSS/FreshRSS/issues/2514 Uses the local ./data/opml.xml if it exists, otherwise ./opml.default.xml * Better message * Move to controller
2019-10-31Fix categories sorting (#2616)Gravatar Marien Fressinaud
I had a bug when some articles in a category were unread. Sometimes, filtering the category displayed all the articles, even with the "Adjust showing" option. A reasonably good guess was to look the last commits that impacted the categories and, indeed, it was introduced by the new category sorting system. The sort function (`usort`) doesn't keep the index association, which is important here. I must admit I don't understand exactly why (I didn't search), but the keys are probably used somewhere. Another fix would be to not rely on these keys anymore. The bug was introduced in 042fcd5e93884690efdd2f957ca02751958c0724 - Ref PR: https://github.com/FreshRSS/FreshRSS/pull/2592 - Ref usort: https://www.php.net/manual/en/function.usort.php - Ref uasort: https://www.php.net/manual/en/function.uasort.php
2019-10-27keep_max disabled by default for existing installations (#2607)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2600 Second attempt https://github.com/FreshRSS/FreshRSS/pull/2602
2019-10-26keep_max disabled by default for existing installations (#2602)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/2600
2019-10-26Add category order (#2592)Gravatar Alexis Degrugillier
* Add category order Each category has a new 'priority' attribute. It is used to sort categories in views. Categories with the same priority are sorted alphabetically. Categories with no priority are displayed after those with one. For example, if we have the following categories: - A (priority: 2) - B (no priority) - C (priority: 1) - D (priority: 2) - E (no priority) - F (priority: 1) They will be displayed in the following order: - C - F - A - D - B - E See #190 * Shorten help text It took too much room and will not be so necessary once we have drag & drop
2019-10-23Workaround for MySQL limitation 1093 (#2586)Gravatar Alexandre Alapetite
* Workaround for MySQL limitation 1093 https://github.com/FreshRSS/FreshRSS/pull/2335#issuecomment-545194606 including minor Travis fixes
2019-10-23Feature/new archiving (#2335)Gravatar Alexis Degrugillier
* Change archiving config page layout I've changed some wording and moved actions into a maintenance section. * Update purge action Now we have more control on the purge action. The configuration allows us to choose what to keep and what to discard in a more precise way. At the moment, the configuration applies for all feeds. * Add purge configuration on feed level Now the extend purge configuration is available on feed level. It is stored as attributes and will be used in the purge action. * Update purge action Now the purge action uses the feed configuration if it exists and defaults on user configuration if not. * Add empty option in period list * Fix configuration warnings * Add archiving configuration on categories See #2369 * Add user info back * Add explanations in UI * Fixes for SQLite + error + misc. * Fix invalid feed reference * Short array syntax Only for new code, so far * Fix prefix error * Query performance, default values Work in progress * Fix default values and confirm before leaving Form cancel and confirm changes before leaving were broken. And start taking advantage of the short echo syntax `<?= ?>` as we have moved to PHP 5.4+ * More work * Tuning SQL * Fix MariaDB + performance issue * SQL performance * Fix SQLite bug * Fix some attributes JSON encoding bugs Especially for SQLite export/import * More uniform, fix bugs More uniform between global, category, feed settings * Drop special cases for old articles during refresh Instead will use lastSeen date with the new archiving logic. This was generating problems anyway https://github.com/FreshRSS/FreshRSS/issues/2154 * Draft drop index keep_history Not needed anymore * MySQL typo Now properly tested with MySQL, PostgreSQL, SQLite * More work for legacy values Important to avoid overriding user's preference and risking deleting data erroneously * Fix PHP 7.3 / 7.4 warnings @aledeg "Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice. " https://php.net/migration74.incompatible * Reintroduce min articles and take care of legacy parameters * A few changes forgotten * Draft of migration + DROP of feed.keep_history * Fix several errors And give up using const for SQL to allow multiple database types (and we cannot redefine a const) * Add keep_min to categories + factorise archiving logic * Legacy fix * Fix bug yield from * Minor: Use JSON_UNESCAPED_SLASHE for attributes And make more uniform * Fix sign and missing variable * Fine tune the logic
2019-10-06Fix PostgreSQL and SQLite DB size estimation (#2562)Gravatar Alexandre Alapetite
2019-10-06SQL allow recreating existing user (#2555)Gravatar Alexandre Alapetite
* SQL allow recreating existing user Taking advantage of https://github.com/FreshRSS/FreshRSS/pull/2554 In a case when FreshRSS data is lost, but database data still intact (in particular MySQL or PostgreSQL), this patch allows recreating previous users without error * Better error retrieval Especially when error occur during the prepare statement
2019-10-05MySQL entry content MEDIUMBLOB (#2551)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2448
2019-09-29Quick fix: forgotten PDO values (#2546)Gravatar Alexandre Alapetite
From https://github.com/FreshRSS/FreshRSS/pull/2522
2019-09-29PDO refactoring for code simplification (#2522)Gravatar Alexandre Alapetite
* 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-15CLI to export/import any database to/from SQLite (#2496)Gravatar Alexandre Alapetite
* CLI to export/import any database to/from SQLite Require PHP 5.5+ https://github.com/FreshRSS/FreshRSS/pull/2495 * Travis * Execution rights * Fix wrong static fields * Fix MySQL bad default buffering https://stackoverflow.com/questions/6895098/pdo-mysql-memory-consumption-with-large-result-set/6935271#6935271 https://php.net/manual/ref.pdo-mysql * Fix count on progression * Avoid static DB information To ease working with two DBs at the same time * Less static, simplify Needs some testing * Small corrections * Special case for SQLite to SQLite * Modify special case for SQLite * Remove special case for SQLite More uniform logic for the 3 databases. Fix wrong DROP TABLE for SQLite. * Drop indexes * Revert "Drop indexes" This reverts commit f28d2bae0935745c1c74ea38f2ee083f3fd4bf9d. * Fix deletion * Fix classic export * Update cli/README.md Co-Authored-By: Marien Fressinaud <dev@marienfressinaud.fr> * Addressing part of review * Remove goto :cry: * Travis * Comment for SQLite case * Fix missing fields when inserting
2019-09-11add: Allow admins to configure default feeds (#2515)Gravatar Marien Fressinaud
* Homogenize SQL_INSERT_FEEDS across database types * Extract default feeds into system configuration * Adapt default feeds init during installation
2019-08-29Provide email address verification feature (#2481)Gravatar Marien Fressinaud
* Add an email field to the profile page I reuse the `mail_login` from the configuration. I'm not sure if it's useful today (I would say it was used when Persona login was available). A good improvement would be to rename `mail_login` into `email` so it would be more intuitive to use. * Add boolean to the conf to force email validation This commit only adds a configuration item. * Add email during registration if email must be validated * Set email token to validate when email changes * Block access to FreshRSS if email is not validated * Send email when address is changed * Allow to resend the validation email * Allow the user to change its email while blocked * Document the email validation feature * fixup! Allow the user to change its email while blocked * tec: Autoload PHPMailer lib * Validate email address format * Add feedback on validation email resend action * Allow to logout when user is blocked * fix: Change default email "from" * Reorganize i18n keys * Complete all the locales with default english * Hide sidebar (profile page) if email is not validated * Check email requirements on registration * Allow admin to specify email when creating users * Don't check email format if value is empty * Remove trailing comma in userController Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr> * Set PHPMailer validator to html5 before sending email * fixup! Remove trailing comma in userController
2019-08-20Require PHP 5.5+ (#2495)Gravatar Alexandre Alapetite
* Require PHP 5.5+ https://github.com/FreshRSS/FreshRSS/issues/2469#issuecomment-522255093 I think it would be reasonable to require PHP 5.5+ for the core of FreshRSS after all. As Frenzie said, WordPress currently requires PHP 5.6.20+, and it is the most popular PHP application. We would loose about 20% of the PHP servers according to https://w3techs.com/technologies/details/pl-php/5/all but I expect this number to drop fast after the release of CentOS 8 (CentOS accounts for 17% of Linux servers https://w3techs.com/technologies/details/os-linux/all/all ). Distributions: * no impact on Ubuntu, Fedora, Alpine, OpenWRT, FreeBSD, OpenSuze, Mageia, as all active versions have PHP > 7 * no impact on OpenSuze, Synology, as all active versions have PHP > 5.5 * we drop Debian 8 Jessie (-2020) - we keep supporting Debian 9 Stretch (2017-06) - current is Debian 10 Buster * we drop Red Hat 7 (-2024) - we keep supporting RHEL 8 (2019-05) * we drop CentOS 7 (-2024) - we will support CentOS 8 (to be released soonish) When dropping older versions, I can better like when it is for a good reason, and there is actually one with PHP 5.5, namely generators (yield) https://php.net/language.generators.overview which I consider using. * Version note for JSON.php * hex2bin * Update .travis.yml Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2019-08-14Added option to display authors under article titles (#2487)Gravatar Joris Kinable
This feature is particularly useful to display authors underneath scientific articles.
2019-06-21Change category configuration (#2410)Gravatar Alexis Degrugillier
* Change category configuration Before, we had a drop-down list to interract on categories. It was not working the same way as feeds. Now, categories and feeds behave in a similar manner. At the moment, there is no change in features but it will allow to expand them. See #2369 * Minor whitespace
2019-04-07Cherry pick from 2335 (#2356)Gravatar Alexandre Alapetite
Cherry pick bug fix from https://github.com/FreshRSS/FreshRSS/pull/2335 This code is currently not used.
2019-03-23Filter actions (#2275)Gravatar Alexandre Alapetite
* Draft of filter actions * Travis * Implement UI + finish logic * Travis
2019-03-23CLI user-info fixes (#2292)Gravatar Alexandre Alapetite
* CLI missing exit codes https://github.com/FreshRSS/FreshRSS/issues/2291 * CLI catch for outdated databases https://github.com/FreshRSS/FreshRSS/issues/2291#issuecomment-475856890
2019-03-22Rework CSRF interaction with sessions (#2290)Gravatar Alexandre Alapetite
* Rework CSRF interaction with sessions Fix https://github.com/FreshRSS/FreshRSS/issues/2288 Improve security in some edge cases Maybe relevant for https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-474992671 * Forgotten mime type
2019-03-20Session fix when form + HTTP auth are used (#2286)Gravatar Alexandre Alapetite
https://github.com/Alkarex/FreshRSS/commit/bf51c82d55f6bf1af2a6464ca4f148d6c613d28f https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-473873922
2019-03-19No old ID (#2276)Gravatar Alexandre Alapetite
* No old ID https://github.com/FreshRSS/FreshRSS/issues/2273 * PostgreSQL insert or ignore
2019-03-09Change nextGet behaviourGravatar Alexandre Alapetite
Fixes https://github.com/FreshRSS/FreshRSS/issues/2206 Related to https://github.com/FreshRSS/FreshRSS/pull/2255
2019-02-03Fix EntryDAO tags warning for Fever APIGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/2239
2019-01-26Merge branch 'dev' into dev-1.14.0Gravatar Alexandre Alapetite
2019-01-26Import FeedBin (#2228)Gravatar Alexandre Alapetite
* Import FeedBin https://github.com/FreshRSS/FreshRSS/issues/2227 And more tolerant import * Mute import fake feed + Changelog * strtotime for published dates in string
2019-01-17Merge branch 'FreshRSS/dev' into FreshRSS/dev-1.14.0Gravatar Alexandre Alapetite
2019-01-16Export labels (#2217)Gravatar Alexandre Alapetite
* Export labels https://github.com/FreshRSS/FreshRSS/issues/2196 * Small fixes * Backport code from 1.14.0 https://github.com/FreshRSS/FreshRSS/pull/2199/commits/4888f919f104b2d170302565e481a0b731eb4145 * More fixes
2019-01-06Merge branch 'FreshRSS/dev' into FreshRSS/dev-1.14.0Gravatar Alexandre Alapetite
2019-01-06Copy syslog to STDERR (#2208)Gravatar Alexandre Alapetite
* Use openlog before syslog In order to have a copy on stderr when syslog is not available. * Take advantage of syslog for actualization Pipe cron job STDERR and syslog to Docker log Cf. https://github.com/FreshRSS/FreshRSS/pull/2202/commits/00bd467655b7c060cdae388519b2413d12d8cb0f
2019-01-02HTTP authenfication fixes (#2204)Gravatar Alexandre Alapetite
* Security fixes when HTTP user does not exist in FreshRSS * Accept HTTP header X-WebAuth-User for delegated HTTP Authentication (e.g. Træfik) * Document delegated HTTP authentication from https://github.com/FreshRSS/FreshRSS/pull/2202
2018-12-25Prepare for batch mark as readGravatar Alexandre Alapetite
2018-12-16Update naming to WebSub (#2184)Gravatar Alexandre Alapetite
Instead of PubSubHubbub / PuSH
2018-12-04Fix undefined conf (#2163)Gravatar Alexandre Alapetite
Small fix for https://github.com/FreshRSS/FreshRSS/pull/2137
2018-11-18Edit cookie_duration from GUI (#2137)Gravatar Patrick Crandol
* Use cookie_duration correctly * WIP allow cookie_duration to be modified from GUI * Allow cookie_duration to actually be updated * Update view to properly display cookie_duration * Add new strings in Translation Files * Fix typo * Fix trailing whitespace * I18n: French translation * I18n fr: Forgot todo
2018-11-15Minor additional WebSub debugGravatar Alexandre Alapetite
2018-11-12API encoding tuning (#2120)Gravatar Alexandre Alapetite
Use only minimal XML->Unicode encoding for articles title. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2093
2018-11-11Tweaks for Vienna RSS (#2093)Gravatar Alexandre Alapetite
* Tweaks for Vienna RSS https://github.com/FreshRSS/FreshRSS/issues/2091 https://github.com/ViennaRSS/vienna-rss/issues/1197 * Fix get feed by URL * Fix get item ids returning starred elements * API add item ids by feed URL * Add API filter `it` https://feedhq.readthedocs.io/en/latest/api/reference.html#stream-items-ids * API add `nt=` filter + refactoring * No ; prefix for author https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435562495 * Add id long form prefix and accept short id form https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435631259 * Fix quote problem https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435683930 * Isolate bug fix for News+ https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435687041 * Rework encoding conventions https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-437441834 * Unicode escaping alternative Alternative approach to encode XML special characters and other problematic characters into their Unicode fullwidth version when we cannot use HTML-encoding because clients disagree wether they should HTML-decode or not. https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-436059559
2018-11-05TT-RSS import (#2099)Gravatar Alexandre Alapetite
* TT-RSS import Import of Tiny Tiny RSS favourites https://github.com/FreshRSS/FreshRSS/issues/2018#issuecomment-432710462 * Fallback feed_url * Simpler JSON * TT-RSS import custom labels * Fix syntax
2018-10-26Introduce a routine for minor DB maintenance (#2080)Gravatar Alexandre Alapetite