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
|
// we load the next chapter
|
||||||
$next = $chapter + 1;
|
$next = $chapter + 1;
|
||||||
// check if this books has this next chapter
|
// 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],
|
['abbreviation' => $translation, 'book_nr' => $book, 'chapter' => $next],
|
||||||
'sha', 'chapter'
|
'sha', 'chapter'
|
||||||
)) !== null)
|
))
|
||||||
{
|
{
|
||||||
return $next;
|
return $next;
|
||||||
}
|
}
|
||||||
@ -432,7 +432,7 @@ final class Watcher
|
|||||||
// check if we have values to insert
|
// check if we have values to insert
|
||||||
if ($insert !== [])
|
if ($insert !== [])
|
||||||
{
|
{
|
||||||
$this->insert->items($insert, 'verse')
|
$this->insert->items($insert, 'verse');
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the local verses
|
// update the local verses
|
||||||
@ -507,8 +507,12 @@ final class Watcher
|
|||||||
private function hold(): bool
|
private function hold(): bool
|
||||||
{
|
{
|
||||||
// Create DateTime objects from the strings
|
// Create DateTime objects from the strings
|
||||||
|
try {
|
||||||
$today = new \DateTime($this->today);
|
$today = new \DateTime($this->today);
|
||||||
$created = new \DateTime($this->verse->created);
|
$created = new \DateTime($this->verse->created);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate the difference
|
// Calculate the difference
|
||||||
$interval = $today->diff($created);
|
$interval = $today->diff($created);
|
||||||
|
@ -185,10 +185,10 @@
|
|||||||
// we load the next chapter
|
// we load the next chapter
|
||||||
$next = $chapter + 1;
|
$next = $chapter + 1;
|
||||||
// check if this books has this next chapter
|
// 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],
|
['abbreviation' => $translation, 'book_nr' => $book, 'chapter' => $next],
|
||||||
'sha', 'chapter'
|
'sha', 'chapter'
|
||||||
)) !== null)
|
))
|
||||||
{
|
{
|
||||||
return $next;
|
return $next;
|
||||||
}
|
}
|
||||||
@ -401,7 +401,7 @@
|
|||||||
// check if we have values to insert
|
// check if we have values to insert
|
||||||
if ($insert !== [])
|
if ($insert !== [])
|
||||||
{
|
{
|
||||||
$this->insert->items($insert, 'verse')
|
$this->insert->items($insert, 'verse');
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the local verses
|
// update the local verses
|
||||||
@ -476,8 +476,12 @@
|
|||||||
private function hold(): bool
|
private function hold(): bool
|
||||||
{
|
{
|
||||||
// Create DateTime objects from the strings
|
// Create DateTime objects from the strings
|
||||||
|
try {
|
||||||
$today = new \DateTime($this->today);
|
$today = new \DateTime($this->today);
|
||||||
$created = new \DateTime($this->verse->created);
|
$created = new \DateTime($this->verse->created);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate the difference
|
// Calculate the difference
|
||||||
$interval = $today->diff($created);
|
$interval = $today->diff($created);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user