feat(indieblog) attempt to avoid duplicates and glitches
This commit is contained in:
parent
40378114ec
commit
be6825b3cb
@ -133,7 +133,13 @@ $channel->addChild('language', 'en');
|
||||
|
||||
$newEntries = [];
|
||||
foreach ($groupedByDay as $day => $items) {
|
||||
if (time() - strtotime($day) < 172800) {
|
||||
if (time() - strtotime($day) < 172800) {
|
||||
continue;
|
||||
}
|
||||
if (time() - strtotime($day) > 259200) {
|
||||
continue;
|
||||
}
|
||||
if (count($items) < 10) {
|
||||
continue;
|
||||
}
|
||||
$rssItem = $channel->addChild('item');
|
||||
@ -168,4 +174,4 @@ function addCData(SimpleXMLElement $node, $content)
|
||||
$domNode = dom_import_simplexml($node);
|
||||
$domOwner = $domNode->ownerDocument;
|
||||
$domNode->appendChild($domOwner->createCDATASection($content));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user