summaryrefslogtreecommitdiffstats
path: root/businesslayer/feedbusinesslayer.php
diff options
context:
space:
mode:
Diffstat (limited to 'businesslayer/feedbusinesslayer.php')
-rw-r--r--businesslayer/feedbusinesslayer.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/businesslayer/feedbusinesslayer.php b/businesslayer/feedbusinesslayer.php
index 983a4768a..9f3635e8a 100644
--- a/businesslayer/feedbusinesslayer.php
+++ b/businesslayer/feedbusinesslayer.php
@@ -118,18 +118,21 @@ class FeedBusinessLayer extends BusinessLayer {
public function update($feedId, $userId){
try {
$existingFeed = $this->mapper->find($feedId, $userId);
+
+ if($existingFeed->getPreventUpdate() === true) {
+ return;
+ }
+
try {
- list($feed, $items) = $this->feedFetcher->fetch($existingFeed->getUrl());
+ list($feed, $items) = $this->feedFetcher->fetch(
+ $existingFeed->getUrl());
- // insert items in reverse order because the first one is usually the
- // newest item
+ // insert items in reverse order because the first one is usually
+ // the newest item
for($i=count($items)-1; $i>=0; $i--){
$item = $items[$i];
$item->setFeedId($existingFeed->getId());
- // if a doesnotexist exception is being thrown the entry does not
- // exist and the item needs to be created, otherwise
- // update it
try {
$existing = $this->itemMapper->findByGuidHash(
$item->getGuidHash(), $feedId, $userId);