Commit Graph

148 Commits

Author SHA1 Message Date
Alexandre Alapetite 39cc1c11ec
New feature: shareable user query (#6052)
* New feature: shareable user query
Share the output of a user query by RSS / HTML / OPML with other people through unique URLs.
Replaces the global admin token, which was the only option (but unsafe) to share RSS outputs with other people.
Also add a new HTML output for people without an RSS reader.

fix https://github.com/FreshRSS/FreshRSS/issues/3066#issuecomment-648977890
fix https://github.com/FreshRSS/FreshRSS/issues/3178#issuecomment-769435504

* Remove unused method

* Fix token saving

* Implement HTML view

* Update i18n for master token

* Revert i18n get_favorite

* Fix missing i18n for user queries from before this PR

* Remove irrelevant tests

* Add link to RSS version

* Fix getGet

* Fix getState

* Fix getSearch

* Alternative getSearch

* Default getOrder

* Explicit default state

* Fix test

* Add OPML sharing

* Remove many redundant SQL queries from original implementation of user queries

* Fix article tags

* Use default user settings

* Prepare public search

* Fixes

* Allow user search on article tags

* Implement user search

* Revert filter bug

* Revert wrong SQL left outer join change

* Implement checkboxes

* Safe check of OPML

* Fix label

* Remove RSS button to favour new sharing method
That sharing button was using a global admin token

* First version of HTTP 304

* Disallow some recusrivity
fix https://github.com/FreshRSS/FreshRSS/issues/6086

* Draft of nav

* Minor httpConditional

* Add support for offset for pagination

* Fix offset pagination

* Fix explicit order ASC

* Add documentation

* Help links i18n

* Note about deprecated master token

* Typo

* Doc about format
2024-02-26 09:01:03 +01:00
yzqzss 2bd9f63030
fix: `base_url` becomes empty after saving configuration (#5992)
* fix: `base_url` becomes empty after saving configuration

* Just remove the line

* Use read-ony instead
https://developer.mozilla.org/docs/Web/HTML/Attributes/readonly#attribute_interactions

* Revert for websub

* Changelog

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-12-28 20:06:26 +01:00
Alexandre Alapetite a80a5f48a1
Pass PHPStan level 8 (#5946)
* Pass PHPStan level 8
And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels

* Revert wrong replace in comment

* Fix PHPStan level 8

* Update PHPStan and other dev dependencies

* Remove obsolete comment

* noVariableVariables and towards bleedingEdge
https://github.com/phpstan/phpstan-strict-rules
https://phpstan.org/blog/what-is-bleeding-edge

* More bleedingEdge

* A bit more PHPStan level 9

* More PHPStan level 9

* Prepare for booleansInConditions
Ignore int and null

* Revert wrong line

* More fixes

* Fix keep_max_n_unread

* Stricter attribute functions

* Stricter callHooks and more PHPStan level 9

* More typing

* A tiny more
2023-12-18 17:59:16 +01:00
Alexandre Alapetite 6bb45a8726
Add filter actions (auto mark read) at category and global levels (#5942)
* Add filter actions (auto mark read) at category level
fix https://github.com/FreshRSS/FreshRSS/issues/3497

* Add filter actions (auto mark read) at global level
fix https://github.com/FreshRSS/FreshRSS/issues/2788

* Fix feed category ID

* Minor comment
2023-12-15 23:04:29 +01:00
Alexandre Alapetite 6a04503c7e
Fix read_when_same_title_in_feed (#5937)
fix https://github.com/FreshRSS/FreshRSS/issues/5936
2023-12-10 14:05:11 +01:00
Alexandre Alapetite b46ea88c35
Fix archiving (#5935)
fix https://github.com/FreshRSS/FreshRSS/issues/5934
Regression from https://github.com/FreshRSS/FreshRSS/pull/5830
2023-12-10 12:41:24 +01:00
Luc SANCHEZ 30c7a61a9b
Use strict_types (#5830)
* Little's optimisations and booleans in conditions

* Apply strict type

* Apply strict type

* Apply strict type

* Fix multiple bugs with PHP 8.2 and 8.3

* Many declares missing, more errors fixed

* Apply strict type

* Another approach

* Stronger typing for Minz_Session

* Fix case of SQLite

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-16 22:43:00 +01:00
maTh 0504fc6766
Added: Display option for "My labels" (#5884)
* configs

* Update entry_bottom.phtml

* i18n strings

* fix phpstand found error

* reuse existing i18n string

---------

Co-authored-by: math-gh <>
2023-11-16 13:18:33 +01:00
Ben Passmore b9939bdaac
Added ability to mark articles as read on focus. (#5812)
* Added ability to mark entries as read on focus.

Feature proposed in issue #5723.

* make-fix-all + i18n fr

* Use batch to save resources and increase performance

* Use "keep_unread"

* typo

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-09 11:12:04 +01:00
Sam Cohen 52d87c3eaa
Allow configuration of Base URL via website (#5656)
* Allow configuration of Base URL via website

* Fix alphabetization of CREDITS

* Apply suggestions from code review

* Add Automatic recommendation

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-09-13 22:58:10 +02:00
Alexandre Alapetite db5d458cb2
Fix get and order when saving user query (#5515)
fix https://github.com/FreshRSS/FreshRSS/issues/5514
2023-07-10 08:04:26 +02:00
Luc SANCHEZ f8f163d054
Chore/processing of depreciations and updating code to php72 minimum (#5504)
* processing of depreciations and updating of code to php7.2 minimum

* Autoformat many strange array indenting
And revert a few unwanted changes

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-07-07 22:36:27 +02:00
Alexandre Alapetite 228d7adfdb
Fix slider views (#5469)
* Fix slider titles
And fix full-page view of category configuration.
FIx https://github.com/FreshRSS/FreshRSS/pull/5449#issuecomment-1590021947

* Fix user queries and user management
Implement https://github.com/FreshRSS/FreshRSS/pull/5469#issuecomment-1591957935
2023-06-15 12:47:47 +02:00
Alexandre Alapetite d8c535c25c
PHPStan Level 7 for Share userController logs_pagination (#5393) 2023-05-13 22:47:51 +02:00
Alexandre Alapetite 2208974c00
PHPStan Level 7 for FreshRSS_UserQuery (#5319)
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5318
2023-04-20 09:14:58 +02:00
Alexandre Alapetite ecd956c736
PHPStan 7 configureController (#5318)
And fix bugs for saving user queries
2023-04-20 00:55:10 +02:00
Alexandre Alapetite f3760f138d
Complete PHPStan Level 6 (#5305)
* Complete PHPStan Level 6
Fix https://github.com/FreshRSS/FreshRSS/issues/4112
And initiate PHPStan Level 7

* PHPStan Level 6 for tests
* Use phpstan/phpstan-phpunit
* Update to PHPStan version 1.10

* Fix mixed bug

* Fix mixed return bug

* Fix paginator bug

* Fix FreshRSS_UserConfiguration

* A couple more Minz_Configuration bug fixes

* A few trivial PHPStan Level 7 fixes

* A few more simple PHPStan Level 7

* More files passing PHPStan Level 7
Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251

* A few more PHPStan Level 7 preparations

* A few last details
2023-04-17 08:30:21 +02:00
Alexandre Alapetite 61550b1d2d
Fix save shortcuts (#5294)
Fix https://github.com/FreshRSS/FreshRSS/issues/5293
Regression from https://github.com/FreshRSS/FreshRSS/pull/5267
2023-04-13 12:50:50 +02:00
Alexandre Alapetite 6c07489466
Fix display options (#5278)
Fix https://github.com/FreshRSS/FreshRSS/issues/5276
2023-04-08 23:40:01 +02:00
Alexandre Alapetite 6c01e4e7d6
Use typed access to request parameters (#5267)
* Use typed access to request parameters
This was a big source of mixed datatypes in many places

* Fix notifications

* Fix bookmarkAction
2023-04-07 00:13:49 +02:00
Luc SANCHEZ 247215ffaa
Typehint some Controllers (#5106)
* Typehint to Controllers

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-03-21 18:57:57 +01:00
Sadetdin EYILI d3966befaf
feat: create config to display website icon only / name only / icon and name / none on feeds (#4969)
* feat: create config to display website icon only / name only / icon and name / none on feeds

* fix title hovering

* reverted: column in .phtml

* Update app/i18n/fr/conf.php

---------

Co-authored-by: mathContao <math-home@web.de>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-03-04 14:51:07 +01:00
Alexandre Alapetite 9b5de54a9c
Remove -x on some files not needing it (#5065) 2023-02-03 14:34:47 +01:00
Alexandre Alapetite c13f1de139
Use paramBoolean consistently (#5025)
* Use paramBoolean consistently
So that we have cleaner values (true booleans) everywhere in user's config.php
2023-01-20 23:14:10 +01:00
maTh b5a418ec16
Added: Dark mode for Origine +Origine compact themes (#4843)
* first draft

* fix: theme slider: properties box

* improved colors

* option to enable/disable dark mode

* fixes

* Update app/i18n/fr/conf.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* i18n english improved

* fix dark background color for favorites + hover colors

* select list: no, auto

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-01-09 10:40:38 +01:00
Alexandre Alapetite 6261dc9cf4
User-defined time zone (#4906)
* User-defined time zone
#fix https://github.com/FreshRSS/FreshRSS/issues/2754

* Update app/i18n/nl/conf.php

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Timezone when creating a new user

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2022-11-29 15:27:32 +01:00
maTh b2e46d6215
Improved: Article header (#4101)
* First draft for normal view

* Revert changes on the entry header

* Update normal.phtml

* Update normal.phtml

* RTL CSS

* CSS fixes

* Better tags style

* fix

* Update swage.scss

* fix

* Update swage.scss

* fixed .content header

* font-size in rem

* improved template

* dropdown menu if more than 7 tags

* configuration: show tags in topline

* Simplify loop logic

* Minor space

* config tags via reading (i18n still missed)

* fixed the whitespaces

* optimizations

* optimize header+footer

* Update normal.phtml

* fix css

* new config: show author+date in footer

* config feed name display

* improve HTML

* fix whitespaces

* i18n

* i18n: German translations

* fix i18n German

* fixed: uncouple from bottomline config

* reverted: tobline_tags

* equalities

* fixed: author in footer

* fixed data-leave-validation

* improved max numbers i18n label

* Config works now also in the reader view

* fix: footer border

* reader view: style article-header-topline

* fixed whitespace

* i18n fr

* Minor i18n fr

* Fix mistake i18n fr

* i18n fr more precise expression

* Fix JavaScript

* removed the link icon in the title

* clean CSS

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-07-17 22:54:24 +02:00
Alexandre Alapetite d785ddde2a
New option to automatically mark as read gone articles (#4426)
* New option to automatically mark as read gone articles
Option to automatically and immediately mark as read entries / articles that are no longer provided in their upstream RSS / ATOM / XPath feed

* Reduce SQL queries
Optimisation: Perform cache update only once
2022-06-25 11:15:51 +02:00
Alexandre Alapetite 1335a0e3cf
PHPStan level 5 (#4110)
* Fix most PHPDocs errors
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103
https://phpstan.org/writing-php-code/phpdoc-types

* Avoid func_get_args
Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list
And avoid dynamic functions names when possible to more easily identify calls and unused functions.
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103

* PHPStan level 3

* PHPStand level 4

* Update default to PHPStan level 4

* Towards level 5

* Fix level 4 regression

* Towards level 5

* Pass PHPStan level 5

* Towards level 6

* Remove erronenous regression from changelog
https://github.com/FreshRSS/FreshRSS/pull/4116
2022-01-04 13:59:09 +01:00
Alexandre Alapetite 77e9877316
Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/

```sh
composer run-script phpstan
```

* More fixes

* Fix global variables

* Add .phtml

* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090

* Fix more warnings

* Fix view errors and enable in CI

* ReturnTypeWillChange

* Dynamic view type

* Fix Minz static/self bug
2021-12-31 17:00:51 +01:00
Alexandre Alapetite a2ab9cf83a
Minz request avoid custom methods (#4020)
Take advantage of PHP7+ null-coalescing operator `??` to make code more standard, shorter, and faster instead of custom function with no extra functionality.

Allows code to be better tested and fix two PHPstan errors:

```
 ------ -----------------------------------------
  Line   app/Controllers/configureController.php
 ------ -----------------------------------------
  410    Cannot unset offset 'rid' on string.
 ------ -----------------------------------------

 ------ ------------------------------------
  Line   lib/Minz/FrontController.php
 ------ ------------------------------------
  70     Cannot unset offset 'c' on string.
  71     Cannot unset offset 'a' on string.
 ------ ------------------------------------
```

https://github.com/FreshRSS/FreshRSS/issues/4016
2021-12-02 23:25:07 +01:00
Alexandre Alapetite a7aca6c0ab
Improved feed action filters (#3303)
* Re-order some feed options
* Option to auto mark as read existing titles
* Option to keep at max n unread articles per feed
2021-09-19 10:56:38 +02:00
ORelio 50ba6bbe07
UI: Add optional thumbnail and summary on feed items (#3805)
* UI: Add optional thumbnail and summary on feed items

Implements #561

* UI: Thumbnail: Own column, Custom size, Lazy load

* UI: Thumbnail: Remove unnecessary CSS rule

Remove rule already defined in base theme, no override needed

* CSS lint + RTL

* Improve thumbail and summary generation

* Support img alt

* Missing htmlspecialchars

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-08-30 10:58:06 +02:00
Alexis Degrugillier 4f4ce3c71b
Remove shortcut validation (#3548)
Before, only standard shortcuts were supported. When other shortcuts were
configured, they were filtered out.
Now, those shortcuts are stored in the configuration and an alert message
is displayed to alert the user that he is using non-standard shortcuts.

See #3481
2021-03-21 15:42:27 +01:00
Alexis Degrugillier 789a166496
Fix search param encoding in user query (#3541)
Before, the chosen encoding was not the best for the task since some part
of the value was truncated when used with quotes.
Now, the encoding allows to work smoothly with quotes.

See #3538
2021-03-19 13:51:42 +01:00
Alexandre Alapetite 947e918f05
Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length

* Also check whitespace in CSS files

* Fix line length ext.php

* More syntax, string templates

* Fix exclude-pattern

* Test JS files as well
2021-02-28 12:26:24 +01:00
Alexis Degrugillier 0954c76866
Fix load default action on shortcuts (#3394)
See #3388
2021-01-24 00:42:21 +01:00
Alexis Degrugillier 5c18c64afb
Change integration configuration page (#3372)
I've refactored the user query code to be able to use it also on the
integration configuration page. Now, items can be re-organized as in
the user query list.
2021-01-16 22:11:30 +01:00
Alexis Degrugillier c5da4e56a6
Add a query configuration page (#3366)
* Add a query configuration page

Before, there was no way to modify a user query. Thus you need to
create a new one and delete the old one afterward.
Now, every user query can be modified if needed. They have their
own configuration page on which it can be modified or deleted.

* Change drag and drop action on queries

Before, the drag and drop action needed to be validated by submitting
the form to be persisted.
Now, it's done automatically after the query is dropped to its final
location.
2021-01-15 00:14:53 +01:00
Alexis Degrugillier 29fe125b4a
Add constant for PHP requirements (#3369)
* Add constant for PHP requirements

This new constant is used for PHP version check.
This way, we won't forget to modify some part of the code base.

* Remove PHP version checks

Some checks were obsolete because they were checking unsupported
PHP versions.
2021-01-14 23:28:45 +01:00
Alexis Degrugillier 896f9d3363
Add user query manual sorting (#3346)
* Add user query manual sorting

Before, to change the user query order, you'll have to delete them
and recreate them. It was not really efficient.
Now, you can drag and drop them to ease reordering.

See #2216 and #2015

* Remove cancel action on user query configuration

Before, the cancel action was useless since it was not wired.
Now, there is no cancel action.

See #2015
2021-01-09 01:47:20 +01:00
Alexis Degrugillier 85cbfcedb5
Update user query feature (#3338)
* Change user query wording

There was some misunderstanding in the use of the user query feature,
probably because of the wording. I've change it to make it more obvious.

* Fix feedback when a query is bookmarked

Before, the displayed query name was not the one intended. Now, the name is the one of the current bookmark

* Document user queries

I've added a few words on how to use the user queries because it seems there was some misunderstanding. See #3219
2021-01-07 21:47:39 +01:00
Alexandre Alapetite 99c3263cbe
Trim rid param from user query (#3306)
Caused by https://github.com/FreshRSS/FreshRSS/pull/3208
Before, the 'rid' parameter was saved as part of the user query.
2020-12-29 19:17:06 +01:00
Martin 6ecfc01c1f
bump default logout from 30 days to 3 months (#3170)
* bump default logout from 30 to 365 days

* * Change cookie duration to constant
* Change cookie duration to three months

* use class

* use 90 days (otherwise login form says 91.3 days)

* change class

* also this works now

Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2020-12-26 23:40:24 +01:00
Alexis Degrugillier 4abb30228b
Fix user queries with labels (#3285)
Before user queries with labels were not translated. Actually, it was not
even processed.
Now those user queries are translated properly.

See #3215
2020-12-26 12:50:09 +01:00
Alexandre Alapetite 7652369359
Minz: Attach a notification to a request (#3208)
* Minz: Attach a notification to a request

Notifications should be attached to a request, not to a global session.
Fix
https://github.com/FreshRSS/FreshRSS/pull/3096#issuecomment-654891906
Prepare https://github.com/FreshRSS/FreshRSS/pull/3096

* Rename array

* Avoid string constants

Implement
https://github.com/FreshRSS/FreshRSS/pull/3208#issuecomment-703243863

* Improved logic

* Simplify storage

https://github.com/FreshRSS/FreshRSS/pull/3208#discussion_r499511213

* Fix notification bug in configuration/system
2020-10-05 19:03:33 +02:00
Alexis Degrugillier 35eed83b64
Add a way to disable shortcuts (#3114)
When the user do not want to use a shortcut, he can let the shortcut value
empty. This will save an empty configuration thus disabling the shortcut.
The load default action allows to use default shortcut only for disabled
shortcuts.

See #3110
2020-07-14 11:02:30 +02:00
Alexis Degrugillier b2b249d6d6
Fix user queries when they contain " (#3037)
Before, the user queries were working filter-wise but they failed at being displayed
properly in the configuration page. Thus they were stored without the search param.
Now, the search is URL encoded to avoid that kind of behavior and keep the search
param through out the user query's life.
2020-06-06 20:59:53 +02:00
Alexandre Alapetite 5ddae68953
Option to control which categories to unfold (#2888)
#fix https://github.com/FreshRSS/FreshRSS/issues/2324
2020-04-16 18:09:54 +02:00
Offerel 68863fbac8 Show Favorites as Unread (#2766)
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-01-16 17:11:04 +01:00