Stable release of v2.0.26

Adds few try catch blocks in the API. Adds local link to daily scripture module.
This commit is contained in:
Robot 2023-11-10 12:52:56 +02:00
parent 62293b5a01
commit d175324c86
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
10 changed files with 138 additions and 37 deletions

View File

@ -1,3 +1,8 @@
# v2.0.26
- Adds few try catch blocks in the API.
- Adds local link to daily scripture module.
# v2.0.25
- Adds getBible Loader Plugin

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.25)
# Get Bible (2.0.26)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
@ -19,20 +19,20 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 10th November, 2023
+ *Version*: 2.0.25
+ *Version*: 2.0.26
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**560 Hours** or **70 Eight Hour Days** (actual time the author saved -
**561 Hours** or **70 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **200727**
+ *File count*: **1737**
+ *Line count*: **200982**
+ *File count*: **1738**
+ *Folder count*: **167**
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent)
@ -43,7 +43,7 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> **mapping @56hours** = codingtime / 10;
> **office @93hours** = codingtime / 6;)
**930 Hours** or **116 Eight Hour Days**
**931 Hours** or **116 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -1,4 +1,4 @@
# Get Bible (2.0.25)
# Get Bible (2.0.26)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible")
@ -19,20 +19,20 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 10th November, 2023
+ *Version*: 2.0.25
+ *Version*: 2.0.26
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**560 Hours** or **70 Eight Hour Days** (actual time the author saved -
**561 Hours** or **70 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **200727**
+ *File count*: **1737**
+ *Line count*: **200982**
+ *File count*: **1738**
+ *Folder count*: **167**
**370 Hours** or **46 Eight Hour Days** (the actual time the author spent)
@ -43,7 +43,7 @@ due to [Automated Component Builder](https://www.joomlacomponentbuilder.com))
> **mapping @56hours** = codingtime / 10;
> **office @93hours** = codingtime / 6;)
**930 Hours** or **116 Eight Hour Days**
**931 Hours** or **116 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -0,0 +1 @@

View File

@ -7,9 +7,9 @@
<authorUrl>https://getbible.net</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.0.25</version>
<version>2.0.26</version>
<description><![CDATA[
<h1>Get Bible (v.2.0.25)</h1>
<h1>Get Bible (v.2.0.26)</h1>
<div style="clear: both;"></div>
<p>Welcome to the next level of scripture engagement - The Bible for Joomla! Our purpose is to bring the Word of God to every person, in their native language, entirely free. This isn't just a typical extension; it's a groundbreaking tool developed to span language divides and deliver a rich, customizable Bible study experience to users worldwide.

View File

@ -104,8 +104,15 @@ final class Book extends Watcher
return true;
}
// get API hash value
$hash = $this->books->sha($translation, $book);
try
{
// get API hash value
$hash = $this->books->sha($translation, $book);
}
catch (\Exception $e)
{
return false;
}
// confirm hash has not changed
if (hash_equals($hash, $this->target->sha))
@ -139,8 +146,15 @@ final class Book extends Watcher
return true;
}
// get all this translation books
$books = $this->books->list($translation);
try
{
// get all this translation books
$books = $this->books->list($translation);
}
catch (\Exception $e)
{
return false;
}
// check return data
if (!isset($books->{$book}) || !isset($books->{$book}->sha))
@ -169,8 +183,15 @@ final class Book extends Watcher
*/
private function update(string $translation): bool
{
// get translations from the API
if (($books = $this->books->list($translation)) === null)
try
{
// get translations from the API
if (($books = $this->books->list($translation)) === null)
{
return false;
}
}
catch (\Exception $e)
{
return false;
}

View File

@ -92,8 +92,15 @@ final class Chapter extends Watcher
return true;
}
// get API hash value
$hash = $this->chapters->sha($translation, $book, $chapter);
try
{
// get API hash value
$hash = $this->chapters->sha($translation, $book, $chapter);
}
catch (\Exception $e)
{
return false;
}
// confirm hash has not changed
if (hash_equals($hash, $this->target->sha))
@ -193,8 +200,15 @@ final class Chapter extends Watcher
return true;
}
// get all the books
$chapters = $this->chapters->list($translation, $book);
try
{
// get all the books
$chapters = $this->chapters->list($translation, $book);
}
catch (\Exception $e)
{
return false;
}
// check return data
if (!isset($chapters->{$chapter}) || !isset($chapters->{$chapter}->sha))
@ -232,8 +246,15 @@ final class Chapter extends Watcher
// load all the verses from the local database
$inserted = false;
// get verses from the API
if (($api = $this->chapters->list($translation, $book)) === null)
try
{
// get verses from the API
if (($api = $this->chapters->list($translation, $book)) === null)
{
return false;
}
}
catch (\Exception $e)
{
return false;
}
@ -312,8 +333,15 @@ final class Chapter extends Watcher
return true;
}
// get all the verses
if (($verses = $this->verses->get($translation, $book, $chapter)) === null)
try
{
// get all the verses
if (($verses = $this->verses->get($translation, $book, $chapter)) === null)
{
return false;
}
}
catch (\Exception $e)
{
return false;
}
@ -345,8 +373,15 @@ final class Chapter extends Watcher
// load all the verses from the local database
$inserted = false;
// get verses from the API
if (($api = $this->verses->get($translation, $book, $chapter)) === null)
try
{
// get verses from the API
if (($api = $this->verses->get($translation, $book, $chapter)) === null)
{
return false;
}
}
catch (\Exception $e)
{
return false;
}

View File

@ -88,8 +88,15 @@ final class Translation extends Watcher
return true;
}
// get API hash value
$hash = $this->translations->sha($translation);
try
{
// get API hash value
$hash = $this->translations->sha($translation);
}
catch (\Exception $e)
{
return false;
}
// confirm hash has not changed
if (hash_equals($hash, $this->target->sha))
@ -122,8 +129,15 @@ final class Translation extends Watcher
return true;
}
// get all the translations
$translations = $this->translations->list();
try
{
// get all the translations
$translations = $this->translations->list();
}
catch (\Exception $e)
{
return false;
}
// check return data
if (!isset($translations->{$translation}) || !isset($translations->{$translation}->sha))
@ -150,8 +164,15 @@ final class Translation extends Watcher
*/
private function update(): bool
{
// get translations from the API
if (($translations = $this->translations->list()) === null)
try
{
// get translations from the API
if (($translations = $this->translations->list()) === null)
{
return false;
}
}
catch (\Exception $e)
{
return false;
}

View File

@ -1539,7 +1539,7 @@ class com_getbibleInstallerScript
echo '<a target="_blank" href="https://getbible.net" title="Get Bible">
<img src="components/com_getbible/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.0.25 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.0.26 Was Successful! Let us know if anything is not working as expected.</h3>';
// Set db if not set already.
if (!isset($db))

View File

@ -413,4 +413,22 @@
<maintainerurl>https://getbible.net</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Get Bible</name>
<description>The Bible for Joomla</description>
<element>pkg_getbible</element>
<type>package</type>
<client>site</client>
<version>2.0.26</version>
<infourl title="Get Bible!">https://getbible.net</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v2.0.26.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://getbible.net</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates>