summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-04-06 23:49:31 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-04-06 23:49:31 +0200
commita2aa2bf990afe11fa73dae788cdc0b2e50f7b929 (patch)
treed1b571ec2530436ddd61b9d0a3b9b172bf1d7a8b
parent65d28653ae1a1d2a7680ccfa694dbb7e2d4d750f (diff)
try to fix mysql
-rw-r--r--CHANGELOG.md6
-rw-r--r--db/mysql/itemmapper.php7
2 files changed, 10 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b54858566..34c93d0b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,11 @@
+owncloud-news (8.2.0)
+* **Backwards incompatible change**: Move updater into separate repository at https://github.com/owncloud/news-updater and publish it at pypi
+* **Enhancement**: Marking an item as read will now mark all similar items of the same user as read, regardless of the feed, #465
+
owncloud-news (8.1.0)
* **Backwards incompatible change**: URLs for the Python updater must now start with either http:// or https://
-* **Bugfix**: Fix bug that would not package all JavaScript files for the app store zip, #959
* **Enhancement**: Change Python updater License from AGPL3+ to GPL3+
+* **Bugfix**: Fix bug that would not package all JavaScript files for the app store zip, #959
* **Enhancement**: Add console API to update feeds in parallel
* **Enhancement**: Add an additional parameter to specify the loglevel for the Python updater
* **Enhancement**: Adjust Python updater to be able to use the console API. If you pass an absolute directory as url (path to your ownCloud), the updater will try to use **occ** updater commands using php. This requires no user or password arguments which makes running the updater on the same system as your ownCloud more secure
diff --git a/db/mysql/itemmapper.php b/db/mysql/itemmapper.php
index 720f03744..fa08f933f 100644
--- a/db/mysql/itemmapper.php
+++ b/db/mysql/itemmapper.php
@@ -64,6 +64,8 @@ class ItemMapper extends \OCA\News\Db\ItemMapper {
}
public function readItem($itemId, $isRead, $lastModified, $userId) {
+ $item = $this->find($itemId, $userId);
+
if ($isRead) {
$sql = 'UPDATE `*PREFIX*news_items` `items`
JOIN `*PREFIX*news_feeds` `feeds`
@@ -76,8 +78,9 @@ class ItemMapper extends \OCA\News\Db\ItemMapper {
$item->getFingerprint(), $userId];
$this->execute($sql, $params);
} else {
- // no other behavior for mysql if should be marked unread
- parent::readItem($itemId, $isRead, $lastModified, $userId);
+ $item->setLastModified($lastModified);
+ $item->setUnread();
+ $this->update($item);
}
}