Only delay mirrored feeds
This commit is contained in:
parent
b2dadf0f92
commit
e9fecf1541
|
@ -638,12 +638,13 @@ class Feed
|
||||||
$post_delay = 0;
|
$post_delay = 0;
|
||||||
|
|
||||||
foreach ($postings as $posting) {
|
foreach ($postings as $posting) {
|
||||||
|
$publish_time = time();
|
||||||
|
|
||||||
|
if ($posting['notify']) {
|
||||||
if ($delay > 0) {
|
if ($delay > 0) {
|
||||||
$publish_time = time() + $post_delay;
|
$publish_time = time() + $post_delay;
|
||||||
Logger::notice('Got publishing date', ['delay' => $delay, 'cid' => $contact['id'], 'url' => $contact['url']]);
|
Logger::notice('Got publishing date', ['delay' => $delay, 'cid' => $contact['id'], 'url' => $contact['url']]);
|
||||||
$post_delay += $delay;
|
$post_delay += $delay;
|
||||||
} else {
|
|
||||||
$publish_time = time();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$last_publish = DI::pConfig()->get($posting['item']['uid'], 'system', 'last_publish', 0, true);
|
$last_publish = DI::pConfig()->get($posting['item']['uid'], 'system', 'last_publish', 0, true);
|
||||||
|
@ -655,6 +656,7 @@ class Feed
|
||||||
'publish' => date(DateTimeFormat::MYSQL, $publish_time)]);
|
'publish' => date(DateTimeFormat::MYSQL, $publish_time)]);
|
||||||
$publish_time = $next_publish;
|
$publish_time = $next_publish;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$publish_at = date(DateTimeFormat::MYSQL, $publish_time);
|
$publish_at = date(DateTimeFormat::MYSQL, $publish_time);
|
||||||
|
|
||||||
Post\Delayed::add($publish_at, $posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']);
|
Post\Delayed::add($publish_at, $posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user