1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-12-22 05:42:49 +01:00
Commit Graph

158 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
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
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
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
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
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
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
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
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
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
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
Sean Molenaar
74f09ee716 db: no longer order by items.last_modified
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-05-27 19:12:55 +02:00
Sean Molenaar
111bf5fff2 DB: only sort on item IDs
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-04-14 13:56:54 +02:00
Marco Nassabain
96846e1266 🔥 Remove changes to back-end from front-end pr
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Jimmy Huynh
4a9a4cf0d2 (+) Adding sharing_user names to EVERY articles + pre-condition if sharedArticle: no title feed (e.g.: from wikiRSS...)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 23:17:31 +02:00
Marco Nassabain
bf85a5883a 🩹 Item: change $sharedBy to string|null in annot.
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
413c4b8914 🩹 Fix sharedByDisplayName bug:
- setting sharedByDisplayName shouldn't mark it as updated

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
bbdd95c30d 🔥 Remove UserManager code from ItemMapper & tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
4d0a82d429 ✏️ Fix phpcs indentation error
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
c2c92a3f5a 🩹 Fix issues after rebase
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
276460a240 🩹 Item: mark categoriesJson as updated in clone
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
7306370ece Item: add sharer display name in findEntities
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
8674d558fc Update Item model: add sharedByDisplayName
- added field + setters + getters
- include field in serialized Item

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
b0c42e4cd7 ♻️ Item: Remove isShared
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
e96d7c9b1e 🎨 Item.php: make shared_by nullable
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
6a6f89ff94 🎨 Item.php: Remove shared_with
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
WENDLING NICOLAS
f6014567f3 🗑 '!=' is discouraged, replaced by '!=='
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
a9863ec5f7 🗑 '!=' is discouraged, replaced by '!=='
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
af02560363 🎨 ItemMapperV2: add new offset code (findShared)
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
df8680b14a 🩹 Remove traces of feed_id being nullable
- feed_id is not nullable so we remove default values

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
1f0924fb57 ItemMapperV2: exclude shared items in functions
updated the following functions to exclude shared_items:
- findAllInFeedAfter
- findAllInFolderAfter
- findAllFeed
- findAllFolder

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
26ae92bc7b ItemMapperV2: include shared in functions
updated the following functions to include shared items:
- findFromUser
- findForUserByGuidHash
- readAll
- findAllAfter
- findAllItems

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
83bdbc08a0 ItemMapperV2: include shared in functions
updated the following functions to include shared items:
- findAllFromUser
- newest

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
c3cc70b15e ItemMapperV2: added findAllSharedWithUser funct
- return all items shared with a given user

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
237363e087 💡 Added comments to ItemMapper share fncts
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
ec5ae1a90a 🩹 ItemMapper->deleteUser: include shared items
- deletes items shared with a user

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
15dedf0ceb 🩹 Patch getNewestItemId: include shared articles
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00