Release of v4.0.15-alpha4

Improve the PHP environment setup validation. Add option to pass shared session via tag share.
This commit is contained in:
Robot 2024-07-29 18:16:23 +02:00
parent 5a7db599bb
commit f0e145b2df
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
78 changed files with 3577 additions and 386 deletions

View File

@ -1,13 +1,15 @@
# v4.0.15-alpha3
# v4.0.15-alpha4
- Fix update error of undefined folder method (exists)
- Improve the PHP environment setup validation
- Add option to pass shared session via tag share
# v4.0.15-alpha
- Refactored the API classes
- Add table schema checker
- Fix install issue with missing method removeFolder
- Fix display error with correct component namespace update form JCB
- Fix display error with correct component namespace update form JCB
- Fix update error of undefined folder method (exists)
# v4.0.13

View File

@ -0,0 +1,64 @@
<?php
/*----------------------------------------------------------------------------------| io.vdm.dev |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@package getBible.net
@created 3rd December, 2015
@author Llewellyn van der Merwe <https://getbible.net>
@git Get Bible <https://git.vdm.dev/getBible>
@github Get Bible <https://github.com/getBible>
@support Get Bible <https://git.vdm.dev/getBible/support>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die;
// register additional namespace
spl_autoload_register(function ($class) {
// project-specific base directories and namespace prefix
$search = [
'libraries/vendor_getbible/TrueChristianBible.Joomla.Openai' => 'TrueChristianBible\\Joomla\\Openai',
'libraries/vendor_getbible/TrueChristianBible.Joomla.Gitea' => 'TrueChristianBible\\Joomla\\Gitea',
'libraries/vendor_getbible/TrueChristianBible.Joomla' => 'TrueChristianBible\\Joomla'
];
// Start the search and load if found
$found = false;
$found_base_dir = "";
$found_len = 0;
foreach ($search as $base_dir => $prefix)
{
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) === 0)
{
// we have a match so load the values
$found = true;
$found_base_dir = $base_dir;
$found_len = $len;
// done here
break;
}
}
// check if we found a match
if (!$found)
{
// not found so move to the next registered autoloader
return;
}
// get the relative class name
$relative_class = substr($class, $found_len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = __DIR__ . '/' . $found_base_dir . '/src' . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file))
{
require $file;
}
});

View File

@ -20,12 +20,12 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Installer\InstallerScriptInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Version;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\Filesystem\Folder;
use Joomla\Database\DatabaseInterface;
use TrueChristianBible\Joomla\GetBible\PHPConfigurationChecker;
use TrueChristianBible\Joomla\GetBible\Table\SchemaChecker;
// No direct access to this file
@ -41,7 +41,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* The CMS Application.
*
* @var CMSApplication
* @since 4.4.2
*/
protected $app;
@ -56,7 +55,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* The version number of the extension.
*
* @var string
* @var string
* @since 3.6
*/
protected $release;
@ -64,7 +63,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* The table the parameters are stored in.
*
* @var string
* @var string
* @since 3.6
*/
protected $paramTable;
@ -72,7 +71,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* The extension name. This should be set in the installer script.
*
* @var string
* @var string
* @since 3.6
*/
protected $extension;
@ -80,7 +79,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* A list of files to be deleted
*
* @var array
* @var array
* @since 3.6
*/
protected $deleteFiles = [];
@ -88,7 +87,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* A list of folders to be deleted
*
* @var array
* @var array
* @since 3.6
*/
protected $deleteFolders = [];
@ -96,7 +95,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* A list of CLI script files to be copied to the cli directory
*
* @var array
* @var array
* @since 3.6
*/
protected $cliScriptFiles = [];
@ -104,7 +103,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* Minimum PHP version required to install the extension
*
* @var string
* @var string
* @since 3.6
*/
protected $minimumPhp;
@ -112,7 +111,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
/**
* Minimum Joomla! version required to install the extension
*
* @var string
* @var string
* @since 3.6
*/
protected $minimumJoomla;
@ -166,7 +165,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method
*
* @return boolean True on success
*
* @since 4.2.0
*/
public function install(InstallerAdapter $adapter): bool {return true;}
@ -188,7 +186,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method
*
* @return boolean True on success
*
* @since 4.2.0
*/
public function uninstall(InstallerAdapter $adapter): bool
@ -275,7 +272,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method
*
* @return boolean True on success
*
* @since 4.2.0
*/
public function preflight(string $type, InstallerAdapter $adapter): bool
@ -304,8 +300,11 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
if ($type === 'update')
{
// Check that the required configuration are set for PHP
$this->phpConfigurationCheck($this->app);
// Check that the PHP configurations are sufficient
if ($this->classExists(PHPConfigurationChecker::class))
{
(new PHPConfigurationChecker())->run();
}
// all things to clear out
$removeFolders = [];
@ -326,8 +325,11 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
if ($type === 'install')
{
// Check that the required configuration are set for PHP
$this->phpConfigurationCheck($this->app);
// Check that the PHP configurations are sufficient
if ($this->classExists(PHPConfigurationChecker::class))
{
(new PHPConfigurationChecker())->run();
}
}
return true;
@ -340,7 +342,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param InstallerAdapter $adapter The adapter calling this method
*
* @return boolean True on success
*
* @since 4.2.0
*/
public function postflight(string $type, InstallerAdapter $adapter): bool
@ -790,7 +791,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><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 4.0.15-alpha3 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 4.0.15-alpha4 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();
@ -1004,7 +1005,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @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
* @since 3.2.2
*/
protected function removeFolder(string $dir, ?array $ignore = null): bool
{
@ -1055,7 +1056,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @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
* @since 3.2.1
*/
protected function isDirEmpty(string $dir, array $ignore): bool
{
@ -1075,7 +1076,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Remove the files and folders in the given array from
*
* @return void
*
* @since 3.6
*/
protected function removeFiles()
@ -1107,7 +1107,6 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Moves the CLI scripts into the CLI folder in the CMS
*
* @return void
*
* @since 3.6
*/
protected function moveCliFiles()
@ -1138,7 +1137,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $contentHistoryOptions
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function setContentType(
string $typeTitle,
@ -1200,7 +1199,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $textPrefix
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function setActionLogConfig(
string $typeTitle,
@ -1253,7 +1252,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Set action logs extensions integration
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function setActionLogsExtensions(): void
{
@ -1294,7 +1293,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $rules The component rules
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function setAssetsRules(string $rules): void
{
@ -1332,7 +1331,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $params The component rules
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function setExtensionsParams(string $params): void
{
@ -1375,7 +1374,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $dataType This datatype we will change the rules column to if it to small.
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function setDatabaseAssetsRulesFix(int $accessWorseCase, string $dataType): void
{
@ -1410,7 +1409,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param bool $fields The switch to also remove related field data
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeViewData(string $context, bool $fields = false): void
{
@ -1433,7 +1432,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $context The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeContentTypes(string $context): void
{
@ -1490,7 +1489,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $context The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeFields(string $context): void
{
@ -1552,7 +1551,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param array $ids The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeFieldsValues(string $context, array $ids): void
{
@ -1583,7 +1582,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $context The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeFieldsGroups(string $context): void
{
@ -1638,7 +1637,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $context The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeViewHistory(string $context): void
{
@ -1670,7 +1669,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param array $ids The type ids
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeUcmBase(array $ids): void
{
@ -1703,7 +1702,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $context The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeUcmContent(string $context): void
{
@ -1735,7 +1734,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $context The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeContentItemTagMap(string $context): void
{
@ -1770,7 +1769,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $context The view context
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeActionLogConfig(string $context): void
{
@ -1800,7 +1799,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Remove Asset Table Integrated
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeAssetData(): void
{
@ -1828,7 +1827,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Remove action logs extensions integrated
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeActionLogsExtensions(): void
{
@ -1858,7 +1857,7 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* Remove remove database fix (if possible)
*
* @return void
* @since 4.4.2
* @since 4.4.2
*/
protected function removeDatabaseAssetsRulesFix(): void
{
@ -1896,134 +1895,35 @@ class Com_GetbibleInstallerScript implements InstallerScriptInterface
* @param string $className The fully qualified name of the class to check.
*
* @return bool True if the class exists or was successfully loaded, false otherwise.
* @since 4.0.1
* @since 4.0.1
*/
protected function classExists(string $className): bool
{
if (!class_exists($className, true))
if (class_exists($className, true))
{
// The power autoloader for this project (JPATH_ADMINISTRATOR) area.
$power_autoloader = JPATH_ADMINISTRATOR . '/components/com_getbible/src/Helper/PowerloaderHelper.php';
if (file_exists($power_autoloader))
{
require_once $power_autoloader;
}
return true;
}
// Check again if the class now exists after requiring the autoloader
if (!class_exists($className, true))
// Autoloaders to check
$autoloaders = [
__DIR__ . '/GetbibleInstallerPowerloader.php',
JPATH_ADMINISTRATOR . '/components/com_getbible/src/Helper/PowerloaderHelper.php'
];
foreach ($autoloaders as $autoloader)
{
if (file_exists($autoloader))
{
return false;
require_once $autoloader;
if (class_exists($className, true))
{
return true;
}
}
}
return true;
}
/**
* Define the required limits with specific messages for success and warning scenarios
*
* @var array
* @since 3.0.8
*/
protected array $requiredPHPConfigs = [
'upload_max_filesize' => [
'value' => '64M',
'success' => 'The upload_max_filesize is appropriately set to handle large files, which is essential for uploading substantial components and media.',
'warning' => 'The current upload_max_filesize may not support large file uploads effectively, potentially causing failures during component installation.'
],
'post_max_size' => [
'value' => '128M',
'success' => 'The post_max_size setting is sufficient to manage large data submissions, ensuring smooth data processing within forms and uploads.',
'warning' => 'An insufficient post_max_size can lead to truncated data submissions, affecting form functionality and data integrity.'
],
'max_execution_time' => [
'value' => 60,
'success' => 'Max execution time is set high enough to execute complex operations without premature termination, which is crucial for lengthy operations.',
'warning' => 'A low max execution time could lead to script timeouts, especially during intensive operations, which might interrupt execution and cause failures during the compiling of a large extension.'
],
'max_input_vars' => [
'value' => 5000,
'success' => 'The max_input_vars setting supports a high number of input variables, facilitating complex forms and detailed component configurations.',
'warning' => 'Too few max_input_vars may result in lost data during processing complex forms, which can lead to incomplete configurations and operational issues.'
],
'max_input_time' => [
'value' => 60,
'success' => 'Max input time is adequate for processing inputs efficiently during high-load operations, ensuring no premature timeouts.',
'warning' => 'An insufficient max input time could result in incomplete data processing during input-heavy operations, potentially leading to errors and data loss.'
],
'memory_limit' => [
'value' => '256M',
'success' => 'The memory limit is set high to accommodate extensive operations and data processing, which enhances overall performance and stability.',
'warning' => 'A low memory limit can lead to frequent crashes and performance issues, particularly when processing large amounts of data or complex calculations.'
]
];
/**
* Helper function to convert PHP INI memory values to bytes
*
* @param string $value The value to convert
*
* @return int The bytes value
* @since 3.0.8
*/
protected function convertToBytes(string $value): int
{
$value = trim($value);
$lastChar = strtolower($value[strlen($value) - 1]);
$numValue = substr($value, 0, -1);
switch ($lastChar)
{
case 'g':
return $numValue * 1024 * 1024 * 1024;
case 'm':
return $numValue * 1024 * 1024;
case 'k':
return $numValue * 1024;
default:
return (int) $value;
}
}
/**
* Check that the required configurations are set for PHP
*
* @param $app The application
*
* @return void
* @since 3.0.8
*/
protected function phpConfigurationCheck($app): void
{
$showHelp = false;
// Check each configuration and provide detailed feedback
foreach ($this->requiredPHPConfigs as $configName => $configDetails)
{
$currentValue = ini_get($configName);
if ($currentValue === false)
{
$app->enqueueMessage("Error: Unable to retrieve current setting for '{$configName}'.", 'error');
continue;
}
$isMemoryValue = strpbrk($configDetails['value'], 'KMG') !== false;
$requiredValueBytes = $isMemoryValue ? $this->convertToBytes($configDetails['value']) : (int) $configDetails['value'];
$currentValueBytes = $isMemoryValue ? $this->convertToBytes($currentValue) : (int) $currentValue;
$conditionMet = $currentValueBytes >= $requiredValueBytes;
$messageType = $conditionMet ? 'message' : 'warning';
$messageText = $conditionMet ?
"Success: {$configName} is set to {$currentValue}. " . $configDetails['success'] :
"Warning: {$configName} configuration should be at least {$configDetails['value']} but is currently {$currentValue}. " . $configDetails['warning'];
$showHelp = ($showHelp || $messageType === 'warning') ? true : false;
$app->enqueueMessage($messageText, $messageType);
}
if ($showHelp)
{
$app->enqueueMessage('To optimize your Get Bible environment, specific PHP settings must be enhanced.<br>These settings are crucial for ensuring the successful installation and stable functionality of the extension.<br>We\'ve identified that certain configurations currently do not meet the recommended standards.<br>To adjust these settings and prevent potential issues, please consult our detailed guide available at <a href="https://git.vdm.dev/getBible/support/wiki/PHP-Settings" target="_blank">Get Bible PHP Settings Wiki</a>.
', 'notice');
}
return false;
}
/**

View File

@ -1,4 +1,4 @@
# Get Bible (4.0.15-alpha3)
# Get Bible (4.0.15-alpha4)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 15th July, 2024
+ *Version*: 4.0.15-alpha3
+ *Last Build*: 29th July, 2024
+ *Version*: 4.0.15-alpha4
+ *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
**636 Hours** or **80 Eight Hour Days** (actual time the author saved -
**664 Hours** or **83 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*: **227917**
+ *File count*: **1873**
+ *Folder count*: **178**
+ *Line count*: **237927**
+ *File count*: **1921**
+ *Folder count*: **180**
**419 Hours** or **52 Eight Hour Days** (the actual time the author spent)
**438 Hours** or **55 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @159hours** = codingtime / 4;
> **planning @91hours** = codingtime / 7;
> **mapping @64hours** = codingtime / 10;
> **office @106hours** = codingtime / 6;)
> **debugging @166hours** = codingtime / 4;
> **planning @95hours** = codingtime / 7;
> **mapping @66hours** = codingtime / 10;
> **office @111hours** = codingtime / 6;)
**1055 Hours** or **132 Eight Hour Days**
**1102 Hours** or **138 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**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **26.4 weeks** or **5.5 months**
Project duration: **27.6 weeks** or **5.8 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -1,4 +1,4 @@
# Get Bible (4.0.15-alpha3)
# Get Bible (4.0.15-alpha4)
![Get Bible image](https://git.vdm.dev/getBible/joomla-component/raw/branch/5.0/admin/assets/images/vdm-component.jpg "GetBible")
@ -18,38 +18,38 @@ In essence, The Bible for Joomla is designed to transform how the Word of God is
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Get Bible](https://getbible.net)
+ *First Build*: 3rd December, 2015
+ *Last Build*: 15th July, 2024
+ *Version*: 4.0.15-alpha3
+ *Last Build*: 29th July, 2024
+ *Version*: 4.0.15-alpha4
+ *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
**636 Hours** or **80 Eight Hour Days** (actual time the author saved -
**664 Hours** or **83 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*: **227917**
+ *File count*: **1873**
+ *Folder count*: **178**
+ *Line count*: **237927**
+ *File count*: **1921**
+ *Folder count*: **180**
**419 Hours** or **52 Eight Hour Days** (the actual time the author spent)
**438 Hours** or **55 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @159hours** = codingtime / 4;
> **planning @91hours** = codingtime / 7;
> **mapping @64hours** = codingtime / 10;
> **office @106hours** = codingtime / 6;)
> **debugging @166hours** = codingtime / 4;
> **planning @95hours** = codingtime / 7;
> **mapping @66hours** = codingtime / 10;
> **office @111hours** = codingtime / 6;)
**1055 Hours** or **132 Eight Hour Days**
**1102 Hours** or **138 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**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **26.4 weeks** or **5.5 months**
Project duration: **27.6 weeks** or **5.8 months**
> This **component** was build with a Joomla [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -335,7 +335,7 @@ class BookController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class ChapterController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class LinkerController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class NoteController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class Open_ai_messageController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class Open_ai_responseController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class PasswordController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class PromptController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class TagController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class Tagged_verseController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class TranslationController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -335,7 +335,7 @@ class VerseController extends FormController
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data.
*
* @return void

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Book view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Books view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Chapter view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Chapters view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Linker view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Linkers view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Note view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Notes view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Open_ai_message view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Open_ai_messages view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Open_ai_response view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Open_ai_responses view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Password view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Passwords view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Prompt view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Prompts view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Tag view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Tagged_verse view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Tagged_verses view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Tags view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Translation view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Translations view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -42,6 +43,86 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The item from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $item;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The form from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $form;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The origin referral view name
*
* @var string
* @since 3.10.11
*/
public string $ref;
/**
* The origin referral item id
*
* @var int
* @since 3.10.11
*/
public int $refid;
/**
* The referral url suffix values
*
* @var string
* @since 3.10.11
*/
public string $referral;
/**
* Verse view display method
*
@ -56,7 +137,7 @@ class HtmlView extends BaseHtmlView
$this->params = ComponentHelper::getParams('com_getbible');
$this->useCoreUI = true;
// Assign the variables
$this->form = $this->get('Form');
$this->form ??= $this->get('Form');
$this->item = $this->get('Item');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');

View File

@ -22,6 +22,7 @@ use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\User;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\FileLayout;
@ -43,6 +44,62 @@ use TrueChristianBible\Joomla\Utilities\StringHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The state object
*
* @var mixed
* @since 3.10.11
*/
public mixed $state;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The return here base64 url
*
* @var string
* @since 3.10.11
*/
public string $return_here;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Verses view display method
*
@ -59,7 +116,7 @@ class HtmlView extends BaseHtmlView
$this->state = $this->get('State');
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= $this->getCurrentUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'bookTab', 'permissions', Text::_('COM_GETBIBLE_BOOK_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_BOOK_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'chapterTab', 'permissions', Text::_('COM_GETBIBLE_CHAPTER_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_CHAPTER_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -122,14 +122,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'linkerTab', 'permissions', Text::_('COM_GETBIBLE_LINKER_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_LINKER_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'noteTab', 'permissions', Text::_('COM_GETBIBLE_NOTE_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_NOTE_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -91,14 +91,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'open_ai_messageTab', 'permissions', Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_OPEN_AI_MESSAGE_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -120,14 +120,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'open_ai_responseTab', 'permissions', Text::_('COM_GETBIBLE_OPEN_AI_RESPONSE_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_OPEN_AI_RESPONSE_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'passwordTab', 'permissions', Text::_('COM_GETBIBLE_PASSWORD_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_PASSWORD_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -102,14 +102,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'promptTab', 'permissions', Text::_('COM_GETBIBLE_PROMPT_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_PROMPT_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -88,14 +88,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'tagTab', 'permissions', Text::_('COM_GETBIBLE_TAG_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_TAG_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -86,14 +86,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'tagged_verseTab', 'permissions', Text::_('COM_GETBIBLE_TAGGED_VERSE_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_TAGGED_VERSE_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -91,14 +91,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'translationTab', 'permissions', Text::_('COM_GETBIBLE_TRANSLATION_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_TRANSLATION_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -91,14 +91,10 @@ defined('_JEXEC') or die;
<?php echo Html::_('uitab.addTab', 'verseTab', 'permissions', Text::_('COM_GETBIBLE_VERSE_PERMISSION', true)); ?>
<div class="row">
<div class="col-md-12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GETBIBLE_VERSE_PERMISSION'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
</div>

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4.0" method="upgrade">
<name>COM_GETBIBLE</name>
<creationDate>15th July, 2024</creationDate>
<creationDate>29th July, 2024</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<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>4.0.15-alpha3</version>
<version>4.0.15-alpha4</version>
<description><![CDATA[
<h1>Get Bible (v.4.0.15-alpha3)</h1>
<h1>Get Bible (v.4.0.15-alpha4)</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

@ -15,6 +15,7 @@ namespace TrueChristianBible\Joomla\Gitea\Abstraction;
use TrueChristianBible\Joomla\Gitea\Utilities\Http;
use TrueChristianBible\Joomla\Gitea\Utilities\Uri;
use TrueChristianBible\Joomla\Gitea\Utilities\Response;
use TrueChristianBible\Joomla\Interfaces\Git\ApiInterface;
/**
@ -22,7 +23,7 @@ use TrueChristianBible\Joomla\Gitea\Utilities\Response;
*
* @since 3.2.0
*/
abstract class Api
abstract class Api implements ApiInterface
{
/**
* The Http class

View File

@ -12,6 +12,7 @@
namespace TrueChristianBible\Joomla\Gitea\Repository;
use TrueChristianBible\Joomla\Interfaces\Git\Repository\ContentsInterface;
use TrueChristianBible\Joomla\Gitea\Abstraction\Api;
@ -20,7 +21,7 @@ use TrueChristianBible\Joomla\Gitea\Abstraction\Api;
*
* @since 3.2.0
*/
class Contents extends Api
class Contents extends Api implements ContentsInterface
{
/**
* Get a file from a repository.
@ -345,20 +346,20 @@ class Contents extends Api
/**
* Delete a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $message The commit message.
* @param string $branch The branch name (optional).
* @param string $sha The blob SHA of the file.
* @param string $authorName The author name (optional).
* @param string $authorEmail The author email (optional).
* @param string $committerName The committer name (optional).
* @param string $committerEmail The committer email (optional).
* @param string $authorDate The author date (optional).
* @param string $committerDate The committer date (optional).
* @param string $newBranch The new branch name (optional).
* @param bool $signoff Add a Signed-off-by trailer (optional).
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $message The commit message.
* @param string $sha The blob SHA of the file.
* @param string|null $branch The branch name (optional).
* @param string|null $authorName The author name (optional).
* @param string|null $authorEmail The author email (optional).
* @param string|null $committerName The committer name (optional).
* @param string|null $committerEmail The committer email (optional).
* @param string|null $authorDate The author date (optional).
* @param string|null $committerDate The committer date (optional).
* @param string|null $newBranch The new branch name (optional).
* @param bool|null $signoff Add a Signed-off-by trailer (optional).
*
* @return object|null
* @since 3.2.0
@ -449,7 +450,7 @@ class Contents extends Api
// Send the delete request.
return $this->response->get(
$this->http->delete(
$this->uri->get($path),
$this->uri->get($path), [], null,
json_encode($data)
)
);
@ -458,10 +459,10 @@ class Contents extends Api
/**
* Get the EditorConfig definitions of a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $ref The name of the commit/branch/tag.
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string|null $ref The name of the commit/branch/tag.
*
* @return string|null
* @since 3.2.0

View File

@ -13,7 +13,9 @@ namespace TrueChristianBible\Joomla\Gitea\Utilities;
use Joomla\CMS\Http\Http as JoomlaHttp;
use Joomla\Registry\Registry;
use Joomla\CMS\Uri\Uri;
use Joomla\Registry\Registry;
/**

View File

@ -0,0 +1,305 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Abstraction;
use TrueChristianBible\Joomla\Interfaces\Activeregistryinterface;
/**
* Active Storage Registry.
*
* Don't use this beyond 10 dimensional depth for best performance.
*
* @since 3.2.0
*/
abstract class ActiveRegistry implements Activeregistryinterface
{
/**
* The registry array.
*
* @var array
* @since 3.2.0
**/
protected array $active = [];
/**
* Base switch to add values as string or array
*
* @var boolean
* @since 3.2.0
**/
protected bool $addAsArray = false;
/**
* Base switch to keep array values unique
*
* @var boolean
* @since 3.2.2
**/
protected bool $uniqueArray = false;
/**
* Check if the registry has any content.
*
* @return bool Returns true if the active array is not empty, false otherwise.
* @since 3.2.0
*/
public function isActive(): bool
{
return !empty($this->active);
}
/**
* Get all value from the active registry.
*
* @return array The values or empty array.
* @since 3.2.0
*/
public function allActive(): array
{
return $this->active;
}
/**
* Sets a value into the registry using multiple keys.
*
* @param mixed $value The value to set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function setActive($value, string ...$keys): void
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to set any value.");
}
$array = &$this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
if (!is_array($array))
{
$path = '[' . implode('][', $keys) . ']';
throw new \InvalidArgumentException("Attempted to use key '{$key}' on a non-array value: {$array}. Path: {$path} Value: {$value}");
}
$array[$key] = [];
}
$array = &$array[$key];
}
$array = $value;
}
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on the value's type.
*
* @param mixed $value The value to set.
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function addActive($value, ?bool $asArray, string ...$keys): void
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to add any value.");
}
// null fallback to class value
if ($asArray === null)
{
$asArray = $this->addAsArray;
}
$array = &$this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
if (!is_array($array))
{
$path = '[' . implode('][', $keys) . ']';
throw new \InvalidArgumentException("Attempted to use key '{$key}' on a non-array value: {$array}. Path: {$path} Value: {$value}");
}
$array[$key] = [];
}
$array = &$array[$key];
}
// add string
if (!$asArray && $array === [])
{
$array = '';
}
// Handle the adding logic at the tip of the array
if (is_array($array) || $asArray)
{
if (!is_array($array))
{
// Convert to array if it's not already an array
$array = [$array];
}
if ($this->uniqueArray && in_array($value, $array))
{
// we do nothing
return;
}
else
{
$array[] = $value;
}
}
else
{
if (is_string($value) || is_numeric($value))
{
$array .= (string) $value;
}
else
{
$array = $value;
}
}
}
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param mixed $default The default value if not set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function getActive($default, string ...$keys)
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to get any value.");
}
$array = $this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
return $default;
}
$array = $array[$key];
}
return $array;
}
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function removeActive(string ...$keys): void
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to remove any value.");
}
$array = &$this->active;
$lastKey = array_pop($keys);
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
return; // Exit early if the key doesn't exist
}
$array = &$array[$key];
}
unset($array[$lastKey]);
}
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function existsActive(string ...$keys): bool
{
if (!$this->validActiveKeys($keys))
{
throw new \InvalidArgumentException("Keys must only be strings or numbers to check if any value exist.");
}
$array = $this->active;
foreach ($keys as $key)
{
if (!isset($array[$key]))
{
return false;
}
$array = $array[$key];
}
return true;
}
/**
* Checks that the keys are valid
*
* @param array $keys The keys to determine the location.
*
* @return bool False if any of the keys are not a number or string.
* @since 3.2.0
*/
protected function validActiveKeys(array $keys): bool
{
foreach ($keys as $key)
{
if ($key === '' || (!is_string($key) && !is_numeric($key)))
{
return false;
}
}
return true;
}
}

View File

@ -0,0 +1,214 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Abstraction;
use Joomla\CMS\Factory;
use TrueChristianBible\Joomla\Interfaces\PHPConfigurationCheckerInterface;
use TrueChristianBible\Joomla\Abstraction\Registry;
/**
* PHP Configuration Checker
*
* @since 5.0.2
*/
abstract class PHPConfigurationChecker extends Registry implements PHPConfigurationCheckerInterface
{
/**
* The upload max filesize value
*
* @var string
* @since 5.0.2
**/
protected string $upload_max_filesize;
/**
* The post max size value
*
* @var string
* @since 5.0.2
**/
protected string $post_max_size;
/**
* The max execution time value
*
* @var int
* @since 5.0.2
**/
protected int $max_execution_time;
/**
* The max input vars value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_vars;
/**
* The max input time value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_time;
/**
* The memory limit value
*
* @var string
* @since 5.0.2
**/
protected string $memory_limit;
/**
* The registry array.
*
* @var array
* @since 5.0.2
**/
protected array $active = [
'php' => [
'upload_max_filesize' => [
'success' => 'The upload_max_filesize is appropriately set to handle large files, which is essential for uploading substantial components and media.',
'warning' => 'The current upload_max_filesize may not support large file uploads effectively, potentially causing failures during component installation.'
],
'post_max_size' => [
'success' => 'The post_max_size setting is sufficient to manage large data submissions, ensuring smooth data processing within forms and uploads.',
'warning' => 'An insufficient post_max_size can lead to truncated data submissions, affecting form functionality and data integrity.'
],
'max_execution_time' => [
'success' => 'Max execution time is set high enough to execute complex operations without premature termination, which is crucial for lengthy operations.',
'warning' => 'A low max execution time could lead to script timeouts, especially during intensive operations, which might interrupt execution and cause failures during the compiling of a large extension.'
],
'max_input_vars' => [
'success' => 'The max_input_vars setting supports a high number of input variables, facilitating complex forms and detailed component configurations.',
'warning' => 'Too few max_input_vars may result in lost data during processing complex forms, which can lead to incomplete configurations and operational issues.'
],
'max_input_time' => [
'success' => 'Max input time is adequate for processing inputs efficiently during high-load operations, ensuring no premature timeouts.',
'warning' => 'An insufficient max input time could result in incomplete data processing during input-heavy operations, potentially leading to errors and data loss.'
],
'memory_limit' => [
'success' => 'The memory limit is set high to accommodate extensive operations and data processing, which enhances overall performance and stability.',
'warning' => 'A low memory limit can lead to frequent crashes and performance issues, particularly when processing large amounts of data or complex calculations.'
]
],
'environment' => [
'name' => 'extension environment',
'objective' => 'These settings are crucial for ensuring the successful installation and stable functionality of the extension.',
'wiki_name' => 'PHP Settings Wiki',
'wiki_url' => '#'
]
];
/**
* Application object.
*
* @since 5.0.2
**/
protected $app;
/**
* Constructor.
*
* @param $app The app object.
*
* @since 5.0.2
*/
public function __construct($app = null)
{
$this->app = $app ?: Factory::getApplication();
// set the required PHP Configures
$this->set('php.upload_max_filesize.value', $this->upload_max_filesize);
$this->set('php.post_max_size.value', $this->post_max_size);
$this->set('php.max_execution_time.value', $this->max_execution_time);
$this->set('php.max_input_vars.value', $this->max_input_vars);
$this->set('php.max_input_time.value', $this->max_input_time);
$this->set('php.memory_limit.value', $this->memory_limit);
}
/**
* Check that the required configurations are set for PHP
*
* @return void
* @since 5.0.2
**/
public function run(): void
{
$showHelp = false;
// Check each configuration and provide detailed feedback
$configurations = $this->active['php'] ?? [];
foreach ($configurations as $configName => $configDetails)
{
$currentValue = ini_get($configName);
if ($currentValue === false)
{
$this->app->enqueueMessage("Error: Unable to retrieve current setting for '{$configName}'.", 'error');
continue;
}
$requiredValue = $configDetails['value'] ?? 0;
$isMemoryValue = strpbrk($requiredValue, 'KMG') !== false;
$requiredValueBytes = $isMemoryValue ? $this->convertToBytes($requiredValue) : (int) $requiredValue;
$currentValueBytes = $isMemoryValue ? $this->convertToBytes($currentValue) : (int) $currentValue;
$conditionMet = $currentValueBytes >= $requiredValueBytes;
$messageType = $conditionMet ? 'message' : 'warning';
$messageText = $conditionMet ?
"Success: {$configName} is set to {$currentValue}. " . $configDetails['success'] ?? '':
"Warning: {$configName} configuration should be at least {$requiredValue} but is currently {$currentValue}. " . $configDetails['warning'] ?? '';
$showHelp = ($showHelp || $messageType === 'warning') ? true : false;
$this->app->enqueueMessage($messageText, $messageType);
}
if ($showHelp)
{
$this->app->enqueueMessage("To optimize your {$this->get('environment.name', 'extension')}, specific PHP settings must be enhanced.<br>{$this->get('environment.objective', '')}<br>We've identified that certain configurations currently do not meet the recommended standards.<br>To adjust these settings and prevent potential issues, please consult our detailed guide available at <a href=\"https://{$this->get('environment.wiki_url', '#')}\" target=\"_blank\">{$this->get('environment.wiki_name', 'PHP Settings Wiki')}</a>.", 'notice');
}
}
/**
* Helper function to convert PHP INI memory values to bytes
*
* @param string $value The value to convert
*
* @return int The bytes value
* @since 5.0.2
*/
protected function convertToBytes(string $value): int
{
$value = trim($value);
$lastChar = strtolower($value[strlen($value) - 1]);
$numValue = substr($value, 0, -1);
switch ($lastChar)
{
case 'g':
return $numValue * 1024 * 1024 * 1024;
case 'm':
return $numValue * 1024 * 1024;
case 'k':
return $numValue * 1024;
default:
return (int) $value;
}
}
}

View File

@ -0,0 +1,191 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Abstraction;
use TrueChristianBible\Joomla\Interfaces\Registryinterface;
use TrueChristianBible\Joomla\Abstraction\ActiveRegistry;
/**
* VDM Basic Registry.
*
* Don't use this beyond 10 dimensional depth for best performance.
*
* @since 3.2.0
*/
abstract class Registry extends ActiveRegistry implements Registryinterface
{
/**
* Path separator
*
* @var string|null
* @since 3.2.0
*/
protected ?string $separator = '.';
/**
* Sets a value into the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function set(string $path, $value): self
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to set any value.");
}
$this->setActive($value, ...$keys);
return $this;
}
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on $asArray switch.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function add(string $path, $value, ?bool $asArray = null): self
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to add any value.");
}
$this->addActive($value, $asArray, ...$keys);
return $this;
}
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $default Optional default value, returned if the internal doesn't exist.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function get(string $path, $default = null)
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to get any value.");
}
return $this->getActive($default, ...$keys);
}
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function remove(string $path): self
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to remove any value.");
}
$this->removeActive(...$keys);
return $this;
}
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function exists(string $path): bool
{
if (($keys = $this->getActiveKeys($path)) === null)
{
throw new \InvalidArgumentException("Path must only be strings or numbers to check if any value exist.");
}
return $this->existsActive(...$keys);
}
/**
* Sets a separator value
*
* @param string|null $value The value to set.
*
* @return self
* @since 3.2.0
*/
public function setSeparator(?string $value): self
{
$this->separator = $value;
return $this;
}
/**
* Get that the active keys from a path
*
* @param string $path The path to determine the location registry.
*
* @return array|null The valid array of keys
* @since 3.2.0
*/
protected function getActiveKeys(string $path): ?array
{
// empty path no allowed
if ($path === '')
{
return null;
}
// Flatten the path
if ($this->separator === null || $this->separator === '')
{
return [$path];
}
$keys = array_values(array_filter(explode($this->separator, $path), 'strlen'));
if (empty($keys))
{
return null;
}
return $keys;
}
}

View File

@ -455,8 +455,8 @@ abstract class Schema implements SchemaInterface
return true;
}
if (is_string($expected['default']) && strtoupper($expected['default']) === 'EMPTY' &&
is_string($current->Default) && strpos($current->Default, 'EMPTY') !== false)
if (isset($expected['default']) && is_string($expected['default']) && strtoupper($expected['default']) === 'EMPTY' &&
isset($current->Default) && is_string($current->Default) && strpos($current->Default, 'EMPTY') !== false)
{
return true; // little fix
}

View File

@ -12,8 +12,7 @@
namespace TrueChristianBible\Joomla\Abstraction;
use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
use TrueChristianBible\Joomla\Interfaces\SchemaInterface as Schema;
use TrueChristianBible\Joomla\Interfaces\Tableinterface as Table;
use TrueChristianBible\Joomla\Utilities\ClassHelper;
@ -46,22 +45,21 @@ abstract class SchemaChecker implements SchemaCheckerInterface
/**
* Application object.
*
* @var CMSApplication
* @since 3.2.2
**/
protected CMSApplication $app;
protected $app;
/**
* Constructor.
*
* @param Schema|null $schema The Schema Class.
* @param Table|null $table The Table Class.
* @param CMSApplication|null $app The app object.
* @param Schema|null $schema The Schema Class.
* @param Table|null $table The Table Class.
* @param $app The app object.
*
* @throws \Exception
* @since 3.2.2
*/
public function __construct(?Schema $schema = null, ?Table $table = null, ?CMSApplication $app = null)
public function __construct(?Schema $schema = null, ?Table $table = null, $app = null)
{
$this->schema = $schema;
$this->table = $table;

View File

@ -0,0 +1,88 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\GetBible;
use TrueChristianBible\Joomla\Interfaces\PHPConfigurationCheckerInterface;
use TrueChristianBible\Joomla\Abstraction\PHPConfigurationChecker as ExtendingPHPConfigurationChecker;
/**
* Getbible PHP Configuration Checker
*
* @since 5.02
*/
final class PHPConfigurationChecker extends ExtendingPHPConfigurationChecker implements PHPConfigurationCheckerInterface
{
/**
* The upload max filesize value
*
* @var string
* @since 5.0.2
**/
protected string $upload_max_filesize = '64M';
/**
* The post max size value
*
* @var string
* @since 5.0.2
**/
protected string $post_max_size = '128M';
/**
* The max execution time value
*
* @var int
* @since 5.0.2
**/
protected int $max_execution_time = 60;
/**
* The max input vars value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_vars = 5000;
/**
* The max input time value
*
* @var int
* @since 5.0.2
**/
protected int $max_input_time = 60;
/**
* The memory limit value
*
* @var string
* @since 5.0.2
**/
protected string $memory_limit = '256M';
/**
* Constructor.
*
* @since 5.0.2
*/
public function __construct($app = null)
{
parent::__construct($app);
// set the required PHP Configures
$this->set('environment.name', 'Getbible environment');
$this->set('environment.wiki_url', 'git.vdm.dev/getBible/support/wiki/PHP-Settings');
}
}

View File

@ -0,0 +1,100 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces;
/**
* The Active Registry Interface
*
* @since 3.2.0
*/
interface Activeregistryinterface
{
/**
* Check if the registry has any content.
*
* @return bool Returns true if the active array is not empty, false otherwise.
* @since 3.2.0
*/
public function isActive(): bool;
/**
* Retrieves all value from the registry.
*
* @return array The values.
* @since 3.2.0
*/
public function allActive(): array;
/**
* Sets a value into the registry using multiple keys.
*
* @param mixed $value The value to set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function setActive($value, string ...$keys): void;
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on the value's type.
*
* @param mixed $value The value to set.
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function addActive($value, ?bool $asArray, string ...$keys): void;
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param mixed $default The default value if not set.
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function getActive($default, string ...$keys);
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return void
* @since 3.2.0
*/
public function removeActive(string ...$keys): void;
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string ...$keys The keys to determine the location.
*
* @throws \InvalidArgumentException If any of the keys are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function existsActive(string ...$keys): bool;
}

View File

@ -0,0 +1,50 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces\Git;
/**
* The Git Api Interface
*
* @since 3.2.0
*/
interface ApiInterface
{
/**
* Load/Reload API.
*
* @param string|null $url The url.
* @param token|null $token The token.
* @param bool $backup The backup swapping switch.
*
* @return void
* @since 3.2.0
**/
public function load_(?string $url = null, ?string $token = null, bool $backup = true): void;
/**
* Reset to previous toke, url it set
*
* @return void
* @since 3.2.0
**/
public function reset_(): void;
/**
* Get the API url
*
* @return string
* @since 3.2.0
**/
public function api();
}

View File

@ -0,0 +1,209 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces\Git\Repository;
use TrueChristianBible\Joomla\Interfaces\Git\ApiInterface;
/**
* The Git Repository Contents Interface
*
* @since 3.2.2
*/
interface ContentsInterface extends ApiInterface
{
/**
* Get a file from a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string|null $ref Optional. The name of the commit/branch/tag.
* Default the repository's default branch (usually master).
*
* @return mixed
* @since 3.2.0
**/
public function get(string $owner, string $repo, string $filepath, ?string $ref = null);
/**
* Get the metadata and contents (if a file) of an entry in a repository,
* or a list of entries if a directory.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file or directory path.
* @param string|null $ref Optional. The name of the commit/branch/tag.
* Default the repository's default branch (usually master).
*
* @return null|array|object
* @since 3.2.0
**/
public function metadata(string $owner, string $repo, string $filepath, ?string $ref = null): null|array|object;
/**
* Create a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $content The file content.
* @param string $message The commit message.
* @param string $branch The branch name. Defaults to the repository's default branch.
* @param string|null $authorName The author's name.
* @param string|null $authorEmail The author's email.
* @param string|null $committerName The committer's name.
* @param string|null $committerEmail The committer's email.
* @param string|null $newBranch Whether to create a new branch. Defaults to null.
* @param string|null $authorDate The author's date.
* @param string|null $committerDate The committer's date.
* @param bool|null $signoff Add a Signed-off-by trailer. Defaults to null.
*
* @return object|null
* @since 3.2.0
**/
public function create(
string $owner,
string $repo,
string $filepath,
string $content,
string $message,
string $branch = 'master',
?string $authorName = null,
?string $authorEmail = null,
?string $committerName = null,
?string $committerEmail = null,
?string $newBranch = null,
?string $authorDate = null,
?string $committerDate = null,
?bool $signoff = null
): ?object;
/**
* Get the metadata of all the entries of the root directory.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string|null $ref The name of the commit/branch/tag. Default the repository's default branch (usually master).
*
* @return array|null
* @since 3.2.0
**/
public function root(string $owner, string $repo, ?string $ref = null): ?array;
/**
* Update a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $content The file content.
* @param string $message The commit message.
* @param string $sha The blob SHA of the file.
* @param string $branch The branch name. Defaults to the repository's default branch.
* @param string|null $authorName The author name. Defaults to the authenticated user.
* @param string|null $authorEmail The author email. Defaults to the authenticated user.
* @param string|null $committerName The committer name. Defaults to the authenticated user.
* @param string|null $committerEmail The committer email. Defaults to the authenticated user.
* @param string|null $authorDate The author date.
* @param string|null $committerDate The committer date.
* @param string|null $fromPath The original file path to move/rename.
* @param string|null $newBranch The new branch to create from the specified branch.
* @param bool|null $signoff Add a Signed-off-by trailer.
*
* @return object|null
* @since 3.2.0
**/
public function update(
string $owner,
string $repo,
string $filepath,
string $content,
string $message,
string $sha,
string $branch = 'master',
?string $authorName = null,
?string $authorEmail = null,
?string $committerName = null,
?string $committerEmail = null,
?string $authorDate = null,
?string $committerDate = null,
?string $fromPath = null,
?string $newBranch = null,
?bool $signoff = null
): ?object;
/**
* Delete a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string $message The commit message.
* @param string $sha The blob SHA of the file.
* @param string|null $branch The branch name (optional).
* @param string|null $authorName The author name (optional).
* @param string|null $authorEmail The author email (optional).
* @param string|null $committerName The committer name (optional).
* @param string|null $committerEmail The committer email (optional).
* @param string|null $authorDate The author date (optional).
* @param string|null $committerDate The committer date (optional).
* @param string|null $newBranch The new branch name (optional).
* @param bool|null $signoff Add a Signed-off-by trailer (optional).
*
* @return object|null
* @since 3.2.0
**/
public function delete(
string $owner,
string $repo,
string $filepath,
string $message,
string $sha,
?string $branch = null,
?string $authorName = null,
?string $authorEmail = null,
?string $committerName = null,
?string $committerEmail = null,
?string $authorDate = null,
?string $committerDate = null,
?string $newBranch = null,
?bool $signoff = null
): ?object;
/**
* Get the EditorConfig definitions of a file in a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $filepath The file path.
* @param string|null $ref The name of the commit/branch/tag.
*
* @return string|null
* @since 3.2.0
**/
public function editor(string $owner, string $repo, string $filepath, string $ref = null): ?string;
/**
* Get the blob of a repository.
*
* @param string $owner The owner name.
* @param string $repo The repository name.
* @param string $sha The SHA hash of the blob.
*
* @return object|null
* @since 3.2.0
**/
public function blob(string $owner, string $repo, string $sha): ?object;
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,30 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces;
/**
* PHP Configuration Checker
*
* @since 5.0.2
*/
interface PHPConfigurationCheckerInterface
{
/**
* Check that the required configurations are set for PHP
*
* @return void
* @since 5.0.2
**/
public function run(): void;
}

View File

@ -0,0 +1,97 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace TrueChristianBible\Joomla\Interfaces;
use TrueChristianBible\Joomla\Interfaces\Activeregistryinterface;
/**
* The Registry Interface
*
* @since 3.2.0
*/
interface Registryinterface extends Activeregistryinterface
{
/**
* Sets a value into the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function set(string $path, $value): self;
/**
* Adds content into the registry. If a key exists,
* it either appends or concatenates based on $asArray switch.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $value Value of entry
* @param bool|null $asArray Determines if the new value should be treated as an array.
* Default is $addAsArray = false (if null) in base class.
* Override in child class allowed set class property $addAsArray = true.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function add(string $path, $value, ?bool $asArray = null): self;
/**
* Retrieves a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
* @param mixed $default Optional default value, returned if the internal doesn't exist.
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return mixed The value or sub-array from the storage. Null if the location doesn't exist.
* @since 3.2.0
*/
public function get(string $path, $default = null);
/**
* Removes a value (or sub-array) from the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return self
* @since 3.2.0
*/
public function remove(string $path): self;
/**
* Checks the existence of a particular location in the registry using multiple keys.
*
* @param string $path Registry path (e.g. vdm.content.builder)
*
* @throws \InvalidArgumentException If any of the path values are not a number or string.
* @return bool True if the location exists, false otherwise.
* @since 3.2.0
*/
public function exists(string $path): bool;
/**
* Sets a separator value
*
* @param string|null $value The value to set.
*
* @return self
* @since 3.2.0
*/
public function setSeparator(?string $value): self;
}

View File

@ -45,8 +45,8 @@ final class Load extends Model implements ModelInterface
$table = $this->getTable();
}
// check if this is a valid table
if (($store = $this->table->get($table, $field, 'store')) !== null)
// check if this is a valid table (don't touch null)
if ($value !== null && ($store = $this->table->get($table, $field, 'store')) !== null)
{
// open the value based on the store method
switch($store)

View File

@ -16,9 +16,13 @@
/------------------------------------------------------------------------------------------------------*/
namespace TrueChristianBible\Component\GetBible\Site\Controller;
use Joomla\Input\Input;
use Joomla\CMS\Factory;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Router\Route;
use Joomla\CMS\User\User;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\Text;
use TrueChristianBible\Joomla\Utilities\StringHelper;
@ -34,13 +38,50 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
*/
class DisplayController extends BaseController
{
/**
* The allowed edit views.
*
* @var array
* @since 4.0.0
*/
protected array $allowed_edit_views = [
];
/**
* The application identity object.
*
* @var User
* @since 4.0.0
*/
protected $identity;
/**
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'default_task', 'model_path', and
* 'view_path' (this list is not meant to be comprehensive).
* @param MVCFactoryInterface|null $factory The factory.
* @param CMSApplication|null $app The Application for the dispatcher
* @param Input|null $input The Input object for the request
*
* @throws \Exception
* @since 3.0.1
*/
public function __construct($config = [], MVCFactoryInterface $factory = null, $app = null, $input = null)
{
$app ??= Factory::getApplication();
$this->identity ??= $app->getIdentity();
parent::__construct($config, $factory, $app, $input);
}
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached.
* @param boolean $urlparams An array of safe URL parameters and their variable types, for valid values see {@link InputFilter::clean()}.
* @param boolean $cachable If true, the view output will be cached.
* @param boolean|array $urlparams An array of safe URL parameters and their variable types, for valid values see {@link InputFilter::clean()}.
*
* @return DisplayController This object to support chaining.
* @throws \Exception
* @since 1.5
*/
function display($cachable = false, $urlparams = false)
@ -54,14 +95,13 @@ class DisplayController extends BaseController
$cachable = true;
// ensure that the view is not cashable if edit view or if user is logged in
$user = $this->app->getIdentity();
if ($user->get('id') || $this->input->getMethod() === 'POST' || $isEdit)
if ($this->identity->get('id') || $this->input->getMethod() === 'POST' || $isEdit)
{
$cachable = false;
}
// Check for edit form.
if ($isEdit && !$this->checkEditId('com_getbible.edit.'.$view, $id))
if ($isEdit && !$this->checkEditId($view, $id))
{
// check if item was opened from other than its own list view
$ref = $this->input->getCmd('ref', 0);
@ -71,12 +111,12 @@ class DisplayController extends BaseController
if ($refid > 0 && StringHelper::check($ref))
{
// redirect to item of ref
$this->setRedirect(Route::_('index.php?option=com_getbible&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
$this->setRedirect(Route::_('index.php?option=com_getbible&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false));
}
elseif (StringHelper::check($ref))
{
// redirect to ref
$this->setRedirect(Route::_('index.php?option=com_getbible&view='.(string)$ref, false));
$this->setRedirect(Route::_('index.php?option=com_getbible&view=' . (string) $ref, false));
}
else
{
@ -118,19 +158,133 @@ class DisplayController extends BaseController
return $this;
}
protected function checkEditView($view)
/**
* Method to check whether an ID is in the edit list.
*
* @param string $context The view name.
* @param integer $id The ID of the record to add to the edit list.
*
* @return boolean True if the ID is in the edit list.
*
* @throws \Exception
* @since 3.0
*/
protected function checkEditId($context, $id)
{
if (parent::checkEditId("com_getbible.edit.{$context}", $id))
{
return true;
}
// check user edit access
if ($this->canEditId($context, $id))
{
$this->holdEditId("com_getbible.edit.{$context}", $id);
return true;
}
return false;
}
/**
* Method to check whether an ID is allowed to be edited by the active user.
*
* @param string $view The view name.
* @param integer $id The ID of the record to add to the edit list.
*
* @return boolean True if the ID is in the edit list.
*
* @since 5.0.2
*/
protected function canEditId($view, $id): bool
{
// check that this view is even allowed
$allowed = $this->getAllowedEditView($view);
if ($allowed === null)
{
return false;
}
// check if this item has custom function set for canEditId
if (isset($allowed['function'])
&& method_exists($this, $allowed['function'])
&& $this->{$allowed['function']}(['id' => $id], 'id'))
{
return true;
}
// check if this item can be accessed (and has access)
$access = true;
if (isset($allowed['access']))
{
$access = ($this->identity->authorise($allowed['access'], "com_getbible.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['access'], 'com_getbible'));
}
// check if this item can be edited
$edit = false;
if ($access && isset($allowed['edit']))
{
$edit = ($this->identity->authorise($allowed['edit'], "com_getbible.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['edit'], 'com_getbible'));
}
// check if this item can be edited by owner
if ($access && !$edit && isset($allowed['edit.own']))
{
$edit = ($this->identity->authorise($allowed['edit.own'], "com_getbible.{$view}." . (int) $id)
&& $this->identity->authorise($allowed['edit.own'], 'com_getbible'));
}
return $edit;
}
/**
* Checks if the provided view is an edit view.
*
* This method verifies whether the given view name is recognized as an edit view.
* It uses the StringHelper::check() method to validate the input and then checks
* against a predefined list of edit views.
*
* @param string|null $view The name of the view to check.
*
* @return bool True if the view is an edit view, false otherwise.
* @since 4.0.0
*/
protected function checkEditView(?string $view): bool
{
if (StringHelper::check($view))
{
$views = [
];
// check if this is a edit view
if (in_array($view,$views))
// check if this is an edit view
if (isset($this->allowed_edit_views[$view]))
{
return true;
}
}
return false;
}
/**
* Get the allowed edit view permission map
*
* @param string|null $view The name of the view to check.
*
* @return array|null The permissions map
* @since 5.0.2
*/
protected function getAllowedEditView(?string $view): ?array
{
if (StringHelper::check($view))
{
// check if this is an edit view
if (isset($this->allowed_edit_views[$view]))
{
return $this->allowed_edit_views[$view];
}
}
return null;
}
}

View File

@ -31,11 +31,11 @@ use TrueChristianBible\Component\GetBible\Site\Helper\GetbibleHelper;
use TrueChristianBible\Component\GetBible\Site\Helper\RouteHelper;
use Joomla\CMS\Helper\TagsHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\Component\Helper;
use TrueChristianBible\Joomla\Utilities\GuidHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use TrueChristianBible\Joomla\Utilities\JsonHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
// No direct access to this file
\defined('_JEXEC') or die;
@ -261,6 +261,13 @@ class TagModel extends ListModel
$this->input ??= Factory::getApplication()->input;
// we add a Share_His_Word option to set the session key
if (($linker = $this->input->getString('Share_His_Word', null)) !== null
&& GetBibleFactory::_('GetBible.Linker')->valid($linker))
{
GetBibleFactory::_('GetBible.Linker')->trigger($linker);
}
$this->translation = $this->input->getString('t') ?? $this->input->getString('translation', Helper::getParams('com_getbible')->get('default_translation', 'kjv')) ;
$this->tag = $this->input->getString('guid') ?? '';

View File

@ -36,6 +36,7 @@ use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file
\defined('_JEXEC') or die;
@ -47,6 +48,38 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 3.10.11
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 3.10.11
*/
protected array $scripts;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Display the view
*
@ -61,10 +94,10 @@ class HtmlView extends BaseHtmlView
$this->app ??= Factory::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->styles = $this->get('Styles') ?? [];
$this->scripts = $this->get('Scripts') ?? [];
// get the user object
$this->user ??= $this->app->getIdentity();
$this->user ??= $this->getCurrentUser();
// Initialise variables.
$this->item = $this->get('Item');
$this->chapter = $this->get('Chapter');
@ -1101,8 +1134,9 @@ class HtmlView extends BaseHtmlView
{
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = Toolbar::getInstance();
$this->toolbar ??= Toolbar::getInstance();
}
/**

View File

@ -36,6 +36,7 @@ use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file
\defined('_JEXEC') or die;
@ -47,6 +48,38 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 3.10.11
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 3.10.11
*/
protected array $scripts;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Display the view
*
@ -61,10 +94,10 @@ class HtmlView extends BaseHtmlView
$this->app ??= Factory::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
$this->styles = $this->get('Styles');
$this->scripts = $this->get('Scripts');
$this->styles = $this->get('Styles') ?? [];
$this->scripts = $this->get('Scripts') ?? [];
// get the user object
$this->user ??= $this->app->getIdentity();
$this->user ??= $this->getCurrentUser();
// Initialise variables.
$this->item = $this->get('Item');
$this->translation = $this->get('Translation');
@ -680,8 +713,9 @@ class HtmlView extends BaseHtmlView
{
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = Toolbar::getInstance();
$this->toolbar ??= Toolbar::getInstance();
}
/**

View File

@ -37,6 +37,7 @@ use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file
\defined('_JEXEC') or die;
@ -48,6 +49,54 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Display the view
*
@ -861,6 +910,7 @@ class HtmlView extends BaseHtmlView
{
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = Toolbar::getInstance();
}

View File

@ -37,6 +37,7 @@ use Joomla\CMS\Helper\ModuleHelper;
use TrueChristianBible\Joomla\GetBible\Factory as GetBibleFactory;
use TrueChristianBible\Joomla\Utilities\StringHelper;
use TrueChristianBible\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\User;
// No direct access to this file
\defined('_JEXEC') or die;
@ -48,6 +49,54 @@ use TrueChristianBible\Joomla\Utilities\ArrayHelper;
*/
class HtmlView extends BaseHtmlView
{
/**
* The items from the model
*
* @var mixed
* @since 3.10.11
*/
public mixed $items;
/**
* The toolbar object
*
* @var Toolbar
* @since 3.10.11
*/
public Toolbar $toolbar;
/**
* The styles url array
*
* @var array
* @since 5.0.0
*/
protected array $styles;
/**
* The scripts url array
*
* @var array
* @since 5.0.0
*/
protected array $scripts;
/**
* The actions object
*
* @var object
* @since 3.10.11
*/
public object $canDo;
/**
* The user object.
*
* @var User
* @since 3.10.11
*/
public User $user;
/**
* Display the view
*
@ -617,6 +666,7 @@ class HtmlView extends BaseHtmlView
{
ToolbarHelper::help('COM_GETBIBLE_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar
$this->toolbar = Toolbar::getInstance();
}

View File

@ -278,7 +278,7 @@
<version>4.0.15-alpha</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/v4.0.15-alpha3.zip</downloadurl>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v4.0.15-alpha4.zip</downloadurl>
</downloads>
<tags>
<tag>alpha</tag>
@ -293,10 +293,10 @@
<element>pkg_getbible</element>
<type>package</type>
<client>site</client>
<version>4.0.15-alpha3</version>
<version>4.0.15-alpha4</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/v4.0.15-alpha3.zip</downloadurl>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/getBible/joomla-pkg/archive/v4.0.15-alpha4.zip</downloadurl>
</downloads>
<tags>
<tag>alpha</tag>