update 2023-06-22 10:54:57
This commit is contained in:
parent
82bd393f95
commit
52551e8b9a
@ -216,10 +216,10 @@ final class Watcher
|
||||
// we load the next chapter
|
||||
$next = $chapter + 1;
|
||||
// check if this books has this next chapter
|
||||
if (($force || !$this->fresh) && ($chapter_sha = $this->load->value(
|
||||
if (($force || !$this->fresh) && $this->load->value(
|
||||
['abbreviation' => $translation, 'book_nr' => $book, 'chapter' => $next],
|
||||
'sha', 'chapter'
|
||||
)) !== null)
|
||||
))
|
||||
{
|
||||
return $next;
|
||||
}
|
||||
@ -432,7 +432,7 @@ final class Watcher
|
||||
// check if we have values to insert
|
||||
if ($insert !== [])
|
||||
{
|
||||
$this->insert->items($insert, 'verse')
|
||||
$this->insert->items($insert, 'verse');
|
||||
}
|
||||
|
||||
// update the local verses
|
||||
@ -507,8 +507,12 @@ final class Watcher
|
||||
private function hold(): bool
|
||||
{
|
||||
// Create DateTime objects from the strings
|
||||
$today = new \DateTime($this->today);
|
||||
$created = new \DateTime($this->verse->created);
|
||||
try {
|
||||
$today = new \DateTime($this->today);
|
||||
$created = new \DateTime($this->verse->created);
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Calculate the difference
|
||||
$interval = $today->diff($created);
|
||||
|
@ -185,10 +185,10 @@
|
||||
// we load the next chapter
|
||||
$next = $chapter + 1;
|
||||
// check if this books has this next chapter
|
||||
if (($force || !$this->fresh) && ($chapter_sha = $this->load->value(
|
||||
if (($force || !$this->fresh) && $this->load->value(
|
||||
['abbreviation' => $translation, 'book_nr' => $book, 'chapter' => $next],
|
||||
'sha', 'chapter'
|
||||
)) !== null)
|
||||
))
|
||||
{
|
||||
return $next;
|
||||
}
|
||||
@ -401,7 +401,7 @@
|
||||
// check if we have values to insert
|
||||
if ($insert !== [])
|
||||
{
|
||||
$this->insert->items($insert, 'verse')
|
||||
$this->insert->items($insert, 'verse');
|
||||
}
|
||||
|
||||
// update the local verses
|
||||
@ -476,8 +476,12 @@
|
||||
private function hold(): bool
|
||||
{
|
||||
// Create DateTime objects from the strings
|
||||
$today = new \DateTime($this->today);
|
||||
$created = new \DateTime($this->verse->created);
|
||||
try {
|
||||
$today = new \DateTime($this->today);
|
||||
$created = new \DateTime($this->verse->created);
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Calculate the difference
|
||||
$interval = $today->diff($created);
|
||||
|
Loading…
x
Reference in New Issue
Block a user