fix newsletter containing duplicate threads
This commit is contained in:
parent
e7479a11de
commit
aec48fa227
2 changed files with 5 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
7.4.8
|
||||
- fix: Syndicated Content doesn't display all items with multiple feeds in interleaved mode
|
||||
- fix: SQLForm file upload broken
|
||||
- fix: Newsletter can contain duplicate threads
|
||||
|
||||
7.4.7
|
||||
- fix: misspelled i18n in webgui password recovery
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ sub execute {
|
|||
|
||||
# find matching threads
|
||||
my @threads = ();
|
||||
my %foundThreads;
|
||||
$eh->info("Find threads in $assetId matching $userId subscriptions.");
|
||||
foreach my $subscription (split("\n", $subscriptions)) {
|
||||
$eh->info("Found subscription $subscription");
|
||||
|
|
@ -109,10 +110,13 @@ sub execute {
|
|||
and className like ? and lineage like ? and state = ?",
|
||||
[$fieldId, '%'.$value.'%', $lastTimeSent, 'WebGUI::Asset::Post::Thread%', $newsletter->get("lineage").'%', 'published']);
|
||||
while (my ($threadId) = $matchingThreads->array) {
|
||||
next
|
||||
if $foundThreads{$threadId};
|
||||
my $thread = WebGUI::Asset->new($self->session, $threadId);
|
||||
if (defined $thread) {
|
||||
$eh->info("Found thread $threadId");
|
||||
push(@threads, $thread);
|
||||
$foundThreads{$threadId} = 1;
|
||||
}
|
||||
else {
|
||||
$eh->error("Couldn't instanciate thread $threadId");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue