diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5c16c9..a58f3d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,8 @@
-# v4.0.14
+# v4.0.15-alpha1
+
+- Fix install issue with missing method removeFolder
+
+# v4.0.15-alpha
- Refactored the API classes
- Add table schema checker
@@ -63,7 +67,6 @@
- Moved to Joomla 4
-# v3.1.2
+# v3.1.1
-- Refactored the API classes
-- Add table schema checker
\ No newline at end of file
+- Add back to Bible button to Open AI page.
\ No newline at end of file
diff --git a/GetbibleInstallerScript.php b/GetbibleInstallerScript.php
index 2471caf..b42b6e6 100644
--- a/GetbibleInstallerScript.php
+++ b/GetbibleInstallerScript.php
@@ -314,6 +314,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
$removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianChurch.Joomla.GetBible';
$removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianChurch.Joomla.Gitea';
$removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianChurch.Joomla.Openai';
+ $removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianBible.Joomla/src/GetBible';
foreach ($removeFolders as $folder)
{
@@ -325,19 +326,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
if ($type === 'install')
{
- // all things to clear out
- $removeFolders = [];
- $removeFolders[] = JPATH_LIBRARIES . '/jcb_powers/VDM.Joomla.GetBible';
- $removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianChurch.Joomla';
- $removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianChurch.Joomla.GetBible';
- $removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianChurch.Joomla.Gitea';
- $removeFolders[] = JPATH_LIBRARIES . '/vendor_getbible/TrueChristianChurch.Joomla.Openai';
-
- foreach ($removeFolders as $folder)
- {
- $this->removeFolder($folder);
- }
-
// Check that the required configuration are set for PHP
$this->phpConfigurationCheck($this->app);
}
@@ -802,7 +790,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
echo '
-
Upgrade to Version 4.0.14 Was Successful! Let us know if anything is not working as expected.
';
+ Upgrade to Version 4.0.15-alpha1 Was Successful! Let us know if anything is not working as expected.
';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();
@@ -1009,6 +997,80 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
return true;
}
+ /**
+ * Remove folders with files (with ignore options)
+ *
+ * @param string $dir The path to the folder to remove.
+ * @param array|null $ignore The folders and files to ignore and not remove.
+ *
+ * @return bool True if all specified files/folders are removed, false otherwise.
+ * @since 3.2.2
+ */
+ protected function removeFolder(string $dir, ?array $ignore = null): bool
+ {
+ if (!Folder::exists($dir))
+ {
+ return false;
+ }
+
+ $it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
+ $it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
+
+ // Remove trailing slash
+ $dir = rtrim($dir, '/');
+
+ foreach ($it as $file)
+ {
+ $filePath = $file->getPathname();
+ $relativePath = str_replace($dir . '/', '', $filePath);
+
+ if ($ignore !== null && in_array($relativePath, $ignore, true))
+ {
+ continue;
+ }
+
+ if ($file->isDir())
+ {
+ Folder::delete($filePath);
+ }
+ else
+ {
+ File::delete($filePath);
+ }
+ }
+
+ // Delete the root folder if there are no ignored files/folders left
+ if ($ignore === null || $this->isDirEmpty($dir, $ignore))
+ {
+ return Folder::delete($dir);
+ }
+
+ return true;
+ }
+
+ /**
+ * Check if a directory is empty considering ignored files/folders.
+ *
+ * @param string $dir The path to the folder to check.
+ * @param array $ignore The folders and files to ignore.
+ *
+ * @return bool True if the directory is empty or contains only ignored items, false otherwise.
+ * @since 3.2.1
+ */
+ protected function isDirEmpty(string $dir, array $ignore): bool
+ {
+ $it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
+ foreach ($it as $file)
+ {
+ $relativePath = str_replace($dir . '/', '', $file->getPathname());
+ if (!in_array($relativePath, $ignore, true))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
/**
* Remove the files and folders in the given array from
*
diff --git a/README.md b/README.md
index e6725b4..cdbc3f8 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Get Bible (4.0.14)
+# Get Bible (4.0.15-alpha1)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/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*: 15th July, 2024
-+ *Version*: 4.0.14
++ *Version*: 4.0.15-alpha1
+ *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*: **227831**
-+ *File count*: **1872**
++ *Line count*: **227915**
++ *File count*: **1873**
+ *Folder count*: **178**
**419 Hours** or **52 Eight Hour Days** (the actual time the author spent)
diff --git a/admin/README.txt b/admin/README.txt
index e6725b4..cdbc3f8 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -1,4 +1,4 @@
-# Get Bible (4.0.14)
+# Get Bible (4.0.15-alpha1)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/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*: 15th July, 2024
-+ *Version*: 4.0.14
++ *Version*: 4.0.15-alpha1
+ *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*: **227831**
-+ *File count*: **1872**
++ *Line count*: **227915**
++ *File count*: **1873**
+ *Folder count*: **178**
**419 Hours** or **52 Eight Hour Days** (the actual time the author spent)
diff --git a/admin/sql/updates/mysql/3.1.2.sql b/admin/sql/updates/mysql/3.1.1.sql
similarity index 100%
rename from admin/sql/updates/mysql/3.1.2.sql
rename to admin/sql/updates/mysql/3.1.1.sql
diff --git a/admin/sql/updates/mysql/4.0.15-alpha.sql b/admin/sql/updates/mysql/4.0.15-alpha.sql
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/admin/sql/updates/mysql/4.0.15-alpha.sql
@@ -0,0 +1 @@
+
diff --git a/getbible.xml b/getbible.xml
index dce7730..c936bcd 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
- 4.0.14
+ 4.0.15-alpha1
Get Bible (v.4.0.14)
+ Get Bible (v.4.0.15-alpha1)
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/update_server.xml b/update_server.xml
index 63330c4..3a77ddc 100644
--- a/update_server.xml
+++ b/update_server.xml
@@ -5,10 +5,10 @@
pkg_getbible
package
site
- 3.1.2
+ 3.1.1
https://getbible.net
- https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v3.1.2.zip
+ https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v3.1.1.zip
stable
@@ -275,13 +275,31 @@
pkg_getbible
package
site
- 4.0.14
+ 4.0.15-alpha
https://getbible.net
- https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v4.0.14.zip
+ https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v4.0.15-alpha1.zip
- stable
+ alpha
+
+ Llewellyn van der Merwe
+ https://getbible.net
+
+
+
+ Get Bible
+ The Bible for Joomla
+ pkg_getbible
+ package
+ site
+ 4.0.15-alpha1
+ https://getbible.net
+
+ https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v4.0.15-alpha1.zip
+
+
+ alpha
Llewellyn van der Merwe
https://getbible.net