Explorar o código

Avoid duplicates in Dynamic OPML (#6264)

Avoid duplicate feeds if the dynamic OPML contains the same feed multiple times
Alexandre Alapetite %!s(int64=2) %!d(string=hai) anos
pai
achega
c052149e5a
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      app/Models/Category.php

+ 1 - 0
app/Models/Category.php

@@ -214,6 +214,7 @@ class FreshRSS_Category extends Minz_Model {
 						// The feed does not exist in the current category, so add that feed
 						// The feed does not exist in the current category, so add that feed
 						$dryRunFeed->_category($this);
 						$dryRunFeed->_category($this);
 						$ok &= ($feedDAO->addFeedObject($dryRunFeed) !== false);
 						$ok &= ($feedDAO->addFeedObject($dryRunFeed) !== false);
+						$existingFeeds[$dryRunFeed->url()] = $dryRunFeed;
 					} else {
 					} else {
 						$existingFeed = $existingFeeds[$dryRunFeed->url()];
 						$existingFeed = $existingFeeds[$dryRunFeed->url()];
 						if ($existingFeed->mute()) {
 						if ($existingFeed->mute()) {