diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-11-01 15:18:32 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-11-01 15:18:32 +0100 |
commit | 457e1d9bd192a4462bb09a2b6e193e921995039d (patch) | |
tree | 24588aa15e19ed6d89342fb7ba450175cd5b724b /service | |
parent | a42da9a97c7fc84af09e01f3d6f3ee80a46b763b (diff) |
more cleanup
Diffstat (limited to 'service')
-rw-r--r-- | service/feedservice.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/service/feedservice.php b/service/feedservice.php index b6bbbec3d..ef1490106 100644 --- a/service/feedservice.php +++ b/service/feedservice.php @@ -421,13 +421,9 @@ class FeedService extends Service { public function patch($feedId, $userId, $diff=[]) { $feed = $this->find($feedId, $userId); - // these attributes just map onto the feed object without extra logic - $simplePatches = ['ordering', 'pinned', 'updateMode', 'title', 'folderId']; - foreach ($simplePatches as $attribute) { - if (array_key_exists($attribute, $diff)) { - $method = 'set' . ucfirst($attribute); - $feed->$method($diff[$attribute]); - } + foreach ($diff as $attribute => $value) { + $method = 'set' . ucfirst($attribute); + $feed->$method($value); } // special feed updates @@ -435,7 +431,6 @@ class FeedService extends Service { // disable caching for the next update $feed->setEtag(''); $feed->setLastModified(0); - $feed->setFullTextEnabled($diff['fullTextEnabled']); $this->feedMapper->update($feed); return $this->update($feedId, $userId, true); } |