Commit Graph

663 Commits

Author SHA1 Message Date
Alexandre Alapetite
7f0c378482 Fix favicons update (#4358)
Better update the favicons when the URL changes
2022-05-13 23:14:09 +02:00
Clemens Neubauer
046598e743 fix depending results after changing value of "entry->isRead" (#4331)
* fix depending results after changing value of "entry->isRead" inside of hook 'entry_before_insert'

if anybody use the hook 'entry_before_insert' and change the value of the property 'entry->isRead', the depending results are correct now.

In my case my config let all new entrys as "isRead=FALSE" as i will. A new extension which is in progress, can/should/must change the value of this property, but the depending results of this property are wrong before this fix.

* Update app/Controllers/feedController.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-04-26 08:47:19 +02:00
maTh
7d00ad8ed7 Improve: manage feed in view within a slider (#4226)
* it works

* small improvements

* Update slider.js

* fixed JS syntax

* slider.js included in main.js

* fix syntax

* delete including of slider.js

* Update extra.js
2022-03-22 23:09:50 +01:00
Alexandre Alapetite
4363e13c34 Set feed error state when XPath does not match (#4275)
Gives the ability to filter HTML+XPath feeds that are not working
2022-03-21 12:51:41 +01:00
Alexandre Alapetite
6f018cc674 Show errored, empty, muted feeds in statistics (#4276) 2022-03-21 12:51:26 +01:00
Alexandre Alapetite
a9e23bd120 Remove XPath title in feed update (#4259)
* Remove XPath title in feed update
#fix https://github.com/FreshRSS/FreshRSS/issues/4253

* Pre-fill //title
https://github.com/FreshRSS/FreshRSS/issues/4253#issuecomment-1059746286

Co-authored-by: maTh <math-home@web.de>
2022-03-06 21:39:11 +01:00
Alexandre Alapetite
1fe66ad020 Implement Web scraping "HTML + XPath" (#4220)
* More PHP type hints for Fever
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4201
Related to https://github.com/FreshRSS/FreshRSS/issues/4200

* Detail

* Draft

* Progress

* More draft

* Fix thumbnail PHP type hint
https://github.com/FreshRSS/FreshRSS/issues/4215

* More types

* A bit more

* Refactor FreshRSS_Entry::fromArray

* Progress

* Starts to work

* Categories

* Fonctional

* Layout update

* Fix relative URLs

* Cache system

* Forgotten files

* Remove a debug line

* Automatic form validation of XPath expressions

* data-leave-validation

* Fix reload action

* Simpler examples

* Fix column type for PostgreSQL

* Enforce HTTP encoding

* Readme

* Fix get full content

* target="_blank"

* gitignore

* htmlspecialchars_utf8

* Implement HTML <base>
And fix/revert `xml:base` support in SimplePie e49c578817

* SimplePie upstream PR merged
https://github.com/simplepie/simplepie/pull/723
2022-02-28 20:22:43 +01:00
maTh
fa23ae76ea fix (#4240) 2022-02-27 22:43:53 +01:00
Alexandre Alapetite
ede82f9819 Fix read-when-same-title bug (#4206)
Made apparent by type hints
2022-02-07 01:03:00 +01:00
maTh
dfee46792f Improved: "Pagination" + load more button (#4125)
* Frontend changes done

* Load more should work now also without JS

* Update template.rtl.css

* improved the themes' CSS

* Update template.rtl.css

* fix CI

* CSS prop. order fixed

* Rename pagination.phtml to stream-footer.phtml

* use the new template name

* rename key of i18n

* fixed CI, that does not like the white space

* rename pagination variable

* Update indexController.php
2022-02-06 17:29:56 +01:00
Alexandre Alapetite
1c5cf71859 Fix Fever 32 bit ID issue + more PHP type hints (#4201)
* Fix Fever 32 bit ID issue + more PHP type hints
#fix https://github.com/FreshRSS/FreshRSS/issues/4200
Follow up and fix regression from https://github.com/FreshRSS/FreshRSS/pull/4110

* More PHP type hints with PHPStan

* Fix pull problem

* Avoid more nulls
2022-02-06 14:31:36 +01:00
maTh
be9c06fd5c Improved: Idle feeds list in a new layout (#4192)
* that should work fine

* fixed phpcs

* fixed phpcs
2022-02-05 10:57:36 +01:00
maTh
b127777887 class constant (#4194) 2022-02-04 15:47:54 +01:00
Alexandre Alapetite
05ca0517bb Compat import JSON milliseconds (#4186)
#fix https://github.com/FreshRSS/FreshRSS/issues/4185
2022-02-01 00:03:51 +01:00
Alexandre Alapetite
47e242aa77 Fix ctype_alnum (#4182)
* Fix ctype_alnum
#fix https://github.com/FreshRSS/FreshRSS/issues/4180
Ensure `ctype_alnum()` gets a string

* Changelog
2022-01-30 15:53:17 +01:00
Alexandre Alapetite
8808fb4545 Fix keep state after favourites tags (#4178)
* Fix keep state after favourites tags
#fix https://github.com/FreshRSS/FreshRSS/issues/4124 regression

* Optimisation
2022-01-29 14:19:16 +01:00
Alexandre Alapetite
4e2dff4591 Add spell checking with typos (#4138)
* Add spell checking with typos
Implement https://github.com/FreshRSS/FreshRSS/pull/4134#issuecomment-1008027558

* GitHub Actions attempt

* Quiet wget

* Makefile
2022-01-09 18:21:40 +01:00
Alexandre Alapetite
1acd3ab09b Use typographic quotes (#4133)
* Use typographic quotes

* A few fixes

* Fix

* Fix not saved

* Implement feedback

* Detail

* Revert spoken English fixes
Left for a future dedicated discussion

* More reverts

* Final reverts

* Final minor
2022-01-08 21:58:55 +01:00
Thomas Renes
916df412f5 Fix various typos and spelling errors in documentation, comments and code. (#4134) 2022-01-08 16:25:17 +01:00
Luc SANCHEZ
ed19445f74 Optimise Minz_ModelPdo::class (#4119)
* - Fix typo,
- remove unnecessary null in property,
- remove unused property,
- add phpDoc,
- add ext PDO in composer.json,
- use strict comparison,
- indentation

* Translate

* Update lib/Minz/ModelPdo.php

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

* The code is more explicite

* Fix phpstan

* Fix phpstan expect one

* Fix phpstan

* Return in back...

* make fix-all

* Fix exception and more types

* Fix more types

* Remove ext- in composer.json

Co-authored-by: Luc SANCHEZ <l.sanchez-ext@ubitransport.com>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-01-07 10:05:09 +01: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
3f6aa42b81 Fix most PHPDocs errors (#4107)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103
https://phpstan.org/writing-php-code/phpdoc-types
2022-01-01 11:26:56 +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
20c8382c25 Fix invalid user (#4081)
#fix https://github.com/FreshRSS/FreshRSS/issues/4080
Initialise the default user to be able to display the error page
2021-12-24 18:44:34 +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
e61cc3153a Additional HTTP error codes (#3981) 2021-11-15 13:44:14 +01:00
maTh
26afec2379 Fix label management (#3959)
* disable inputs

* fix create empty tags

* Update app/Controllers/tagController.php

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

* Update app/views/tag/index.phtml

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

* Small additional checks

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-11-11 19:57:05 +01:00
maTh
3623a5421d enhancement subscription management page (#3893)
* wip

* wip2

* i18n

* Update app/views/helpers/category/update.phtml

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

* fixed box layout

* Revert "i18n"

This reverts commit a2e4d8ace6.

* i18n

This reverts commit 55236930cf.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2021-10-19 15:08:32 +02:00
maTh
02641de32e Stats: replace flotr2 with chart.js (#3858)
* include Chart.js

* page: main statistics. Flotr.js replaced with Chart.js

* main stats + repartition

* Delete: repartition.js + stats.js

* delete flotr2

* add libs in README

* polish

* code polish

* fixed amount of week days and months

* added manget link for LibreJS

* added: @license-end

* phpcbf + jshint formatting

* delete old code

* fix stats

* fix Comments

* finally I found the issue and fixed its best

* fix the month stats

* Whitespace fixes

* Remove flotr2

* Rename to chart.min.js

* Remove console.log

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-10-16 12:00:07 +02: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
maTh
93e73855ec Delete jQuery (#3847)
* delete jquery.min.js lib
2021-09-13 08:02:09 +02:00
Alexandre Alapetite
fe295f50d0 Lint i18n files (#3841)
Translations had quite a lot of cleaning in late:
* Removed some unused keys
* Added some ignores
* Applied a `cli/manipulate.translation.php -a format`
2021-09-12 11:37:15 +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
Alexandre Alapetite
ee2d2db780 Fallback for feeds with empty title (#3787)
* Fallback for feeds with empty title
Address a part of https://github.com/FreshRSS/FreshRSS/issues/3776 for existing feeds

* Also strip www prefix

* Reuse fallback logic
2021-08-22 13:33:58 +02:00
Alexandre Alapetite
7d83321286 Better catch when a user does not exists (#3751)
#fix https://github.com/FreshRSS/FreshRSS/issues/3735
Before, we were relying on an exception during the first stages of user initalisation. Now the check is explicit and cleaner, producing a more appropriate HTTP response for the API.
2021-08-14 12:22:42 +02:00
Alexandre Alapetite
c5ca737062 Git 2.21 compatiblity (#3669)
#fix https://github.com/FreshRSS/FreshRSS/issues/3665
`git branch --show-current` requires git 2.22+
https://stackoverflow.com/questions/1417957/show-just-the-current-branch-in-git
2021-06-07 23:10:25 +02:00
Alexis Degrugillier
3c3eab768e Fix user creation form redirection (#3656)
Before, when there was an error during the user creation process, the user was
always redirected to the same page no matter where the creation process was
initiated (registration or creation by an admin). Thus, there were no error
messages displayed when something went bad during the creation process by an
admin.
Now, the origin of the user creation has been added to the form to be able to
redirect the user to the proper page.
2021-06-01 14:16:33 +02:00
Alexandre Alapetite
54e0a6e553 Fix git update error message (#3645)
#fix https://github.com/FreshRSS/FreshRSS/issues/3644
2021-05-30 12:05:50 +02:00
Alexandre Alapetite
319d7dc185 Minor whitespace (#3639)
Spotted in https://github.com/FreshRSS/FreshRSS/issues/3638
2021-05-26 19:54:47 +02:00
Alexandre Alapetite
97ba6261a8 git update auto change to edge branch (#3589)
* git update auto change to edge branch
For existing installations using automatic git update, checkout *edge* branch if it was still using *master* or *dev*.

* One more prune

* Fix several small issues

* theirs does not work here

* Use migration mechanism

* Better handling of Migration errors

* Test details

* Fix tests

* Do not use new migration system for now
2021-05-15 21:33:43 +02:00
Alexandre Alapetite
607f7e7254 Fix several comments syntaxes (#3615)
Mainly wrong `@return` types in comments
2021-05-08 10:27:18 +02:00
Alexandre Alapetite
a65097f1b3 Make SSL options available to non-admins (#3612)
#fix https://github.com/FreshRSS/FreshRSS/issues/3611
2021-05-07 17:21:16 +02:00
Alexandre Alapetite
83a352e4bf Removed unused variable (#3587)
From https://github.com/FreshRSS/FreshRSS/pull/2335
2021-04-17 18:11:03 +02:00
berumuron
cc6c529562 tec: Remove data/do-install.txt (#3555)
* Remove file data/do-install.txt

This file was painful during update because we had to remember to delete
it each time. It added a security issue by allowing an attacker to
reinstall FreshRSS during the update process.

The (more powerful) file data/applied_migrations.txt has been introduced
in 8619cf6fa to replace do-install.txt. We had to wait for at least one
release in order to make sure existing instances of FreshRSS created the
migration file. It should be ok now.

* Replace i18n install.not_deleted key

* Update documentation to update FreshRSS
2021-03-26 19:41:33 +01:00
Alexandre Alapetite
eeff1a17b0 Suport standard HTTP 410 Gone (#3561)
When a feed returns an HTTP 410 Gone, mute the corresponding feed, i.e. stop refreshing it.
Example of such feed, Les Décodeurs (Libération) https://rss.liberation.fr/rss/100893/
2021-03-26 19:13:23 +01:00
Alexandre Alapetite
de40f3ad56 Fix TT-RSS import (#3553) 2021-03-24 19:04:51 +01:00
Alexandre Alapetite
90a0028d49 Fix DB lock bug during refresh (MariaDB) (#3559)
#fix https://github.com/FreshRSS/FreshRSS/issues/3552
2021-03-23 22:31:48 +01: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
Alexandre Alapetite
e2533bd946 Fix undefined variable & dead code when adding feed (#3546)
Related to https://github.com/FreshRSS/FreshRSS/issues/3537
2021-03-21 12:23:32 +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