diff --git a/CHANGELOG.md b/CHANGELOG.md index e283aa6d47..a6de903358 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -296,7 +296,7 @@ Note: Nextcloud 20 support will be dropped in Oct 2021, this is very likely the There are no additional changes compared to the latest beta. ### Changed -- News now requires a 64bit OS +- ~~News now requires a 64bit OS~~ – reverted in this fork - v2 API implementation (folder part) - Implemented sharing news items between nextcloud users (#1191) - Updated the news items table in DB to include sharer data (#1191) diff --git a/appinfo/info.xml b/appinfo/info.xml index 080ee279df..83ef87ec6c 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -43,7 +43,7 @@ Report a [feed issue](https://github.com/nextcloud/news/discussions/new) https://raw.githubusercontent.com/nextcloud/news/master/screenshots/2.png https://raw.githubusercontent.com/nextcloud/news/master/screenshots/3.png - + pgsql sqlite mysql diff --git a/lib/Controller/ItemApiController.php b/lib/Controller/ItemApiController.php index bdc6e51408..6e33750d7d 100644 --- a/lib/Controller/ItemApiController.php +++ b/lib/Controller/ItemApiController.php @@ -122,12 +122,12 @@ public function index( * * @param int $type * @param int $id - * @param int $lastModified + * @param float $lastModified * @return array|JSONResponse * * @throws ServiceValidationException */ - public function updated(int $type = 3, int $id = 0, int $lastModified = 0): array + public function updated(int $type = 3, int $id = 0, float $lastModified = 0): array { // needs to be turned into a millisecond timestamp to work properly if (strlen((string) $lastModified) <= 10) { diff --git a/lib/Db/ItemMapperV2.php b/lib/Db/ItemMapperV2.php index 7c70c68798..0c5f506a22 100644 --- a/lib/Db/ItemMapperV2.php +++ b/lib/Db/ItemMapperV2.php @@ -328,7 +328,7 @@ public function newest(string $userId): Entity /** * @param string $userId * @param int $feedId - * @param int $updatedSince + * @param float $updatedSince * @param bool $hideRead * * @return Item[] @@ -336,7 +336,7 @@ public function newest(string $userId): Entity public function findAllInFeedAfter( string $userId, int $feedId, - int $updatedSince, + float $updatedSince, bool $hideRead ): array { $builder = $this->db->getQueryBuilder(); @@ -366,7 +366,7 @@ public function findAllInFeedAfter( /** * @param string $userId * @param int|null $folderId - * @param int $updatedSince + * @param float $updatedSince * @param bool $hideRead * * @return Item[] @@ -374,7 +374,7 @@ public function findAllInFeedAfter( public function findAllInFolderAfter( string $userId, ?int $folderId, - int $updatedSince, + float $updatedSince, bool $hideRead ): array { $builder = $this->db->getQueryBuilder(); @@ -400,13 +400,13 @@ public function findAllInFolderAfter( /** * @param string $userId - * @param int $updatedSince + * @param float $updatedSince * @param int $feedType * * @return Item[]|Entity[] * @throws ServiceValidationException */ - public function findAllAfter(string $userId, int $feedType, int $updatedSince): array + public function findAllAfter(string $userId, int $feedType, float $updatedSince): array { $builder = $this->db->getQueryBuilder(); diff --git a/lib/Service/ItemServiceV2.php b/lib/Service/ItemServiceV2.php index ab83ba5c54..8618257890 100644 --- a/lib/Service/ItemServiceV2.php +++ b/lib/Service/ItemServiceV2.php @@ -277,12 +277,12 @@ public function findAllInFeed(string $userId, int $feedId): array * Returns all new items in a feed * @param string $userId the name of the user * @param int $feedId the id of the feed - * @param int $updatedSince a timestamp with the minimal modification date + * @param float $updatedSince a timestamp with the minimal modification date * @param boolean $hideRead if unread items should also be returned * * @return array of items */ - public function findAllInFeedAfter(string $userId, int $feedId, int $updatedSince, bool $hideRead): array + public function findAllInFeedAfter(string $userId, int $feedId, float $updatedSince, bool $hideRead): array { return $this->mapper->findAllInFeedAfter($userId, $feedId, $updatedSince, $hideRead); } @@ -291,12 +291,12 @@ public function findAllInFeedAfter(string $userId, int $feedId, int $updatedSinc * Returns all new items in a folder * @param string $userId the name of the user * @param int|null $folderId the id of the folder - * @param int $updatedSince a timestamp with the minimal modification date + * @param float $updatedSince a timestamp with the minimal modification date * @param boolean $hideRead if unread items should also be returned * * @return array of items */ - public function findAllInFolderAfter(string $userId, ?int $folderId, int $updatedSince, bool $hideRead): array + public function findAllInFolderAfter(string $userId, ?int $folderId, float $updatedSince, bool $hideRead): array { return $this->mapper->findAllInFolderAfter($userId, $folderId, $updatedSince, $hideRead); } @@ -306,13 +306,13 @@ public function findAllInFolderAfter(string $userId, ?int $folderId, int $update * * @param string $userId the name of the user * @param int $feedType the type of feed items to fetch. (starred || unread) - * @param int $updatedSince a timestamp with the minimal modification date + * @param float $updatedSince a timestamp with the minimal modification date * * @return array of items * * @throws ServiceValidationException */ - public function findAllAfter(string $userId, int $feedType, int $updatedSince): array + public function findAllAfter(string $userId, int $feedType, float $updatedSince): array { if (!in_array($feedType, [ListType::STARRED, ListType::UNREAD, ListType::ALL_ITEMS], true)) { throw new ServiceValidationException('Trying to find in unknown type');