From 0a434aa6f090f24d5147a9b261dd94690c49d7c9 Mon Sep 17 00:00:00 2001 From: aB0t Date: Mon, 21 Aug 2023 18:31:01 +0200 Subject: [PATCH] Stable release of v2.0.22 Fixed search redirect bug. --- CHANGELOG.md | 6 +++++- README.md | 8 ++++---- admin/README.txt | 8 ++++---- admin/sql/updates/mysql/2.0.21.sql | 1 + getbible.xml | 4 ++-- script.php | 2 +- site/assets/js/search.js | 10 ---------- site/controller.php | 1 + site/models/ajax.php | 4 ++-- site/views/app/view.html.php | 2 +- .../tmpl/default_getbiblesearchinput.php | 3 --- site/views/search/view.html.php | 13 +++++++------ site/views/tag/view.html.php | 4 ++-- update_server.xml | 18 ++++++++++++++++++ 14 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 admin/sql/updates/mysql/2.0.21.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 68de6a2..e7128cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,4 +108,8 @@ - Adds Tags meta data to tag pages - Adds option to share a tag -- Improve the URL creation, and return URL feature for search and tag pages \ No newline at end of file +- Improve the URL creation, and return URL feature for search and tag pages + +# v2.0.22 + +- Fixed search redirect bug \ No newline at end of file diff --git a/README.md b/README.md index 9cfe253..8759112 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Get Bible (2.0.21) +# Get Bible (2.0.22) ![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible") @@ -19,7 +19,7 @@ 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*: 21st August, 2023 -+ *Version*: 2.0.21 ++ *Version*: 2.0.22 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -31,8 +31,8 @@ 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*: **199323** -+ *File count*: **1721** ++ *Line count*: **199334** ++ *File count*: **1722** + *Folder count*: **163** **367 Hours** or **45 Eight Hour Days** (the actual time the author spent) diff --git a/admin/README.txt b/admin/README.txt index 9cfe253..8759112 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,4 +1,4 @@ -# Get Bible (2.0.21) +# Get Bible (2.0.22) ![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/master/admin/assets/images/vdm-component.jpg "GetBible") @@ -19,7 +19,7 @@ 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*: 21st August, 2023 -+ *Version*: 2.0.21 ++ *Version*: 2.0.22 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html @@ -31,8 +31,8 @@ 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*: **199323** -+ *File count*: **1721** ++ *Line count*: **199334** ++ *File count*: **1722** + *Folder count*: **163** **367 Hours** or **45 Eight Hour Days** (the actual time the author spent) diff --git a/admin/sql/updates/mysql/2.0.21.sql b/admin/sql/updates/mysql/2.0.21.sql new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/admin/sql/updates/mysql/2.0.21.sql @@ -0,0 +1 @@ + diff --git a/getbible.xml b/getbible.xml index 56045fc..813b15e 100644 --- a/getbible.xml +++ b/getbible.xml @@ -7,9 +7,9 @@ https://getbible.net Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.0.21 + 2.0.22 Get Bible (v.2.0.21) +

Get Bible (v.2.0.22)

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. diff --git a/script.php b/script.php index 4712997..598cc4d 100644 --- a/script.php +++ b/script.php @@ -1539,7 +1539,7 @@ class com_getbibleInstallerScript echo ' -

Upgrade to Version 2.0.21 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.0.22 Was Successful! Let us know if anything is not working as expected.

'; // Set db if not set already. if (!isset($db)) diff --git a/site/assets/js/search.js b/site/assets/js/search.js index 8c0a7b0..c51fcfb 100644 --- a/site/assets/js/search.js +++ b/site/assets/js/search.js @@ -39,16 +39,6 @@ const handleSearch = async () => { } }; -/** - * JS Function to update the URL of the browser with the search query - */ -const updateUrlQuery = async () => { - if (!urlCurrent.includes(urlSearch)) { - // update the url query - // window.history.pushState({}, '', urlSearch); - } -}; - /** * JS Function to redirect to new search */ diff --git a/site/controller.php b/site/controller.php index 20ffa35..070ab90 100644 --- a/site/controller.php +++ b/site/controller.php @@ -60,6 +60,7 @@ class GetbibleController extends BaseController 'tag' => 'STRING', 'linker' => 'STRING', 'return' => 'BASE64', + 'bibleurl' => 'BASE64', 'layout' => 'STRING', 'format' => 'STRING', 'Itemid' => 'INT' diff --git a/site/models/ajax.php b/site/models/ajax.php index 912bf39..7975e67 100644 --- a/site/models/ajax.php +++ b/site/models/ajax.php @@ -446,7 +446,7 @@ class GetbibleModelAjax extends ListModel $return = ''; if ($book > 0 && $chapter > 0) { - $return = '&return=' . urlencode(base64_encode((string) JRoute::_('index.php?option=com_getbible&view=app&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&book=' . $book . '&chapter=' . $chapter))); + $return = '&bibleurl=' . urlencode(base64_encode(trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=app&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&book=' . $book . '&chapter=' . $chapter))); } return ['url' => trim(trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=search&Itemid=' . $this->app_params->get('app_menu', 0) . $return . '&t=' . $translation . '&words=' . $words . '&match=' . $match . '&case=' . $case . '&target=' . $target . '&search=' . $search ?? ''))]; @@ -486,7 +486,7 @@ class GetbibleModelAjax extends ListModel $return = urlencode(base64_encode((string) JRoute::_('index.php?option=com_getbible&view=app&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&book=' . $book . '&chapter=' . $chapter))); // we return the AI url - return ['url' => trim(trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=openai&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&return=' . $return . '&guid=' . $guid . '&book=' . $book . '&chapter=' . $chapter . '&verse=' . $verse . '&words=' . $words))]; + return ['url' => trim(trim(JUri::base(), '/') . JRoute::_('index.php?option=com_getbible&view=openai&t=' . $translation . '&Itemid=' . $this->app_params->get('app_menu', 0) . '&bibleurl=' . $return . '&guid=' . $guid . '&book=' . $book . '&chapter=' . $chapter . '&verse=' . $verse . '&words=' . $words))]; } return ['error' => 'There was an error please try again.']; diff --git a/site/views/app/view.html.php b/site/views/app/view.html.php index b231215..6f4cb16 100644 --- a/site/views/app/view.html.php +++ b/site/views/app/view.html.php @@ -203,7 +203,7 @@ class GetbibleViewApp extends HtmlView { $this->setReturnUrl(); } - return '&return=' . $this->url_return; + return '&bibleurl=' . $this->url_return; } /** diff --git a/site/views/search/tmpl/default_getbiblesearchinput.php b/site/views/search/tmpl/default_getbiblesearchinput.php index 6754e76..4db8787 100644 --- a/site/views/search/tmpl/default_getbiblesearchinput.php +++ b/site/views/search/tmpl/default_getbiblesearchinput.php @@ -24,7 +24,6 @@ defined('_JEXEC') or die('Restricted access'); loadTemplate('getbiblesearchoptions'); ?>