1
0
Fork 0
Commit Graph

472 Commits

Author SHA1 Message Date
Daniel Starzmann 2d4cb5ed1c Improve sql query performance by removing unused payload
Signed-off-by: Daniel Starzmann <daniel@starze.de>
2023-04-16 11:13:30 +02:00
Benjamin Brahmer a70d155ce4 Set lastmodified in read all
if this is not updated the API won't work correctly and we get sync errors.
Adjust test to use item api

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-04-05 19:43:02 +02:00
Benjamin Brahmer b1476e958a If timestamp is null use timestamp "one year ago"
if timestamp is not set during creation of a feed use date one year ago
code fixes and linting fixes.

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-23 12:12:06 +01:00
Robert Wunderer eeabb4189b Use httpLastModified field for If-Modified-Since header when fetching feed updates
Signed-off-by: Robert Wunderer <robert.wunderer@caprisys.at>
2023-03-23 12:12:06 +01:00
Benjamin Brahmer be95c17f46 store useragent in one place
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-23 12:11:38 +01:00
Benjamin Brahmer ea8002e2d9 add cron status badge to admin setting
Display  a info card in the settings, indicating when the last news update job ran.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-13 14:39:15 +01:00
Benjamin Brahmer 7cdf3c83e8 fix style
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-02 17:51:53 +01:00
Benjamin Brahmer 04fcda9b1a Remove unused job from db
Our background job was renamed quite a while ago
the old job remained in the db, to prevent confusion this adds
a repair step to remove the old job.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-02 17:51:53 +01:00
Benjamin Brahmer 69681d12cb Implement item search
The search result can only link to the feed.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-02-14 11:18:00 +01:00
Sean Molenaar e5f75d7a4c fix: do not request favicon for empty base URL
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2023-02-14 10:18:08 +01:00
Benjamin Brahmer ef04d091c7 Update lib/Db/Feed.php
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-01-12 18:27:32 +01:00
Benjamin Brahmer 502e4b923e don't process link if it's null
don't process body of feed if it's null

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-01-12 18:27:32 +01:00
Benjamin Brahmer 0dfd93f75d Workaround for #2048
The league/uri version that we inherit in Nextcloud is a bit outdated.
That version can't handle certain uris.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-01-11 10:19:34 +01:00
dependabot[bot] 92ebe4a836
Bump fivefilters/readability.php from 2.1.0 to 3.1.0 (#1989)
* Bump fivefilters/readability.php from 2.1.0 to 3.1.0

Bumps [fivefilters/readability.php](https://github.com/fivefilters/readability.php) from 2.1.0 to 3.1.0.
- [Release notes](https://github.com/fivefilters/readability.php/releases)
- [Changelog](https://github.com/fivefilters/readability.php/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fivefilters/readability.php/compare/v2.1.0...v3.1.0)

---
updated-dependencies:
- dependency-name: fivefilters/readability.php
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update Authors

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

* Change namespace for fivefilters

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Brahmer <info@b-brahmer.de>
2022-11-17 22:03:46 +01:00
Rhys Tyers a50d0a427d Fix various keyboard navigation issues
Signed-off-by: Rhys Tyers <mail@rhy.si>
2022-10-23 12:48:39 +02:00
Benjamin Brahmer 505b3360cb Remove setting for minimum purge interval setting
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-10-12 21:09:54 +02:00
Benjamin Brahmer b88e1a546a New administrator setting for deleting unread items automatically
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-10-08 17:29:08 +02:00
Benjamin Brahmer a7f69c4b63 fix readAll
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-31 16:14:18 +02:00
Carl Schwan 753e88793e
Port admin settings to vue (#1880)
* Port admin settings to vue

Co-authored-by: anoy. <anoymouserver@users.noreply.github.com>
Co-authored-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-30 18:07:25 +02:00
Benjamin Brahmer c217448345 Fix adding feed that was just deleted is causing an error
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-25 07:50:36 +02:00
Benjamin Brahmer 4afd5a547d change itemMapper readAll
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-21 16:39:07 +02:00
Benjamin Brahmer 410a1e4d6b fixup for #1861
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 15:57:03 +02:00
Benjamin Brahmer 1784406fa7
Fix deprecation warnings from Nextcloud. (#1869)
* don't use private class anymore
* execute is deprecated
* fix migration execute statement
* fix unittest

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 10:07:43 +02:00
Benjamin Brahmer c09cca75b5 Fix deprecations
add phpstan deprecation rules

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer a3d70f50aa Fix Test and adjust code
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer 932b88a39c add item types to api docs
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer a66d62d1d7 adapt generateSearchIndex
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer d4450ebad2
Change Autodiscover behaviour (#1860)
* change autodiscover behaviour to only run if the provided url is not already a feed

* Execute feed check after the final url is found

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
2022-08-08 19:23:42 +02:00
Benjamin Brahmer 66a161e4f7 fix type always string for findAllFromUser
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-06-28 17:29:13 +02:00
Benjamin Brahmer 1c91928e59
If items of feed do not provide an author fallback to feed author (#1803)
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-05-31 15:46:01 +02:00
Accalia Elementia fdf037e728
Use Feed Link as GUID when Feed omits Guid. (#1785)
* Use Feed Link as GUID when Feed omits Guid.

As noted in nextcloud/news#1702 some feeds omit the GUID and are
therefore not a valid RSS feed.

nextcloud/news#1738 resolved the issue to allow valid feeds to
update correctly when an invalid feed is present.

This commit allows parsing of the invalid feed as well by assuming
that the item link of the feed is unique to the feed and using
it in place of the GUID when the feed omits the GUID.

This will allow NextCloud News to accept and behave like many other
popular feed aggregators when presented with such an invalid feed.

Signed-off-by: Accalia <Accalia@Elementia.me>

* Add basic Logging when using fallback guid

Signed-off-by: Accalia <Accalia@Elementia.me>

* Add basic Logging when using fallback guid - Fix Fatfinger Typo

Signed-off-by: Accalia <Accalia@Elementia.me>

* Add basic Logging when using fallback guid - Update tests to account for additional logging

Signed-off-by: Accalia <Accalia@Elementia.me>
2022-05-24 17:07:50 +02:00
Benjamin Brahmer 0fb620244d check if variable is null before striping tags
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
2022-05-04 18:14:37 +02:00
Benjamin Brahmer 15e613bc36 fix the url
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-05-04 10:18:11 +02:00
Benjamin Brahmer 5af0cb6e22 update last_modified when marking an item as read
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

this way it works

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

add changelog entry

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Partly fix test

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

test passing

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-05-02 09:56:12 +02:00
Paul Tirk da5e749ecc rename parameter for read/unread api call
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk 3bdafbfcea add documentation for API v1.3 & fix parameter description
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk 4b68169142 also allow starring/unstarring multiple items by id
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk 115df4b9e2 remove duplicate function
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk b9c4f0bacb fix indentation of function description
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk 98028e4422 add routes for starring/unstarring items by id
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Benjamin Brahmer 835f295ece Release 18.0.1
No major changes since the beta versions.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-04-24 10:29:33 +02:00
nextcloud486153 032d48ad7b Fix malformed feeds (without GUIDs) stopping the update process (fixes #1738)
Signed-off-by: nextcloud486153 <78801830+nextcloud486153@users.noreply.github.com>
2022-04-18 13:16:01 +02:00
Benjamin Brahmer 78c723f38a fix import of items when feed does not exist
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-04-18 13:10:21 +02:00
Benjamin Brahmer c49e0fb4f4 rename maxItemId to newestItemId to match docs
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-03-18 11:54:02 +01:00
Benjamin Brahmer 78bc3321b9 Fix only one item marked as read by Feed API
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-03-08 13:05:15 +01:00
Benjamin Brahmer a5eaf9ec42 Use rawurlencode as it encodes spaces correctly as %20
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-02-27 20:04:14 +01:00
Benjamin Brahmer a9e4a5abd3 let Symfony handle the defualt vote value
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-12-03 21:39:47 +01:00
Michael Hamann f071c05a48 Fix catching connect exceptions while fetching feed logos #1570
Display the message instead of the response when catching an exception
during feed logo fetching. As there is no response and thus no method
`getResponse()` in `ConnectException`, this fixes a "call to undefined
method"-error that prevented feeds from fetching if fetching the logo
resulted in a `ConnectException`.

Signed-off-by: Michael Hamann <michael@content-space.de>
2021-11-30 23:39:39 +01:00
Benjamin Brahmer f0a1c92502 Fix code style
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-11-18 14:10:57 +01:00
Sean Molenaar a52eee5671 chore: use executeStatement instead of executeUpdate
Signed-off-by: Sean Molenaar sean@seanmolenaar.eu
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-11-18 14:10:57 +01:00