1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-11-24 13:42:47 +01:00
Commit Graph

89 Commits

Author SHA1 Message Date
Paul Tirk
115df4b9e2 remove duplicate function
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
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
Marco Nassabain
b5186b01f1 🚑 Item: set id to null in clone function
This is done to set the id to null BEFORE resetting the updated fields.
The purpose of this is to avoid explicitly adding a NULL id into the DB,
which provokes an error in some DBMS (like postgres).

Fixes #1375

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-06-16 11:31:11 +02:00
Marco Nassabain
486e651ed6 🎨 Rename $l to $l10n
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
d5b9fbba3d ✏️ Fix comments in ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
1a5ca74172 Add sharer display name into shared items
- Add mapSharedByDisplayNames in ShareService
- Update ItemController to call function on items

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
0fdd88df55 🧹 ShareService: rename $url to $urlGenerator
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
7f3c63a2a4 🎨 ShareService: update dummy feed URL
- add IURLGenerator DI
- update url to "http://serverurl/news/sharedwithme"
- updated tests: added DI + adapted expected url

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
920ae54a2c 🌐 ShareService: Localize dummy feed title
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
2cba1e4146 🧹 Cleanup code, remove spaces, rename variables
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
e5d439ee7e 🚑 Fix newsItem insert error
- add Item::__clone method resetting updated fields
- set item id to null in ShareService

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
293300166d 🚑 Fix exception handling in ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
1a582f2a7a 🚑 Fix ItemController::share
- call correct ShareService function
- correct ShareService className annotation

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
d92d77c066 🚑 Fix errors in ShareService
- change argument $id to $itemId
- import Exceptions

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
dd818c6203 🚑 Fix circular inclusion: create ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
26569fd4a2 Add FeedServiceV2 DI into ItemServiceV2
- used for finding dummy share feed

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
9bd27da9ba 🔥 Remove old share item logic & functions
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
d2e831fbaa 🎨 Update item share: add items to dummy feed
- create/find a 'shared with me' dummy feed
- clone item, initialize fields, add to dummy feed

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
604f64c30c 🚨 Fix linter in those classes:
- ItemController
- ItemMapperV2
- ItemServicev2

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
75e81d5e0b 🥅 ItemService: catch NotFoundException + cleanup
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
88fc165f49 🔥 Remove old ItemMapper & ItemService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
08982fc540 Add findAllSharedAfter
- adapted Controller, Service and Mapper (newItems)

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
0f6ec7c99c Implementer shared getter + add count in request
- ItemServiceV2: added sharedWithUser - returns unread shared items
- ItemController & FeedController - returning shared count

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
d63e999d93 ItemServiceV2: add findAllSharedWithUserWithFilters
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
907e764749 🚧 ItemService, Controller: added basic sharing
- TODO: check if relation already exists

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
5f69c256e3 Add function for avoid duplicate item (share)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
edee520fc8 🎨 Fix function name to sharedCount
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
ca2b8c6566 Add count for unread items
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
f908df15b8 add function findAllShared in return
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
6ebe676911 add root for access shared items
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
527eef0727 NewsItem: add share functions (mapper + service)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Paul Tirk
8035142973 fix wrong function definition & remove leftover copyright headers
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
f22eddb91d remove unused 'findByName' method of folder mapper/service
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
06a45387ef lint & add missing copyright/author information
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk
5e4c927017 add folder api v2
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
skiingwiz
04519388ce Allow directly adding a feed without going through the discovery process
Signed-off-by: skiingwiz <skiingwiz@gmail.com>
2021-04-02 11:15:17 +02:00
Sean Molenaar
78dce7ffe1 DB: Updates should use set()
Issue GH-1211

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-31 22:39:00 +02:00
Sean Molenaar
2baa7a2b91 Make PHPstan stricter
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-25 18:47:38 +01:00
Sean Molenaar
4a107b3d53 General: Fix folder query
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-20 13:57:09 +01:00
Benjamin Brahmer
6cd83ea1da remove unused lastModified from feed fetcher
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-02-16 11:01:10 +01:00
Benjamin Brahmer
c09b4d8d33 prefer the feeds logo over the favicon
The logo of the feed is prefered if it is a square picture,
else the favicon is returned.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
2021-02-16 10:16:15 +01:00
Sean Molenaar
b4fa772bc5 Remove V1 item API
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-13 13:22:57 +01:00
Sean Molenaar
6e9e2512ea DB: Remove unused fields
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-05 09:37:17 +01:00
Sean Molenaar
023c61b88f Mappers: Implement item purging
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-30 18:27:06 +01:00
Sean Molenaar
cb10dd1d83 Base: Update psalm definition and dependency list
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-26 16:06:47 +01:00
anoy
c67feb8d8d fix TypeError caused by type conversion in controller
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-17 17:56:37 +01:00
Sean Molenaar
67b6c4e1b0 Fix psalm issues
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-12 13:29:08 +01:00