diff --git a/CHANGELOG.md b/CHANGELOG.md index 789493edc..b2274978a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -# v5.0.4-beta1 +# v5.0.4-beta2 + +- Improve the [VDM Registry] to be Joomla Registry Compatible +- Move all registries to the [VDM Registry] class +- Fix Checked Out to be null and not 0. (#1194) +- Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194) +- Update all core date fields in table class. (#1188) +- Update created_by, modified_by, checked_out fields in table class. +- Implementation of the decentralized Super-Power CORE repository network. (#1190) + +# v5.0.4-beta - Add first classes for the new import engine. diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index 473ded761..125359943 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

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

'; +

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

'; // Add/Update component in the action logs extensions table. $this->setActionLogsExtensions(); diff --git a/README.md b/README.md index e33e9d702..14712566c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 7th November, 2024 -+ *Version*: 5.0.4-beta1 ++ *Last Build*: 16th December, 2024 ++ *Version*: 5.0.4-beta2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **890506** ++ *Line count*: **910278** + *Field count*: **2104** -+ *File count*: **6228** -+ *Folder count*: **636** ++ *File count*: **6346** ++ *Folder count*: **638** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/README.txt b/admin/README.txt index e33e9d702..14712566c 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 7th November, 2024 -+ *Version*: 5.0.4-beta1 ++ *Last Build*: 16th December, 2024 ++ *Version*: 5.0.4-beta2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **890506** ++ *Line count*: **910278** + *Field count*: **2104** -+ *File count*: **6228** -+ *Folder count*: **636** ++ *File count*: **6346** ++ *Folder count*: **638** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 6f3152829..4617b7f33 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Utilities\ArrayHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -96,8 +97,8 @@ $can = ComponentbuilderHelper::getActions('field'); authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('field',$item,'fields'); ?> diff --git a/admin/layouts/table.php b/admin/layouts/table.php index fa9d1ed2a..2d97cea26 100644 --- a/admin/layouts/table.php +++ b/admin/layouts/table.php @@ -45,7 +45,7 @@ $headers ??= [Text::_('COM_COMPONENTBUILDER_NO'), Text::_('COM_COMPONENTBUILDER_ $items ??= 6; ?> -
+
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index a51a33df1..391b1ab87 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `companyname` CHAR(64) NULL DEFAULT '', `component_version` CHAR(64) NULL DEFAULT '', `copyright` VARCHAR(255) NULL DEFAULT '', - `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` DATETIME NULL DEFAULT CURRENT_TIMESTAMP, `creatuserhelper` TINYINT(1) NOT NULL DEFAULT 0, `crowdin_account_api_key` TEXT NULL, `crowdin_project_api_key` TEXT NULL, @@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `joomla_source_link` VARCHAR(255) NOT NULL DEFAULT '', `license` VARCHAR(255) NULL DEFAULT '', `menu_prefix` VARCHAR(100) NULL DEFAULT '', - `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` DATETIME NULL, `mvc_versiondate` TINYINT(1) NOT NULL DEFAULT 0, `name` CHAR(64) NULL DEFAULT '', `name_code` VARCHAR(255) NULL DEFAULT '', @@ -100,10 +100,10 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `website` CHAR(255) NOT NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -208,12 +208,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_module` ( `update_server_url` VARCHAR(255) NOT NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -286,12 +286,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( `update_server_url` VARCHAR(255) NOT NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -331,12 +331,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_power` ( `system_name` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -381,12 +381,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_power` ( `use_selection` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -504,12 +504,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( `type` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -603,12 +603,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( `system_name` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -678,12 +678,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( `system_name` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -727,12 +727,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_template` ( `template` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -763,12 +763,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_layout` ( `snippet` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -824,12 +824,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_dynamic_get` ( `where` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -873,12 +873,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_code` ( `type` TINYINT(1) NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -909,12 +909,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_property` ( `visibility` VARCHAR(255) NOT NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -944,12 +944,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_method` ( `visibility` VARCHAR(255) NOT NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -973,12 +973,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_placeholder` ( `value` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1006,12 +1006,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( `type` TINYINT(1) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1045,12 +1045,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` ( `usage` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1076,12 +1076,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_validation_rule` ( `short_description` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1125,12 +1125,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( `xml` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1178,12 +1178,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_fieldtype` ( `store` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1217,12 +1217,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_language_translation` ( `translation` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1242,12 +1242,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_language` ( `name` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1278,12 +1278,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_server` ( `username` TEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1316,12 +1316,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_repository` ( `write_branch` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1361,12 +1361,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_help_document` ( `url` VARCHAR(255) NOT NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `ordering` INT(11) NULL DEFAULT 0, @@ -1390,12 +1390,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields` ( `admin_view` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1416,12 +1416,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_conditions` ( `admin_view` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1442,12 +1442,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_relations` ( `admin_view` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1468,12 +1468,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_custom_tabs` ( `tabs` TEXT NOT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1494,12 +1494,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_admin_views` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1520,12 +1520,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_site_views` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1546,12 +1546,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_views` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1572,12 +1572,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_updates` ( `version_update` MEDIUMTEXT NOT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1598,12 +1598,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_mysql_tweaks` ( `sql_tweak` TEXT NOT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1624,12 +1624,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_menus` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1656,12 +1656,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_router` ( `mode_methods` TINYINT(1) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1682,12 +1682,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_config` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1709,12 +1709,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_dashboard` ( `php_dashboard_methods` MEDIUMTEXT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1738,12 +1738,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_files_folders` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1764,12 +1764,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_placeholders` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1790,12 +1790,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_plugins` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1816,12 +1816,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_modules` ( `joomla_component` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1842,12 +1842,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet_type` ( `name` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1868,12 +1868,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_config` ( `library` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1898,12 +1898,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_files_folders_urls` ( `library` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1926,12 +1926,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_extends` ( `name` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1952,12 +1952,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_module_updates` ( `version_update` MEDIUMTEXT NOT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -1982,12 +1982,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_module_files_folders_urls `joomla_module` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -2008,12 +2008,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_group` ( `name` VARCHAR(255) NULL DEFAULT '', `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -2035,12 +2035,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_updates` ( `version_update` MEDIUMTEXT NOT NULL, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -2065,12 +2065,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls `joomla_plugin` INT(11) NOT NULL DEFAULT 0, `params` TEXT NULL, `published` TINYINT(3) NULL DEFAULT 1, - `created_by` INT(10) unsigned NULL DEFAULT 0, - `modified_by` INT(10) unsigned NULL DEFAULT 0, + `created_by` INT unsigned NULL, + `modified_by` INT unsigned, `created` DATETIME DEFAULT CURRENT_TIMESTAMP, - `modified` DATETIME DEFAULT NULL, - `checked_out` int(11) unsigned NULL DEFAULT 0, - `checked_out_time` DATETIME DEFAULT NULL, + `modified` DATETIME, + `checked_out` int unsigned, + `checked_out_time` DATETIME, `version` INT(10) unsigned NULL DEFAULT 1, `hits` INT(10) unsigned NULL DEFAULT 0, `access` INT(10) unsigned NULL DEFAULT 0, @@ -2144,7 +2144,7 @@ INSERT INTO `#__componentbuilder_layout` (`id`, `add_php_view`, `alias`, `descri (106, 1, 'textareabox', 'Textarea Box', '', 'PGRpdiBjbGFzcz0iPD9waHAgZWNobyAkbWFyZ2luOyA/PiI+DQoJPGxhYmVsIGNsYXNzPSJ1ay1mb3JtLWxhYmVsIiBmb3I9Ijw/cGhwIGVjaG8gJG5hbWU7ID8+Ij48P3BocCBlY2hvICRsYWJlbDsgPz48L2xhYmVsPg0K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X25hbWU7ID8+KSA8P3BocCBlY2hvICRmaWxlLT5uYW1lOyA/PjwvYT4NCgkJCQkJPGJ1dHRvbiB0eXBlPSJidXR0b24iIGNsYXNzPSJ1ay1idXR0b24gdWstYnV0dG9uLWRhbmdlciB1ay13aWR0aC0xLTQiIHVrLWljb249InRyYXNoIiBvbmNsaWNrPSJWRE1EZWxldGVGaWxlKCdmaWxlX3ZkbV91cGxvYWRlcicsICc8P3BocCBlY2hvICRmaWxlLT5ndWlkOyA/PicpOyI+PC9idXR0b24+DQoJCQkJPC9kaXY+DQoJCQk8P3BocCBlbmRpZjsgPz4NCgkJCTwvbGk+DQoJCQk8P3BocCBlbmRmb3JlYWNoOyA/Pg0KCQk8L3VsPg0KCTw/cGhwIGVuZGlmOyA/Pg0KPD9waHAgZW5kaWY7ID8+', 'File Display Engine', 'JGltYWdlcyA9IFtdOw==', '', '', 1, 5, '', 48, ''); -- diff --git a/admin/sql/updates/mysql/5.0.4-beta.sql b/admin/sql/updates/mysql/5.0.4-beta.sql new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/admin/sql/updates/mysql/5.0.4-beta.sql @@ -0,0 +1 @@ + diff --git a/admin/tmpl/admin_views/default_body.php b/admin/tmpl/admin_views/default_body.php index f67fd24cd..511842d49 100644 --- a/admin/tmpl/admin_views/default_body.php +++ b/admin/tmpl/admin_views/default_body.php @@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\GetHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -26,8 +27,8 @@ $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view. user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('admin_view',$item,'admin_views'); ?> diff --git a/admin/tmpl/admins_custom_tabs/default_body.php b/admin/tmpl/admins_custom_tabs/default_body.php index 7c9275752..9b23622de 100644 --- a/admin/tmpl/admins_custom_tabs/default_body.php +++ b/admin/tmpl/admins_custom_tabs/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_custom_tabs&task=admi user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('admin_custom_tabs',$item,'admins_custom_tabs'); ?> diff --git a/admin/tmpl/admins_fields/default_body.php b/admin/tmpl/admins_fields/default_body.php index 6e59a89fa..a8a66b245 100644 --- a/admin/tmpl/admins_fields/default_body.php +++ b/admin/tmpl/admins_fields/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields&task=admin_fie user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('admin_fields',$item,'admins_fields'); ?> diff --git a/admin/tmpl/admins_fields_conditions/default_body.php b/admin/tmpl/admins_fields_conditions/default_body.php index 90a3d2e39..9bac13efe 100644 --- a/admin/tmpl/admins_fields_conditions/default_body.php +++ b/admin/tmpl/admins_fields_conditions/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_conditions&tas user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('admin_fields_conditions',$item,'admins_fields_conditions'); ?> diff --git a/admin/tmpl/admins_fields_relations/default_body.php b/admin/tmpl/admins_fields_relations/default_body.php index 8e487ff32..f9f6471f4 100644 --- a/admin/tmpl/admins_fields_relations/default_body.php +++ b/admin/tmpl/admins_fields_relations/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_relations&task user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('admin_fields_relations',$item,'admins_fields_relations'); ?> diff --git a/admin/tmpl/class_extendings/default_body.php b/admin/tmpl/class_extendings/default_body.php index 418db43f4..54cbfc78f 100644 --- a/admin/tmpl/class_extendings/default_body.php +++ b/admin/tmpl/class_extendings/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_extendings&task=class_ user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('class_extends',$item,'class_extendings'); ?> diff --git a/admin/tmpl/class_methods/default_body.php b/admin/tmpl/class_methods/default_body.php index 0078c1558..eaba5ee66 100644 --- a/admin/tmpl/class_methods/default_body.php +++ b/admin/tmpl/class_methods/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_methods&task=class_met user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('class_method',$item,'class_methods'); ?> diff --git a/admin/tmpl/class_properties/default_body.php b/admin/tmpl/class_properties/default_body.php index 5a557bccb..bc963af8b 100644 --- a/admin/tmpl/class_properties/default_body.php +++ b/admin/tmpl/class_properties/default_body.php @@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=class_properties&task=class_ user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('class_property',$item,'class_properties'); ?> diff --git a/admin/tmpl/components_admin_views/default_body.php b/admin/tmpl/components_admin_views/default_body.php index e8a098f51..947b3ad78 100644 --- a/admin/tmpl/components_admin_views/default_body.php +++ b/admin/tmpl/components_admin_views/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_admin_views&task= user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_admin_views',$item,'components_admin_views'); ?> diff --git a/admin/tmpl/components_config/default_body.php b/admin/tmpl/components_config/default_body.php index 8ebe7b985..170bc0301 100644 --- a/admin/tmpl/components_config/default_body.php +++ b/admin/tmpl/components_config/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_config&task=compo user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_config',$item,'components_config'); ?> diff --git a/admin/tmpl/components_custom_admin_menus/default_body.php b/admin/tmpl/components_custom_admin_menus/default_body.php index 86441c647..a54a99498 100644 --- a/admin/tmpl/components_custom_admin_menus/default_body.php +++ b/admin/tmpl/components_custom_admin_menus/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_menu user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus',$item,'components_custom_admin_menus'); ?> diff --git a/admin/tmpl/components_custom_admin_views/default_body.php b/admin/tmpl/components_custom_admin_views/default_body.php index e01261ef4..8cc3e3d4b 100644 --- a/admin/tmpl/components_custom_admin_views/default_body.php +++ b/admin/tmpl/components_custom_admin_views/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_view user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_custom_admin_views',$item,'components_custom_admin_views'); ?> diff --git a/admin/tmpl/components_dashboard/default_body.php b/admin/tmpl/components_dashboard/default_body.php index 80bb7ebab..e5146985b 100644 --- a/admin/tmpl/components_dashboard/default_body.php +++ b/admin/tmpl/components_dashboard/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_dashboard&task=co user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_dashboard',$item,'components_dashboard'); ?> diff --git a/admin/tmpl/components_files_folders/default_body.php b/admin/tmpl/components_files_folders/default_body.php index 691abdd2b..cc7be882d 100644 --- a/admin/tmpl/components_files_folders/default_body.php +++ b/admin/tmpl/components_files_folders/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_files_folders&tas user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_files_folders',$item,'components_files_folders'); ?> diff --git a/admin/tmpl/components_modules/default_body.php b/admin/tmpl/components_modules/default_body.php index 654bbbb96..c0a23e73c 100644 --- a/admin/tmpl/components_modules/default_body.php +++ b/admin/tmpl/components_modules/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_modules&task=comp user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_modules',$item,'components_modules'); ?> diff --git a/admin/tmpl/components_mysql_tweaks/default_body.php b/admin/tmpl/components_mysql_tweaks/default_body.php index aac55a86c..ca69bcd0a 100644 --- a/admin/tmpl/components_mysql_tweaks/default_body.php +++ b/admin/tmpl/components_mysql_tweaks/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_mysql_tweaks&task user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks',$item,'components_mysql_tweaks'); ?> diff --git a/admin/tmpl/components_placeholders/default_body.php b/admin/tmpl/components_placeholders/default_body.php index 048fd08ea..700bddf9f 100644 --- a/admin/tmpl/components_placeholders/default_body.php +++ b/admin/tmpl/components_placeholders/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_placeholders&task user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_placeholders',$item,'components_placeholders'); ?> diff --git a/admin/tmpl/components_plugins/default_body.php b/admin/tmpl/components_plugins/default_body.php index 246965807..357c8ab58 100644 --- a/admin/tmpl/components_plugins/default_body.php +++ b/admin/tmpl/components_plugins/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_plugins&task=comp user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_plugins',$item,'components_plugins'); ?> diff --git a/admin/tmpl/components_routers/default_body.php b/admin/tmpl/components_routers/default_body.php index cb6a094ec..585446646 100644 --- a/admin/tmpl/components_routers/default_body.php +++ b/admin/tmpl/components_routers/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_routers&task=comp user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_router',$item,'components_routers'); ?> diff --git a/admin/tmpl/components_site_views/default_body.php b/admin/tmpl/components_site_views/default_body.php index c94fb79a4..6e1568abe 100644 --- a/admin/tmpl/components_site_views/default_body.php +++ b/admin/tmpl/components_site_views/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_site_views&task=c user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_site_views',$item,'components_site_views'); ?> diff --git a/admin/tmpl/components_updates/default_body.php b/admin/tmpl/components_updates/default_body.php index 1c568744a..88b77418b 100644 --- a/admin/tmpl/components_updates/default_body.php +++ b/admin/tmpl/components_updates/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=components_updates&task=comp user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('component_updates',$item,'components_updates'); ?> diff --git a/admin/tmpl/custom_admin_views/default_body.php b/admin/tmpl/custom_admin_views/default_body.php index fb40e2cae..3e4cb7438 100644 --- a/admin/tmpl/custom_admin_views/default_body.php +++ b/admin/tmpl/custom_admin_views/default_body.php @@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=cust user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('custom_admin_view',$item,'custom_admin_views'); ?> diff --git a/admin/tmpl/custom_codes/default_body.php b/admin/tmpl/custom_codes/default_body.php index 701e62c8a..be641d479 100644 --- a/admin/tmpl/custom_codes/default_body.php +++ b/admin/tmpl/custom_codes/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=custom_codes&task=custom_cod user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('custom_code',$item,'custom_codes'); ?> diff --git a/admin/tmpl/dynamic_gets/default_body.php b/admin/tmpl/dynamic_gets/default_body.php index 4d2ad4993..e9b08cbb8 100644 --- a/admin/tmpl/dynamic_gets/default_body.php +++ b/admin/tmpl/dynamic_gets/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_ge user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('dynamic_get',$item,'dynamic_gets'); ?> diff --git a/admin/tmpl/fields/default_body.php b/admin/tmpl/fields/default_body.php index 085b6bcd0..83d9c5ce8 100644 --- a/admin/tmpl/fields/default_body.php +++ b/admin/tmpl/fields/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('field',$item,'fields'); ?> diff --git a/admin/tmpl/fieldtypes/default_body.php b/admin/tmpl/fieldtypes/default_body.php index 346ef45ea..c98de9b82 100644 --- a/admin/tmpl/fieldtypes/default_body.php +++ b/admin/tmpl/fieldtypes/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.ed user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('fieldtype',$item,'fieldtypes'); ?> diff --git a/admin/tmpl/help_documents/default_body.php b/admin/tmpl/help_documents/default_body.php index f45d860a3..83d624f12 100644 --- a/admin/tmpl/help_documents/default_body.php +++ b/admin/tmpl/help_documents/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=help_documents&task=help_doc user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('help_document',$item,'help_documents'); ?> diff --git a/admin/tmpl/joomla_components/default_body.php b/admin/tmpl/joomla_components/default_body.php index cd15aef7f..dad923745 100644 --- a/admin/tmpl/joomla_components/default_body.php +++ b/admin/tmpl/joomla_components/default_body.php @@ -16,6 +16,7 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -27,8 +28,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_component',$item,'joomla_components'); ?> diff --git a/admin/tmpl/joomla_modules/default_body.php b/admin/tmpl/joomla_modules/default_body.php index 8a7c8c956..13679ed7c 100644 --- a/admin/tmpl/joomla_modules/default_body.php +++ b/admin/tmpl/joomla_modules/default_body.php @@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\GetHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -26,8 +27,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules&task=joomla_m user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_module',$item,'joomla_modules'); ?> diff --git a/admin/tmpl/joomla_modules_files_folders_urls/default_body.php b/admin/tmpl/joomla_modules_files_folders_urls/default_body.php index e61307b33..d31cfcbf7 100644 --- a/admin/tmpl/joomla_modules_files_folders_urls/default_body.php +++ b/admin/tmpl/joomla_modules_files_folders_urls/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules_files_folders user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_module_files_folders_urls',$item,'joomla_modules_files_folders_urls'); ?> diff --git a/admin/tmpl/joomla_modules_updates/default_body.php b/admin/tmpl/joomla_modules_updates/default_body.php index efa21d2f0..f1cb127ff 100644 --- a/admin/tmpl/joomla_modules_updates/default_body.php +++ b/admin/tmpl/joomla_modules_updates/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_modules_updates&task= user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_module_updates',$item,'joomla_modules_updates'); ?> diff --git a/admin/tmpl/joomla_plugin_groups/default_body.php b/admin/tmpl/joomla_plugin_groups/default_body.php index 0b2746114..567e8d30d 100644 --- a/admin/tmpl/joomla_plugin_groups/default_body.php +++ b/admin/tmpl/joomla_plugin_groups/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugin_groups&task=jo user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_plugin_group',$item,'joomla_plugin_groups'); ?> diff --git a/admin/tmpl/joomla_plugins/default_body.php b/admin/tmpl/joomla_plugins/default_body.php index dae6294c1..6964b1d1c 100644 --- a/admin/tmpl/joomla_plugins/default_body.php +++ b/admin/tmpl/joomla_plugins/default_body.php @@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\GetHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -26,8 +27,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins&task=joomla_p user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_plugin',$item,'joomla_plugins'); ?> diff --git a/admin/tmpl/joomla_plugins_files_folders_urls/default_body.php b/admin/tmpl/joomla_plugins_files_folders_urls/default_body.php index 4173e36c0..cdccd219c 100644 --- a/admin/tmpl/joomla_plugins_files_folders_urls/default_body.php +++ b/admin/tmpl/joomla_plugins_files_folders_urls/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins_files_folders user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_plugin_files_folders_urls',$item,'joomla_plugins_files_folders_urls'); ?> diff --git a/admin/tmpl/joomla_plugins_updates/default_body.php b/admin/tmpl/joomla_plugins_updates/default_body.php index d1fb8daeb..eab015411 100644 --- a/admin/tmpl/joomla_plugins_updates/default_body.php +++ b/admin/tmpl/joomla_plugins_updates/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_plugins_updates&task= user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_plugin_updates',$item,'joomla_plugins_updates'); ?> diff --git a/admin/tmpl/joomla_powers/default_body.php b/admin/tmpl/joomla_powers/default_body.php index e7fb4d220..9bf1ae8cd 100644 --- a/admin/tmpl/joomla_powers/default_body.php +++ b/admin/tmpl/joomla_powers/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_powers&task=joomla_po user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('joomla_power',$item,'joomla_powers'); ?> diff --git a/admin/tmpl/language_translations/default_body.php b/admin/tmpl/language_translations/default_body.php index 45461ec72..563dc1999 100644 --- a/admin/tmpl/language_translations/default_body.php +++ b/admin/tmpl/language_translations/default_body.php @@ -16,6 +16,7 @@ use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -27,8 +28,8 @@ $edit = "index.php?option=com_componentbuilder&view=language_translations&task=l user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('language_translation',$item,'language_translations'); ?> diff --git a/admin/tmpl/languages/default_body.php b/admin/tmpl/languages/default_body.php index 694525286..83eceee9b 100644 --- a/admin/tmpl/languages/default_body.php +++ b/admin/tmpl/languages/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=languages&task=language.edit user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('language',$item,'languages'); ?> diff --git a/admin/tmpl/layouts/default_body.php b/admin/tmpl/layouts/default_body.php index f7db1bc56..3110f5160 100644 --- a/admin/tmpl/layouts/default_body.php +++ b/admin/tmpl/layouts/default_body.php @@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit"; user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('layout',$item,'layouts'); ?> diff --git a/admin/tmpl/libraries/default_body.php b/admin/tmpl/libraries/default_body.php index 791af7504..271d96a10 100644 --- a/admin/tmpl/libraries/default_body.php +++ b/admin/tmpl/libraries/default_body.php @@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\GetHelper; +use Joomla\CMS\User\UserFactoryInterface; use Joomla\CMS\Uri\Uri; // No direct access to this file @@ -27,8 +28,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit" user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('library',$item,'libraries'); ?> diff --git a/admin/tmpl/libraries_config/default_body.php b/admin/tmpl/libraries_config/default_body.php index 822835788..4c5dd50f3 100644 --- a/admin/tmpl/libraries_config/default_body.php +++ b/admin/tmpl/libraries_config/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_config&task=librar user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('library_config',$item,'libraries_config'); ?> diff --git a/admin/tmpl/libraries_files_folders_urls/default_body.php b/admin/tmpl/libraries_files_folders_urls/default_body.php index 01d1e25c9..4f4f8ec93 100644 --- a/admin/tmpl/libraries_files_folders_urls/default_body.php +++ b/admin/tmpl/libraries_files_folders_urls/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_files_folders_urls user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('library_files_folders_urls',$item,'libraries_files_folders_urls'); ?> diff --git a/admin/tmpl/placeholders/default_body.php b/admin/tmpl/placeholders/default_body.php index 95b9508ed..28137602f 100644 --- a/admin/tmpl/placeholders/default_body.php +++ b/admin/tmpl/placeholders/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=placeholders&task=placeholde user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('placeholder',$item,'placeholders'); ?> diff --git a/admin/tmpl/powers/default_body.php b/admin/tmpl/powers/default_body.php index e6dcdab21..d7ba339f2 100644 --- a/admin/tmpl/powers/default_body.php +++ b/admin/tmpl/powers/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=powers&task=power.edit"; user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('power',$item,'powers'); ?> diff --git a/admin/tmpl/repositories/default_body.php b/admin/tmpl/repositories/default_body.php index 051362d80..2a56dd0a7 100644 --- a/admin/tmpl/repositories/default_body.php +++ b/admin/tmpl/repositories/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=repositories&task=repository user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('repository',$item,'repositories'); ?> diff --git a/admin/tmpl/servers/default_body.php b/admin/tmpl/servers/default_body.php index 2b4dadb00..1b27e0d86 100644 --- a/admin/tmpl/servers/default_body.php +++ b/admin/tmpl/servers/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=servers&task=server.edit"; user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('server',$item,'servers'); ?> diff --git a/admin/tmpl/site_views/default_body.php b/admin/tmpl/site_views/default_body.php index dceee1be3..8d72204c0 100644 --- a/admin/tmpl/site_views/default_body.php +++ b/admin/tmpl/site_views/default_body.php @@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.ed user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('site_view',$item,'site_views'); ?> diff --git a/admin/tmpl/snippet_types/default_body.php b/admin/tmpl/snippet_types/default_body.php index da5ba7b33..2cbb74475 100644 --- a/admin/tmpl/snippet_types/default_body.php +++ b/admin/tmpl/snippet_types/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=snippet_types&task=snippet_t user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('snippet_type',$item,'snippet_types'); ?> diff --git a/admin/tmpl/snippets/default_body.php b/admin/tmpl/snippets/default_body.php index 8a696f7d6..dc6623c16 100644 --- a/admin/tmpl/snippets/default_body.php +++ b/admin/tmpl/snippets/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit"; user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('snippet',$item,'snippets'); ?> diff --git a/admin/tmpl/templates/default_body.php b/admin/tmpl/templates/default_body.php index caab355c6..cb149f75e 100644 --- a/admin/tmpl/templates/default_body.php +++ b/admin/tmpl/templates/default_body.php @@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; use VDM\Joomla\Utilities\StringHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -25,8 +26,8 @@ $edit = "index.php?option=com_componentbuilder&view=templates&task=template.edit user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('template',$item,'templates'); ?> diff --git a/admin/tmpl/validation_rules/default_body.php b/admin/tmpl/validation_rules/default_body.php index 975d1e15c..287f5a548 100644 --- a/admin/tmpl/validation_rules/default_body.php +++ b/admin/tmpl/validation_rules/default_body.php @@ -13,6 +13,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\HTML\HTMLHelper as Html; use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper; +use Joomla\CMS\User\UserFactoryInterface; // No direct access to this file defined('_JEXEC') or die; @@ -24,8 +25,8 @@ $edit = "index.php?option=com_componentbuilder&view=validation_rules&task=valida user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0; $userChkOut = Factory::getContainer()-> - get(\Joomla\CMS\User\UserFactoryInterface::class)-> - loadUserById($item->checked_out); + get(UserFactoryInterface::class)-> + loadUserById($item->checked_out ?? 0); $canDo = ComponentbuilderHelper::getActions('validation_rule',$item,'validation_rules'); ?> diff --git a/componentbuilder.xml b/componentbuilder.xml index 143bd660d..8d633a86b 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 7th November, 2024 + 16th December, 2024 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 5.0.4-beta1 + 5.0.4-beta2 Component Builder (v.5.0.4-beta1) +

Component Builder (v.5.0.4-beta2)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 9af821fba..c4075d95d 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -131,10 +131,28 @@ pkg_component_builder package site - 5.0.4-beta1 + 5.0.4-beta https://dev.vdm.io - https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.4-beta1.zip + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.4-beta2.zip + + + beta + + Llewellyn van der Merwe + https://dev.vdm.io + + + + Component Builder + Builds Complex Joomla Components + pkg_component_builder + package + site + 5.0.4-beta2 + https://dev.vdm.io + + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.4-beta2.zip beta diff --git a/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Http.php b/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Http.php index c58ea2c93..902538bb7 100644 --- a/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Http.php +++ b/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Http.php @@ -28,10 +28,10 @@ final class Http extends JoomlaHttp /** * The token * - * @var string + * @var string|null * @since 3.2.0 */ - protected string $_token_; // to avoid collisions (but allow swapping) + protected ?string $_token_; // to avoid collisions (but allow swapping) /** * Constructor. @@ -41,7 +41,7 @@ final class Http extends JoomlaHttp * @since 3.2.0 * @throws \InvalidArgumentException **/ - public function __construct(?string $token) + public function __construct(?string $token = null) { // setup config $config = [ @@ -52,7 +52,7 @@ final class Http extends JoomlaHttp ]; // add the token if given - if (is_string($token)) + if (is_string($token) && !empty($token)) { $config['headers']['Authorization'] = 'token ' . $token; $this->_token_ = $token; @@ -79,9 +79,16 @@ final class Http extends JoomlaHttp ] ); - // add the token - $headers['Authorization'] = 'token ' . $token; - $this->_token_ = $token; + if (empty($token)) + { + unset($headers['Authorization']); + } + else + { + // add the token + $headers['Authorization'] = 'token ' . $token; + $this->_token_ = $token; + } $this->setOption('headers', $headers); } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseTable.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseTable.php index 7f48355ad..7a0919d15 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseTable.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseTable.php @@ -108,8 +108,7 @@ abstract class BaseTable implements TableInterface 'store' => NULL, 'tab_name' => NULL, 'db' => [ - 'type' => 'INT(10) unsigned', - 'default' => '0', + 'type' => 'INT unsigned', 'null_switch' => 'NULL', 'key' => true, 'key_name' => 'modifiedby' @@ -125,7 +124,6 @@ abstract class BaseTable implements TableInterface 'tab_name' => NULL, 'db' => [ 'type' => 'DATETIME', - 'default' => '0000-00-00 00:00:00', 'null_switch' => 'NULL' ] ], @@ -138,7 +136,7 @@ abstract class BaseTable implements TableInterface 'store' => NULL, 'tab_name' => NULL, 'db' => [ - 'type' => 'INT(10) unsigned', + 'type' => 'INT unsigned', 'default' => '0', 'null_switch' => 'NULL', 'key' => true, @@ -155,7 +153,7 @@ abstract class BaseTable implements TableInterface 'tab_name' => NULL, 'db' => [ 'type' => 'DATETIME', - 'default' => '0000-00-00 00:00:00', + 'default' => 'CURRENT_TIMESTAMP', 'null_switch' => 'NULL' ] ], @@ -168,8 +166,7 @@ abstract class BaseTable implements TableInterface 'store' => NULL, 'tab_name' => NULL, 'db' => [ - 'type' => 'INT(10) unsigned', - 'default' => '0', + 'type' => 'INT unsigned', 'null_switch' => 'NULL', 'key' => true, 'key_name' => 'checkout' @@ -185,7 +182,6 @@ abstract class BaseTable implements TableInterface 'tab_name' => NULL, 'db' => [ 'type' => 'DATETIME', - 'default' => '0000-00-00 00:00:00', 'null_switch' => 'NULL' ] ], diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseConfig.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/FunctionRegistry.php similarity index 58% rename from libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseConfig.php rename to libraries/vendor_jcb/VDM.Joomla/src/Abstraction/FunctionRegistry.php index c4debc288..708a0b33d 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/BaseConfig.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/FunctionRegistry.php @@ -12,41 +12,17 @@ namespace VDM\Joomla\Abstraction; -use Joomla\Registry\Registry as JoomlaRegistry; use VDM\Joomla\Utilities\String\ClassfunctionHelper; +use VDM\Joomla\Abstraction\Registry; /** - * Config + * A Dynamic Function Registry * - * @since 3.2.0 + * @since 5.0.4 */ -abstract class BaseConfig extends JoomlaRegistry +abstract class FunctionRegistry extends Registry { - /** - * Constructor - * - * @since 3.2.0 - */ - public function __construct() - { - // Instantiate the internal data object. - $this->data = new \stdClass(); - } - - /** - * setting any config value - * - * @param string $key The value's key/path name - * @param mixed $value Optional default value, returned if the internal value is null. - * - * @since 3.2.0 - */ - public function __set($key, $value) - { - $this->set($key, $value); - } - /** * getting any valid value * @@ -76,7 +52,7 @@ abstract class BaseConfig extends JoomlaRegistry * * @since 3.2.0 */ - public function get($path, $default = null) + public function get(string $path, $default = null): mixed { // function name with no underscores $method = 'get' . ucfirst((string) ClassfunctionHelper::safe(str_replace('_', '', $path))); @@ -86,7 +62,8 @@ abstract class BaseConfig extends JoomlaRegistry { return $value; } - elseif (method_exists($this, $method)) + // Use the method if it's callable and not excluded + elseif ($this->isCallableMethod($method)) { $value = $this->{$method}($default); @@ -104,19 +81,46 @@ abstract class BaseConfig extends JoomlaRegistry * @param string $path Parent registry Path (e.g. joomla.content.showauthor) * @param mixed $value Value of entry * - * @return mixed The value of the that has been set. + * @return mixed The values of the path that has been set. * * @since 3.2.0 */ public function appendArray(string $path, $value) { - // check if it does not exist - if (!$this->exists($path)) + return $this->add($path, $value, true)->get($path); + } + + /** + * Determines if a method is callable on this object, excluding certain methods. + * + * This method checks if a method exists on this object and is callable, but excludes + * certain methods to prevent unintended access or recursion. It helps to safely determine + * if a dynamic getter method can be invoked without interfering with core methods. + * + * @param string $method The method name to check. + * + * @return bool True if the method is callable and not excluded, false otherwise. + * @since 5.0.4 + */ + protected function isCallableMethod(string $method): bool + { + // List of methods to exclude from dynamic access + $excludedMethods = [ + 'getActive', + 'get', + 'getSeparator', + 'getIterator', + 'getName', + 'getActiveKeys' + ]; + + // Check if the method exists and is not excluded + if (method_exists($this, $method) && !in_array($method, $excludedMethods, true)) { - $this->set($path, []); + return true; } - return $this->append($path, $value); + return false; } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php index 8cac2a316..373087334 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php @@ -17,6 +17,8 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Filesystem\Folder; use Joomla\CMS\Application\CMSApplication; use VDM\Joomla\Gitea\Repository\Contents; +use VDM\Joomla\Interfaces\Git\ApiInterface as Api; +use VDM\Joomla\Componentbuilder\Network\Resolve; use VDM\Joomla\Utilities\FileHelper; use VDM\Joomla\Utilities\JsonHelper; use VDM\Joomla\Interfaces\GrepInterface; @@ -50,6 +52,14 @@ abstract class Grep implements GrepInterface **/ public ?array $paths; + /** + * The Grep target [network] + * + * @var string + * @since 5.0.4 + **/ + protected ?string $target = null; + /** * Order of global search * @@ -82,6 +92,14 @@ abstract class Grep implements GrepInterface */ protected string $index_path = 'index.json'; + /** + * The VDM global API base + * + * @var string + * @since 5.0.4 + **/ + protected string $api_base = '//git.vdm.dev/'; + /** * Gitea Repository Contents * @@ -90,6 +108,14 @@ abstract class Grep implements GrepInterface **/ protected Contents $contents; + /** + * The Resolve Class. + * + * @var Resolve + * @since 5.0.4 + */ + protected Resolve $resolve; + /** * Joomla Application object * @@ -101,17 +127,22 @@ abstract class Grep implements GrepInterface /** * Constructor. * - * @param Contents $contents The Gitea Repository Contents object. - * @param array $paths The approved paths - * @param string|null $path The local path - * @param CMSApplication|null $app The CMS Application object. + * @param Contents $contents The Gitea Repository Contents object. + * @param Resolve $resolve The Resolve Class. + * @param array $paths The approved paths + * @param string|null $path The local path + * @param CMSApplication|null $app The CMS Application object. * * @throws \Exception * @since 3.2.0 */ - public function __construct(Contents $contents, array $paths, ?string $path = null, ?CMSApplication $app = null) + public function __construct( + Contents $contents, Resolve $resolve, + array $paths, ?string $path = null, + ?CMSApplication $app = null) { $this->contents = $contents; + $this->resolve = $resolve; $this->paths = $paths; $this->path = $path; $this->app = $app ?: Factory::getApplication(); @@ -264,6 +295,38 @@ abstract class Grep implements GrepInterface return null; } + /** + * Loads API config using the provided base URL and token. + * + * This method checks if the base URL contains 'https://git.vdm.dev/'. + * If it does, it uses the token as is (which may be null). + * If not, it ensures the token is not null by defaulting to an empty string. + * + * @param Api $api The api object with a load_ method. + * @param string|null $base The base URL path. + * @param string|null $token The token for authentication (can be null). + * + * @return void + * @since 5.0.4 + */ + public function loadApi(Api $api, ?string $base, ?string $token): void + { + // Determine the token to use based on the base URL + if ($base && strpos($base, $this->api_base) !== false) + { + // If base contains $this->api_base = https://git.vdm.dev/, use the token as is + $tokenToUse = $token; + } + else + { + // Otherwise, ensure the token is not null (use empty string if null) + $tokenToUse = $token ?? ''; + } + + // Load the content with the determined base and token + $api->load_($base, $tokenToUse); + } + /** * Set repository messages and errors based on given conditions. * @@ -584,7 +647,7 @@ abstract class Grep implements GrepInterface try { // load the base and token if set - $this->contents->load_($path->base ?? null, $path->token ?? null); + $this->loadApi($this->contents, $path->base ?? null, $path->token ?? null); $path->index = $this->contents->get($path->organisation, $path->repository, $this->getIndexPath(), $this->getBranchName($path)); } catch (\Exception $e) @@ -640,6 +703,12 @@ abstract class Grep implements GrepInterface if (isset($path->organisation) && strlen($path->organisation) > 1 && isset($path->repository) && strlen($path->repository) > 1) { + // resolve API if needed + if (!empty($path->base)) + { + $this->resolve->api($this->target ?? $path->repository, $path->base, $path->organisation, $path->repository); + } + // build the path $path->path = trim($path->organisation) . '/' . trim($path->repository); diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php index 903fd911c..a9456c601 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php @@ -12,6 +12,7 @@ namespace VDM\Joomla\Abstraction; +use Joomla\Registry\Factory as FormatFactory; use VDM\Joomla\Interfaces\Registryinterface; use VDM\Joomla\Abstraction\ActiveRegistry; @@ -21,18 +22,238 @@ use VDM\Joomla\Abstraction\ActiveRegistry; * * Don't use this beyond 10 dimensional depth for best performance. * - * @since 3.2.0 + * @since 3.2.0 + * @since 5.0.4 Joomla Registry Compatible */ -abstract class Registry extends ActiveRegistry implements Registryinterface +abstract class Registry extends ActiveRegistry implements Registryinterface, \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable { /** * Path separator * * @var string|null - * @since 3.2.0 + * @since 3.2.0 */ protected ?string $separator = '.'; + /** + * The name of the registry. + * + * @var string|null + * @since 5.0.4 + */ + protected ?string $name = null; + + /** + * Constructor. + * + * Initializes the Registry object with optional data. + * + * @param mixed $data Optional data to load into the registry. + * Can be an array, string, or object. + * @param string|null $separator The path separator, and empty string will flatten the registry. + * @since 5.0.4 + */ + public function __construct($data = null, ?string $separator = null) + { + // we don't allow null on initialization (default is a dot) + // so that all class inheritance can override the separator property + // use an empty string if you want to flatten the registry + if ($separator !== null) + { + $this->setSeparator($separator); + } + + if ($data !== null) + { + if (is_array($data)) + { + $this->loadArray($data); + } + elseif (is_string($data)) + { + $this->loadString($data); + } + elseif (is_object($data)) + { + $this->loadObject($data); + } + } + } + + /** + * Magic method to get a value from the registry. + * + * Allows for accessing registry data using object property syntax. + * + * @param string $name The name of the property to get. + * + * @return mixed The value of the property, or null if not found. + * @since 5.0.4 + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * Magic method to set a value in the registry. + * + * Allows for setting registry data using object property syntax. + * + * @param string $name The name of the property to set. + * @param mixed $value The value to set. + * + * @return void + * @since 5.0.4 + */ + public function __set($name, $value) + { + $this->set($name, $value); + } + + /** + * Magic method to check if a property is set in the registry. + * + * Allows for using isset() on registry properties. + * + * @param string $name The name of the property to check. + * + * @return bool True if the property is set, false otherwise. + * @since 5.0.4 + */ + public function __isset($name) + { + return $this->exists($name); + } + + /** + * Magic method to unset a property in the registry. + * + * Allows for using unset() on registry properties. + * + * @param string $name The name of the property to unset. + * + * @return void + * @since 5.0.4 + */ + public function __unset($name) + { + $this->remove($name); + } + + /** + * Magic method to clone the registry. + * + * Performs a deep copy of the registry data. + * + * @return void + * @since 5.0.4 + */ + public function __clone() + { + $this->active = unserialize(serialize($this->active)); + } + + /** + * Magic method to convert the registry to a string. + * + * Returns the registry data in JSON format. + * + * @return string The registry data in JSON format. + * @since 5.0.4 + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Loads data into the registry from a string using Joomla's format classes. + * + * @param string $data The data string to load. + * @param string $format The format of the data string. Supported formats: 'json', 'ini', 'xml', 'php'. + * @param array $options Options used by the formatter + * + * @return self + * @throws \InvalidArgumentException If the format is not supported. + * @since 5.0.4 + */ + public function loadString(string $data, string $format = 'JSON', array $options = []): self + { + // Load a string into the given namespace [or default namespace if not given] + $object = FormatFactory::getFormat($format, $options)->stringToObject($data, $options); + + // Merge the object into the registry + $this->loadObject($object); + + return $this; + } + + /** + * Loads data into the registry from an object. + * + * @param object $object The data object to load. + * + * @return self + * @since 5.0.4 + */ + public function loadObject(object $object): self + { + // Convert the object to an array + $array = $this->objectToArray($object); + + // Merge the array into the registry + $this->loadArray($array); + + return $this; + } + + /** + * Loads data into the registry from an array. + * + * The loaded data will be merged into the registry's existing data. + * + * @param array $array The array of data to load into the registry. + * + * @return self + * @since 5.0.4 + */ + public function loadArray(array $array): self + { + $this->active = $this->arrayMergeRecursive($this->active, $array); + return $this; + } + + /** + * Loads data into the registry from a file. + * + * @param string $path The path to the file to load. + * @param string $format The format of the file. Supported formats: 'json', 'ini', 'xml', 'php'. + * + * @return self + * @throws \InvalidArgumentException If the file does not exist or is not readable. + * @throws \RuntimeException If the file cannot be read. + * @since 5.0.4 + */ + public function loadFile(string $path, string $format = 'json'): self + { + if (!file_exists($path) || !is_readable($path)) + { + throw new \InvalidArgumentException("File does not exist or is not readable: {$path}"); + } + + $data = file_get_contents($path); + + if ($data === false) + { + throw new \RuntimeException("Failed to read file: {$path}"); + } + + $this->loadString($data, $format); + + return $this; + } + /** * Sets a value into the registry using multiple keys. * @@ -41,7 +262,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface * * @throws \InvalidArgumentException If any of the path values are not a number or string. * @return self - * @since 3.2.0 + * @since 3.2.0 */ public function set(string $path, $value): self { @@ -67,7 +288,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface * * @throws \InvalidArgumentException If any of the path values are not a number or string. * @return self - * @since 3.2.0 + * @since 3.2.0 */ public function add(string $path, $value, ?bool $asArray = null): self { @@ -89,9 +310,9 @@ abstract class Registry extends ActiveRegistry implements Registryinterface * * @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 + * @since 3.2.0 */ - public function get(string $path, $default = null) + public function get(string $path, $default = null): mixed { if (($keys = $this->getActiveKeys($path)) === null) { @@ -108,7 +329,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface * * @throws \InvalidArgumentException If any of the path values are not a number or string. * @return self - * @since 3.2.0 + * @since 3.2.0 */ public function remove(string $path): self { @@ -129,7 +350,7 @@ abstract class Registry extends ActiveRegistry implements Registryinterface * * @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 + * @since 3.2.0 */ public function exists(string $path): bool { @@ -141,13 +362,308 @@ abstract class Registry extends ActiveRegistry implements Registryinterface return $this->existsActive(...$keys); } + /** + * Specify data which should be serialized to JSON. + * + * @return mixed Data which can be serialized by json_encode(), + * which is a value of any type other than a resource. + * @since 5.0.4 + */ + public function jsonSerialize(): mixed + { + return $this->active; + } + + /** + * Count elements of the registry. + * + * @return int The number of elements in the registry. + * @since 5.0.4 + */ + public function count(): int + { + return count($this->active); + } + + /** + * Whether a given offset exists in the registry. + * + * @param mixed $offset An offset to check for. + * + * @return bool True if the offset exists, false otherwise. + * @since 5.0.4 + */ + public function offsetExists(mixed $offset): bool + { + if (!is_string($offset)) + { + return false; + } + return $this->exists($offset); + } + + /** + * Retrieve the value at a given offset. + * + * @param mixed $offset The offset to retrieve. + * + * @return mixed The value at the specified offset. + * @since 5.0.4 + */ + public function offsetGet(mixed $offset): mixed + { + if (!is_string($offset)) + { + return null; + } + return $this->get($offset); + } + + /** + * Set the value at a given offset. + * + * @param mixed $offset The offset to assign the value to. + * @param mixed $value The value to set. + * + * @return void + * @since 5.0.4 + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (!is_string($offset)) + { + return; + } + $this->set($offset, $value); + } + + /** + * Unset the value at a given offset. + * + * @param mixed $offset The offset to unset. + * + * @return void + * @since 5.0.4 + */ + public function offsetUnset(mixed $offset): void + { + if (!is_string($offset)) + { + return; + } + $this->remove($offset); + } + + /** + * Retrieve an external iterator for the registry. + * + * @return \Traversable An instance of an object implementing Iterator or Traversable. + * @since 5.0.4 + */ + public function getIterator(): \Traversable + { + return new \ArrayIterator($this->active); + } + + /** + * Get the registry data as an associative array. + * + * @return array The registry data. + * @since 5.0.4 + */ + public function toArray(): array + { + return $this->active; + } + + /** + * Get the registry data as an object. + * + * @return object The registry data converted to an object. + * @since 5.0.4 + */ + public function toObject() + { + return $this->arrayToObject($this->active); + } + + /** + * Converts the registry data to a string in the specified format. + * + * @param string $format The format to output the string in. Supported formats: 'json', 'ini', 'xml', 'php'. + * @param array $options Options used by the formatter. + * + * @return string The registry data in the specified format. + * + * @throws \InvalidArgumentException If the format is not supported. + * @since 5.0.4 + */ + public function toString(string $format = 'JSON', array $options = []): string + { + // Convert the internal array to an object + $object = $this->arrayToObject($this->active); + + return FormatFactory::getFormat($format, $options)->objectToString($object, $options); + } + + /** + * Flattens the registry data into a one-dimensional array. + * + * @param string|null $separator The separator for the key names. + * @param bool $full True to include the full path as keys. + * + * @return array The flattened data array. + * @since 5.0.4 + */ + public function flatten(?string $separator = null, bool $full = false): array + { + // we use default separator + if ($separator === null) + { + $separator = $this->separator; + } + + return $this->flattenArray($this->active, $separator, $full); + } + + /** + * Sets a default value if not already set. + * + * @param string $path The registry path (e.g., 'vdm.content.builder'). + * @param mixed $default The default value to set if the path does not exist. + * + * @return mixed The value of the path after the method call. + * @since 5.0.4 + */ + public function def(string $path, $default) + { + if (!$this->exists($path)) + { + $this->set($path, $default); + return $default; + } + return $this->get($path); + } + + /** + * Merges another registry into this one. + * + * The data from the source registry will be merged into this registry, + * overwriting any existing values with the same keys. + * + * @param Registryinterface $source The registry to merge with this one. + * + * @return self + * @since 5.0.4 + */ + public function merge(Registryinterface $source): self + { + $this->active = $this->arrayMergeRecursive($this->active, $source->toArray()); + return $this; + } + + /** + * Clears all data from the registry. + * + * @return self + * @since 5.0.4 + */ + public function clear(): self + { + $this->active = []; + return $this; + } + + /** + * Extracts a subset of the registry data based on a given path. + * + * @param string $path The registry path to extract. + * @param mixed $default Optional default value, returned if the path does not exist. + * @param string|null $separator The path separator. + * + * @return self A new Registry instance with the extracted data. + * @since 5.0.4 + */ + public function extract(string $path, $default = null, ?string $separator = null): self + { + $originalSeparator = $this->getSeparator(); + if ($separator !== null) + { + $this->setSeparator($separator); + } + + $data = $this->get($path, $default); + + if ($separator !== null) + { + $this->setSeparator($originalSeparator); + } + + $newRegistry = new static(); + + if ($data !== $default) + { + if (is_array($data)) + { + $newRegistry->loadArray($data); + } + else + { + $newRegistry->set('value', $data); + } + } + + return $newRegistry; + } + + /** + * Appends content into the registry. + * + * If a key exists, the value will be appended to the existing value. + * + * @param string $path The registry path (e.g., 'vdm.content.builder'). + * @param mixed $value The value to append. + * + * @return self + * @since 5.0.4 + */ + public function append(string $path, $value): self + { + return $this->add($path, $value, false); + } + + /** + * Gets the name of the registry. + * + * @return string|null The name of the registry. + * @since 5.0.4 + */ + public function getName(): ?string + { + return $this->name; + } + + /** + * Sets the name of the registry. + * + * @param string|null $name The name to set. + * + * @return self + * @since 5.0.4 + */ + public function setName(?string $name): self + { + $this->name = $name; + return $this; + } + /** * Sets a separator value * * @param string|null $value The value to set. * * @return self - * @since 3.2.0 + * @since 3.2.0 */ public function setSeparator(?string $value): self { @@ -156,13 +672,140 @@ abstract class Registry extends ActiveRegistry implements Registryinterface return $this; } + /** + * Gets the current path separator used in registry paths. + * + * @return string|null The path separator. + * @since 5.0.4 + */ + public function getSeparator(): ?string + { + return $this->separator; + } + + /** + * Recursively converts an array to an object. + * + * This method is used to convert the internal array data into an object + * structure suitable for serialization or other operations that require objects. + * + * @param mixed $data The data to convert. + * + * @return mixed The converted object, or the original data if not an array. + * @since 5.0.4 + */ + protected function arrayToObject($data) + { + if (is_array($data)) + { + $object = new \stdClass(); + foreach ($data as $key => $value) + { + // Handle numeric keys for object properties + if (is_numeric($key)) + { + $key = 'item' . $key; + } + $object->{$key} = $this->arrayToObject($value); + } + return $object; + } + else + { + return $data; + } + } + + /** + * Recursively converts an object to an array. + * + * This method is used to convert data loaded from formats that produce objects + * (e.g., JSON, XML) into an array structure for internal storage. + * + * @param mixed $data The data to convert. + * + * @return mixed The converted array, or the original data if not an object. + * @since 5.0.4 + */ + protected function objectToArray($data) + { + return json_decode(json_encode($data), true); + } + + /** + * Recursively merges two arrays. + * + * This method merges the elements of two arrays together so that the values of one + * are appended to the end of the previous one. It preserves numeric keys. + * + * @param array $array1 The array to merge into. + * @param array $array2 The array to merge from. + * + * @return array The merged array. + * @since 5.0.4 + */ + protected function arrayMergeRecursive(array $array1, array $array2): array + { + foreach ($array2 as $key => $value) + { + // If the value is an array and the key exists in both arrays, merge recursively + if (is_array($value) && isset($array1[$key]) && is_array($array1[$key])) + { + $array1[$key] = $this->arrayMergeRecursive($array1[$key], $value); + } + else + { + // Otherwise, replace or set the value + $array1[$key] = $value; + } + } + return $array1; + } + + /** + * Helper function to recursively flatten the array. + * + * @param array $array The array to flatten. + * @param string $separator The separator for the key names. + * @param bool $full True to include the full path as keys. + * @param array $flattened The flattened array (used internally for recursion). + * @param string $path The current path (used internally for recursion). + * + * @return array The flattened array. + * @since 5.0.4 + */ + protected function flattenArray(array $array, string $separator, bool $full, array $flattened = [], string $path = ''): array + { + foreach ($array as $key => $value) + { + if ($full) + { + $newPath = $path === '' ? $key : $path . $separator . $key; + } + else + { + $newPath = $key; + } + + if (is_array($value)) + { + $flattened = $this->flattenArray($value, $separator, $full, $flattened, $newPath); + } + else + { + $flattened[$newPath] = $value; + } + } + return $flattened; + } + /** * 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 + * @since 3.2.0 */ protected function getActiveKeys(string $path): ?array { diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/Count.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/PathCount.php similarity index 82% rename from libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/Count.php rename to libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/PathCount.php index 5584a9ffe..9d659547d 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/Count.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/PathCount.php @@ -13,11 +13,12 @@ namespace VDM\Joomla\Abstraction\Registry\Traits; /** - * Count Values + * Count Values in a Path * - * @since 3.2.0 + * @since 3.2.0 + * @since 5.0.2 name changed to PathCount to avoid collusion in core registry class */ -trait Count +trait PathCount { /** * Retrieves number of values (or sub-array) from the storage using multiple keys. @@ -28,7 +29,7 @@ trait Count * @return int The number of values * @since 3.2.0 */ - public function count(string $path): int + public function pathCount(string $path): int { if (($values = $this->get($path)) === null) { diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/ToString.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/PathToString.php similarity index 79% rename from libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/ToString.php rename to libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/PathToString.php index 285f7099d..de81af055 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/ToString.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry/Traits/PathToString.php @@ -13,11 +13,12 @@ namespace VDM\Joomla\Abstraction\Registry\Traits; /** - * To String Values + * Path To String Values * - * @since 3.2.0 + * @since 3.2.0 + * @since 5.0.2 name changed to PathToString to avoid collusion in core registry class */ -trait ToString +trait PathToString { /** * Convert an array of values to a string (or return string) @@ -26,9 +27,9 @@ trait ToString * @param string $seperator Return string separator * * @return string - * @since 3.2.0 + * @since 3.2.0 */ - public function toString(string $path, string $separator = ''): string + public function pathToString(string $path, string $separator = ''): string { // Return default value if path is empty if (empty($path)) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Remote/Set.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Remote/Set.php index 039a8d82f..5c9612221 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Remote/Set.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Remote/Set.php @@ -416,6 +416,8 @@ abstract class Set implements SetInterface $settings = $this->mergeIndexSettings($repoGuid, $settings); + $this->grep->loadApi($this->git, $repo->base ?? null, $repo->token ?? null); + $this->updateIndexMainFile( $repo, $this->getIndexSettingsPath(), @@ -429,6 +431,8 @@ abstract class Set implements SetInterface $this->mainReadme->get($settings), 'Update main readme file' ); + + $this->git->reset_(); } /** @@ -580,7 +584,7 @@ abstract class Set implements SetInterface $this->setRepoPlaceholders($repo); - $this->git->load_($repo->base ?? null, $repo->token ?? null); + $this->grep->loadApi($this->git, $repo->base ?? null, $repo->token ?? null); if (($existing = $this->grep->get($item->guid, ['remote'], $repo)) !== null) { diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/Api.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/Api.php new file mode 100644 index 000000000..9db072c2f --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/Api.php @@ -0,0 +1,67 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Abstraction; + + +use VDM\Joomla\Componentbuilder\Utilities\Http; +use VDM\Joomla\Componentbuilder\Utilities\Uri; +use VDM\Joomla\Componentbuilder\Utilities\Response; + + +/** + * The Joomla Component Builder Api + * + * @since 5.0.4 + */ +abstract class Api +{ + /** + * The Http Class. + * + * @var Http + * @since 5.0.4 + */ + protected Http $http; + + /** + * The Uri Class. + * + * @var Uri + * @since 5.0.4 + */ + protected Uri $uri; + + /** + * The Response Class. + * + * @var Response + * @since 5.0.4 + */ + protected Response $response; + + /** + * Constructor. + * + * @param Http $http The Http Class. + * @param Uri $uri The Uri Class. + * @param Response $response The Response Class. + * + * @since 5.0.4 + */ + public function __construct(Http $http, Uri $uri, Response $response) + { + $this->http = $http; + $this->uri = $uri; + $this->response = $response; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/ComponentConfig.php similarity index 81% rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php rename to libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/ComponentConfig.php index 0d4de7df8..d60509e2a 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/BaseConfig.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Abstraction/ComponentConfig.php @@ -17,18 +17,18 @@ use Joomla\CMS\Factory; use Joomla\Input\Input; use VDM\Joomla\Utilities\Component\Helper; use VDM\Joomla\Utilities\String\ClassfunctionHelper; -use VDM\Joomla\Abstraction\BaseConfig as ExtendingBaseConfig; +use VDM\Joomla\Abstraction\FunctionRegistry; /** - * Config + * Component Configurations * * @since 3.2.0 */ -abstract class BaseConfig extends ExtendingBaseConfig +abstract class ComponentConfig extends FunctionRegistry { /** - * Hold a JInput object for easier access to the input variables. + * Hold a Input object for easier access to the input variables. * * @var Input * @since 3.2.0 @@ -56,9 +56,6 @@ abstract class BaseConfig extends ExtendingBaseConfig { $this->input = $input ?: Factory::getApplication()->input; $this->params = $params ?: Helper::getParams('com_componentbuilder'); - - // run parent constructor - parent::__construct(); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Api/Network.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Api/Network.php new file mode 100644 index 000000000..995b81a39 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Api/Network.php @@ -0,0 +1,59 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Api; + + +use VDM\Joomla\Componentbuilder\Abstraction\Api; + + +/** + * The Joomla Component Builder Network Api + * + * @since 5.0.4 + */ +final class Network extends Api +{ + /** + * Get the network repository statuses + * + * @param string|null $target The target repositories. + * @param int|null $status The repository status. + * @param string $project The network project. (default: jcb) + * @param string $system The network system. (default: community) + * + * @return object|null The set of status values + * @since 5.0.4 + **/ + public function get(?string $target = null, ?int $status = null, string $project = 'jcb', string $system = 'community'): ?object + { + // Build the request path. + $path = "/network/{$system}/{$project}"; + + if (!empty($target)) + { + $path .= "/{$target}"; + } + + if (!empty($status)) + { + $path .= "/{$status}"; + } + + // Send the get request. + return $this->response->get( + $this->http->get( + $this->uri->get($path) + ) + ); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Api/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Api/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Api/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Adminview/Data.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Adminview/Data.php index 501266958..a390dd4a2 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Adminview/Data.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Adminview/Data.php @@ -47,6 +47,14 @@ use VDM\Joomla\Utilities\ArrayHelper; */ class Data { + /** + * The cache + * + * @var array + * @since 3.2.0 + */ + protected array $data; + /** * The Config Class. * diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/CustomFieldLinks.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/CustomFieldLinks.php index df81be489..a2bf2234d 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/CustomFieldLinks.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/CustomFieldLinks.php @@ -12,7 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Builder; -use VDM\Joomla\Abstraction\Registry\Traits\ToString; +use VDM\Joomla\Abstraction\Registry\Traits\PathToString; use VDM\Joomla\Interfaces\Registryinterface; use VDM\Joomla\Abstraction\Registry; @@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry; final class CustomFieldLinks extends Registry implements Registryinterface { /** - * To String Values + * Path To String Values * * @since 3.2.0 */ - use ToString; + use PathToString; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DynamicFields.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DynamicFields.php index df3982eb7..c3feed016 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DynamicFields.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DynamicFields.php @@ -12,7 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Builder; -use VDM\Joomla\Abstraction\Registry\Traits\ToString; +use VDM\Joomla\Abstraction\Registry\Traits\PathToString; use VDM\Joomla\Interfaces\Registryinterface; use VDM\Joomla\Abstraction\Registry; @@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry; final class DynamicFields extends Registry implements Registryinterface { /** - * To String Values + * Path To String Values * * @since 3.2.0 */ - use ToString; + use PathToString; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/HiddenFields.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/HiddenFields.php index bfef415f6..4f67dd7f6 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/HiddenFields.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/HiddenFields.php @@ -12,7 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Builder; -use VDM\Joomla\Abstraction\Registry\Traits\ToString; +use VDM\Joomla\Abstraction\Registry\Traits\PathToString; use VDM\Joomla\Interfaces\Registryinterface; use VDM\Joomla\Abstraction\Registry; @@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry; final class HiddenFields extends Registry implements Registryinterface { /** - * To String Values + * Path To String Values * * @since 3.2.0 */ - use ToString; + use PathToString; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/IntegerFields.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/IntegerFields.php index 37135aca4..4a6f20d0e 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/IntegerFields.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/IntegerFields.php @@ -12,7 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Builder; -use VDM\Joomla\Abstraction\Registry\Traits\ToString; +use VDM\Joomla\Abstraction\Registry\Traits\PathToString; use VDM\Joomla\Interfaces\Registryinterface; use VDM\Joomla\Abstraction\Registry; @@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry; final class IntegerFields extends Registry implements Registryinterface { /** - * To String Values + * Path To String Values * * @since 3.2.0 */ - use ToString; + use PathToString; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/Layout.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/Layout.php index cd5074bfe..cb3749492 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/Layout.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/Layout.php @@ -12,7 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Builder; -use VDM\Joomla\Abstraction\Registry\Traits\Count; +use VDM\Joomla\Abstraction\Registry\Traits\PathCount; use VDM\Joomla\Interfaces\Registryinterface; use VDM\Joomla\Abstraction\Registry; @@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry; final class Layout extends Registry implements Registryinterface { /** - * Count Values + * Path Count Values * * @since 3.2.0 */ - use Count; + use PathCount; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/NewPublishingFields.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/NewPublishingFields.php index c32d4dbd7..1ef80383c 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/NewPublishingFields.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/NewPublishingFields.php @@ -12,7 +12,7 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Builder; -use VDM\Joomla\Abstraction\Registry\Traits\Count; +use VDM\Joomla\Abstraction\Registry\Traits\PathCount; use VDM\Joomla\Interfaces\Registryinterface; use VDM\Joomla\Abstraction\Registry; @@ -25,10 +25,10 @@ use VDM\Joomla\Abstraction\Registry; final class NewPublishingFields extends Registry implements Registryinterface { /** - * Count Values + * Path Count Values * * @since 3.2.0 */ - use Count; + use PathCount; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php index 1c23e07f4..62cb53e62 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php @@ -18,7 +18,7 @@ use Joomla\Input\Input; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Utilities\RepoHelper; -use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; +use VDM\Joomla\Componentbuilder\Abstraction\ComponentConfig; /** @@ -32,7 +32,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; * * @since 3.2.0 */ -class Config extends BaseConfig +class Config extends ComponentConfig { /** * The Global Joomla Configuration diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Creator/Layout.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Creator/Layout.php index 77047ed28..2eccc9673 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Creator/Layout.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Creator/Layout.php @@ -139,7 +139,7 @@ final class Layout if ($this->layout->exists($nameSingleCode . '.' . $tabName . '.' . $field['alignment'] . '.' . $field['order_edit'])) { - $size = $this->layout->count($nameSingleCode . '.' . $tabName . '.' + $size = $this->layout->pathCount($nameSingleCode . '.' . $tabName . '.' . $field['alignment']) + 1; while ($this->layout->exists($nameSingleCode . '.' . $tabName . '.' . $field['alignment'] . '.' . $size)) @@ -168,7 +168,7 @@ final class Layout if ($this->newpublishingfields->exists($nameSingleCode . '.' . $field['alignment'] . '.' . $field['order_edit'])) { - $size = $this->newpublishingfields->count($nameSingleCode . '.' . + $size = $this->newpublishingfields->pathCount($nameSingleCode . '.' . $field['alignment']) + 1; while ($this->newpublishingfields->exists($nameSingleCode . '.' . $field['alignment'] . '.' . $size)) @@ -191,7 +191,7 @@ final class Layout if ($this->layout->exists($nameSingleCode . '.Details.' . $field['alignment'] . '.' . $field['order_edit'])) { - $size = $this->layout->count($nameSingleCode . '.Details.' + $size = $this->layout->pathCount($nameSingleCode . '.Details.' . $field['alignment']) + 1; while ($this->layout->exists($nameSingleCode . '.Details.' . $field['alignment'] . '.' . $size)) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php index 9184813d4..d3c799a6c 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php @@ -15,6 +15,8 @@ namespace VDM\Joomla\Componentbuilder\Compiler; use Joomla\DI\Container; use VDM\Joomla\Componentbuilder\Service\Crypt; use VDM\Joomla\Componentbuilder\Service\Server; +use VDM\Joomla\Componentbuilder\Service\Api; +use VDM\Joomla\Componentbuilder\Service\Network; use VDM\Joomla\Service\Database; use VDM\Joomla\Service\Model as BaseModel; use VDM\Joomla\Service\Data; @@ -124,6 +126,8 @@ abstract class Factory extends ExtendingFactory implements FactoryInterface return (new Container()) ->registerServiceProvider(new Crypt()) ->registerServiceProvider(new Server()) + ->registerServiceProvider(new Api()) + ->registerServiceProvider(new Network()) ->registerServiceProvider(new Database()) ->registerServiceProvider(new BaseModel()) ->registerServiceProvider(new Data()) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php index 4d02833fc..2e2762dec 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Field/JoomlaThree/InputButton.php @@ -181,7 +181,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) @@ -206,7 +206,7 @@ final class InputButton implements InputButtonInterface $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " get the return value."; $addButton[] = Indent::_(4) - . "\$_uri = (string) \Joomla\CMS\Uri\Uri::getInstance();"; + . "\$_uri = (string) Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance();"; $addButton[] = Indent::_(4) . "\$_return = urlencode(base64_encode(\$_uri));"; $addButton[] = Indent::_(4) . "//" . Line::_(__Line__, __Class__) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php index 4285ac524..e5e191d52 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php @@ -1510,7 +1510,7 @@ class Interpretation extends Fields . "protected static function loadArticleLink(\$id)"; $help[] = Indent::_(1) . "{"; $help[] = Indent::_(2) - . "return Uri::root() . 'index.php?option=com_content&view=article&id='.\$id.'&tmpl=component&layout=modal';"; + . "return Joomla__"."_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root() . 'index.php?option=com_content&view=article&id='.\$id.'&tmpl=component&layout=modal';"; $help[] = Indent::_(1) . "}"; $help[] = PHP_EOL . Indent::_(1) . "/**"; $help[] = Indent::_(1) . " * Get the Help Text Link."; @@ -1518,7 +1518,7 @@ class Interpretation extends Fields $help[] = Indent::_(1) . "protected static function loadHelpTextLink(\$id)"; $help[] = Indent::_(1) . "{"; - $help[] = Indent::_(2) . "\$token = Session::getFormToken();"; + $help[] = Indent::_(2) . "\$token = Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();"; $help[] = Indent::_(2) . "return 'index.php?option=com_" . CFactory::_('Config')->component_code_name . "&task=help.getText&id=' . (int) \$id . '&' . \$token . '=1';"; @@ -3216,7 +3216,7 @@ class Interpretation extends Fields $redirectMessage = Indent::_(3) . "//" . Line::_( __LINE__,__CLASS__ ) . " redirect away to the home page if no access allowed."; - $redirectString = 'Uri::root()'; + $redirectString = 'Joomla__'.'_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()'; } $accessCheck[] = PHP_EOL . Indent::_(2) . "//" . Line::_( __LINE__,__CLASS__ @@ -3398,7 +3398,7 @@ class Interpretation extends Fields } else { - $redirectString = 'Uri::root()'; + $redirectString = 'Joomla__'.'_eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()'; } $getItem .= PHP_EOL . Indent::_(1) . $tab . Indent::_(2) . "\$app->redirect(" . $redirectString . ");"; @@ -8549,10 +8549,10 @@ class Interpretation extends Fields ); $View = StringHelper::safe($view, 'F'); $maintext = CFactory::_('Compiler.Builder.Main.Text.Field')->get($view, 'null'); - $hiddenFields = CFactory::_('Compiler.Builder.Hidden.Fields')->toString($view, ''); - $dynamicfields = CFactory::_('Compiler.Builder.Dynamic.Fields')->toString($view, ','); - $intFields = CFactory::_('Compiler.Builder.Integer.Fields')->toString($view, ''); - $customfieldlinks = CFactory::_('Compiler.Builder.Custom.Field.Links')->toString($view, ''); + $hiddenFields = CFactory::_('Compiler.Builder.Hidden.Fields')->pathToString($view, ''); + $dynamicfields = CFactory::_('Compiler.Builder.Dynamic.Fields')->pathToString($view, ','); + $intFields = CFactory::_('Compiler.Builder.Integer.Fields')->pathToString($view, ''); + $customfieldlinks = CFactory::_('Compiler.Builder.Custom.Field.Links')->pathToString($view, ''); // build uninstall script for content types $this->uninstallScriptBuilder[$View] = 'com_' . $component . '.' . $view; $this->uninstallScriptContent[$view] = $view; @@ -10037,14 +10037,30 @@ class Interpretation extends Fields // check if default field was overwritten if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.created_by')) { - $db_ .= PHP_EOL . Indent::_(1) - . "`created_by` INT(10) unsigned NULL DEFAULT 0,"; + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + $db_ .= PHP_EOL . Indent::_(1) + . "`created_by` INT(10) unsigned NULL DEFAULT 0,"; + } + else + { + $db_ .= PHP_EOL . Indent::_(1) + . "`created_by` INT unsigned NULL,"; + } } // check if default field was overwritten if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.modified_by')) { - $db_ .= PHP_EOL . Indent::_(1) - . "`modified_by` INT(10) unsigned NULL DEFAULT 0,"; + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + $db_ .= PHP_EOL . Indent::_(1) + . "`modified_by` INT(10) unsigned NULL DEFAULT 0,"; + } + else + { + $db_ .= PHP_EOL . Indent::_(1) + . "`modified_by` INT unsigned,"; + } } // check if default field was overwritten if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.created')) @@ -10071,14 +10087,22 @@ class Interpretation extends Fields else { $db_ .= PHP_EOL . Indent::_(1) - . "`modified` DATETIME DEFAULT NULL,"; + . "`modified` DATETIME,"; } } // check if default field was overwritten if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.checked_out')) { - $db_ .= PHP_EOL . Indent::_(1) - . "`checked_out` int(11) unsigned NULL DEFAULT 0,"; + if (CFactory::_('Config')->get('joomla_version', 3) == 3) + { + $db_ .= PHP_EOL . Indent::_(1) + . "`checked_out` int(11) unsigned NULL DEFAULT 0,"; + } + else + { + $db_ .= PHP_EOL . Indent::_(1) + . "`checked_out` int unsigned,"; + } } // check if default field was overwritten if (!CFactory::_('Compiler.Builder.Field.Names')->isString($view . '.checked_out_time')) @@ -10091,7 +10115,7 @@ class Interpretation extends Fields else { $db_ .= PHP_EOL . Indent::_(1) - . "`checked_out_time` DATETIME DEFAULT NULL,"; + . "`checked_out_time` DATETIME,"; } } // check if default field was overwritten @@ -11077,9 +11101,9 @@ class Interpretation extends Fields $body .= PHP_EOL . Indent::_(2) . "\$userChkOut = Factory::getContainer()->"; $body .= PHP_EOL . Indent::_(3) - . "get(\Joomla\CMS\User\UserFactoryInterface::class)->"; + . "get(Joomla__"."_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->"; $body .= PHP_EOL . Indent::_(4) - . "loadUserById(\$item->checked_out);"; + . "loadUserById(\$item->checked_out ?? 0);"; } $body .= PHP_EOL . Indent::_(2) . "\$canDo = " . $Helper . "::getActions('" . $nameSingleCode . "',\$item,'" @@ -11560,8 +11584,8 @@ class Interpretation extends Fields else { return 'Factory::getContainer()->' - . 'get(\Joomla\CMS\User\UserFactoryInterface::class)->' - . 'loadUserById((int) $item->' . $item['code'] . ')->name'; + . 'get(Joomla__'.'_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->' + . 'loadUserById((int) $item->' . $item['code'] . ' ?? 0)->name'; } } // check if custom user @@ -11577,8 +11601,8 @@ class Interpretation extends Fields else { return 'Factory::getContainer()->' - . 'get(\Joomla\CMS\User\UserFactoryInterface::class)->' - . 'loadUserById((int) $item->' . $item['id_code'] . ')->name'; + . 'get(Joomla__'.'_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->' + . 'loadUserById((int) $item->' . $item['id_code'] . ' ?? 0)->name'; } } // check if translated value is used @@ -11598,8 +11622,8 @@ class Interpretation extends Fields else { return 'Factory::getContainer()->' - . 'get(\Joomla\CMS\User\UserFactoryInterface::class)->' - . 'loadUserById((int) $item->' . $item['code'] . ')->name'; + . 'get(Joomla__'.'_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->' + . 'loadUserById((int) $item->' . $item['code'] . ' ?? 0)->name'; } } elseif ($doNotEscape) @@ -13708,9 +13732,9 @@ class Interpretation extends Fields $body .= PHP_EOL . Indent::_(2) . "\$userChkOut = Factory::getContainer()->"; $body .= PHP_EOL . Indent::_(3) - . "get(\Joomla\CMS\User\UserFactoryInterface::class)->"; + . "get(Joomla__"."_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->"; $body .= PHP_EOL . Indent::_(4) - . "loadUserById(\$item->checked_out);"; + . "loadUserById(\$item->checked_out ?? 0);"; } $body .= PHP_EOL . Indent::_(2) . "\$canDo = " . $Helper . "::getActions('" . $nameSingleCode . "',\$item,'" @@ -14636,7 +14660,7 @@ class Interpretation extends Fields $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check for request forgeries"; $method[] = Indent::_(2) - . "Session::checkToken() or die(Text:" + . "Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or die(Text:" . ":_('JINVALID_TOKEN'));"; $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " check if export is allowed for this user."; @@ -14990,7 +15014,7 @@ class Interpretation extends Fields $method[] = Indent::_(1) . "{"; $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check for request forgeries"; - $method[] = Indent::_(2) . "Session::checkToken() or die(Text:" + $method[] = Indent::_(2) . "Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or die(Text:" . ":_('JINVALID_TOKEN'));"; $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " check if export is allowed for this user."; @@ -15058,7 +15082,7 @@ class Interpretation extends Fields $method[] = Indent::_(1) . "{"; $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check for request forgeries"; - $method[] = Indent::_(2) . "Session::checkToken() or die(Text:" + $method[] = Indent::_(2) . "Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or die(Text:" . ":_('JINVALID_TOKEN'));"; $method[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " check if import is allowed for this user."; @@ -17321,7 +17345,7 @@ class Interpretation extends Fields $fix .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Add Ajax Token"; $fix .= PHP_EOL . Indent::_(2) - . "\$this->getDocument()->addScriptDeclaration(\"var token = '\" . Session::getFormToken() . \"';\");"; + . "\$this->getDocument()->addScriptDeclaration(\"var token = '\" . Joomla__"."_5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken() . \"';\");"; } return $fix; @@ -17880,12 +17904,10 @@ class Interpretation extends Fields $function[] = Indent::_(5) . "Factory::getContainer()->"; $function[] = Indent::_(5) - . "get(\Joomla\CMS\User\UserFactoryInterface::class)->"; + . "get(Joomla__"."_c2980d12_c3ef_4e23_b4a2_e6af1f5900a9___Power::class)->"; $function[] = Indent::_(5) - . "loadUserById(\$" - . $filter['code'] . ")->name"; - $function[] = Indent::_(5) - . ");"; + . "loadUserById(\$" . $filter['code'] . " ?? 0)->name"; + $function[] = Indent::_(5) . ");"; } } else diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/Whmcs.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/Whmcs.php index 378ca8739..2569d4cff 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/Whmcs.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Model/Whmcs.php @@ -32,6 +32,11 @@ class Whmcs */ public function set(object &$item) { + if (!isset($item->add_license)) + { + return; + } + if (1 == $item->add_license && (!isset($item->whmcs_buy_link) || !StringHelper::check( diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php index d6c59643f..e8cac510a 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php @@ -101,6 +101,7 @@ class JoomlaPower implements ServiceProviderInterface { return new Grep( $container->get('Gitea.Repository.Contents'), + $container->get('Network.Resolve'), $container->get('Config')->approved_joomla_paths ); } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php index 48e58c91d..1aeedc294 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php @@ -129,6 +129,7 @@ class Power implements ServiceProviderInterface { return new Grep( $container->get('Gitea.Repository.Contents'), + $container->get('Network.Resolve'), $container->get('Config')->approved_paths, $container->get('Config')->local_powers_repository_path ); diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php index bf14861fc..5d1641ff7 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Utilities.php @@ -21,11 +21,14 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\FileInjector; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Paths; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Files; -use VDM\Joomla\Componentbuilder\Utilities\Constantpaths; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Dynamicpath; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Pathfix; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Structure; use VDM\Joomla\Componentbuilder\Compiler\Utilities\Xml; +use VDM\Joomla\Componentbuilder\Utilities\Constantpaths; +use VDM\Joomla\Componentbuilder\Utilities\Uri; +use VDM\Joomla\Componentbuilder\Utilities\Http; +use VDM\Joomla\Componentbuilder\Utilities\Response; /** @@ -41,7 +44,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return void - * @since 3.2.0 + * @since 3.2.0 */ public function register(Container $container) { @@ -63,9 +66,6 @@ class Utilities implements ServiceProviderInterface $container->alias(Files::class, 'Utilities.Files') ->share('Utilities.Files', [$this, 'getFiles'], true); - $container->alias(Constantpaths::class, 'Utilities.Constantpaths') - ->share('Utilities.Constantpaths', [$this, 'getConstantpaths'], true); - $container->alias(Dynamicpath::class, 'Utilities.Dynamicpath') ->share('Utilities.Dynamicpath', [$this, 'getDynamicpath'], true); @@ -77,6 +77,18 @@ class Utilities implements ServiceProviderInterface $container->alias(Xml::class, 'Utilities.Xml') ->share('Utilities.Xml', [$this, 'getXml'], true); + + $container->alias(Constantpaths::class, 'Utilities.Constantpaths') + ->share('Utilities.Constantpaths', [$this, 'getConstantpaths'], true); + + $container->alias(Uri::class, 'Utilities.Uri') + ->share('Utilities.Uri', [$this, 'getUri'], true); + + $container->alias(Http::class, 'Utilities.Http') + ->share('Utilities.Http', [$this, 'getHttp'], true); + + $container->alias(Response::class, 'Utilities.Response') + ->share('Utilities.Response', [$this, 'getResponse'], true); } /** @@ -85,7 +97,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return Folder - * @since 3.2.0 + * @since 3.2.0 */ public function getFolder(Container $container): Folder { @@ -101,7 +113,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return File - * @since 3.2.0 + * @since 3.2.0 */ public function getFile(Container $container): File { @@ -116,7 +128,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return FileInjector - * @since 3.2.0 + * @since 3.2.0 */ public function getFileInjector(Container $container): FileInjector { @@ -132,7 +144,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return Counter - * @since 3.2.0 + * @since 3.2.0 */ public function getCounter(Container $container): Counter { @@ -147,7 +159,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return Paths - * @since 3.2.0 + * @since 3.2.0 */ public function getPaths(Container $container): Paths { @@ -163,33 +175,20 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return Files - * @since 3.2.0 + * @since 3.2.0 */ public function getFiles(Container $container): Files { return new Files(); } - /** - * Get the Constant Paths - * - * @param Container $container The DI container. - * - * @return Constantpaths - * @since 3.2.0 - */ - public function getConstantpaths(Container $container): Constantpaths - { - return new Constantpaths(); - } - /** * Get the Compiler Dynamic Path * * @param Container $container The DI container. * * @return Dynamicpath - * @since 3.2.0 + * @since 3.2.0 */ public function getDynamicpath(Container $container): Dynamicpath { @@ -205,7 +204,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return Pathfix - * @since 3.2.0 + * @since 3.2.0 */ public function getPathfix(Container $container): Pathfix { @@ -218,7 +217,7 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return Structure - * @since 3.2.0 + * @since 3.2.0 */ public function getStructure(Container $container): Structure { @@ -238,13 +237,65 @@ class Utilities implements ServiceProviderInterface * @param Container $container The DI container. * * @return Xml - * @since 3.2.0 + * @since 3.2.0 */ public function getXml(Container $container): Xml { return new Xml( $container->get('Config') ); + } + + /** + * Get the Constant Paths + * + * @param Container $container The DI container. + * + * @return Constantpaths + * @since 3.2.0 + */ + public function getConstantpaths(Container $container): Constantpaths + { + return new Constantpaths(); + } + + /** + * Get The Uri Class. + * + * @param Container $container The DI container. + * + * @return Uri + * @since 5.0.4 + */ + public function getUri(Container $container): Uri + { + return new Uri(); + } + + /** + * Get The Http Class. + * + * @param Container $container The DI container. + * + * @return Http + * @since 5.0.4 + */ + public function getHttp(Container $container): Http + { + return new Http(); + } + + /** + * Get The Response Class. + * + * @param Container $container The DI container. + * + * @return Response + * @since 5.0.4 + */ + public function getResponse(Container $container): Response + { + return new Response(); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php index f4a710478..f92aa5cb9 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Utilities/Paths.php @@ -75,13 +75,13 @@ class Paths extends Registry /** * getting any valid paths * - * @param string $key The value's key/path name + * @param string $key The value's key/path name * * @return string The path found as a string * @since 3.2.0 * @throws \InvalidArgumentException If $key is not a valid function name. */ - public function __get(string $key): string + public function __get($key) { // check if it has been set if ($this->exists($key)) diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Config.php index d5a163fae..893c16265 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Config.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Config.php @@ -17,7 +17,7 @@ use Joomla\CMS\Factory as JoomlaFactory; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Utilities\RepoHelper; -use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; +use VDM\Joomla\Componentbuilder\Abstraction\ComponentConfig; /** @@ -31,7 +31,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; * * @since 5.0.3 */ -class Config extends BaseConfig +class Config extends ComponentConfig { /** * The Global Joomla Configuration diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Factory.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Factory.php index 7d5a35e53..120423a9a 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Factory.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Factory.php @@ -20,6 +20,9 @@ use VDM\Joomla\Service\Data; use VDM\Joomla\Componentbuilder\Service\Gitea; use VDM\Joomla\Componentbuilder\Power\Service\Gitea as GiteaPower; use VDM\Joomla\Gitea\Service\Utilities as GiteaUtilities; +use VDM\Joomla\Componentbuilder\Service\Api; +use VDM\Joomla\Componentbuilder\Service\Network; +use VDM\Joomla\Componentbuilder\Service\Utilities; use VDM\Joomla\Interfaces\FactoryInterface; use VDM\Joomla\Abstraction\Factory as ExtendingFactory; @@ -54,7 +57,10 @@ abstract class Factory extends ExtendingFactory implements FactoryInterface ->registerServiceProvider(new Data()) ->registerServiceProvider(new Gitea()) ->registerServiceProvider(new GiteaPower()) - ->registerServiceProvider(new GiteaUtilities()); + ->registerServiceProvider(new GiteaUtilities()) + ->registerServiceProvider(new Api()) + ->registerServiceProvider(new Network()) + ->registerServiceProvider(new Utilities()); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Grep.php index b0e1ac190..526e7d495 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Grep.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Grep.php @@ -29,6 +29,14 @@ use VDM\Joomla\Abstraction\Grep as ExtendingGrep; */ final class Grep extends ExtendingGrep implements GrepInterface { + /** + * The Grep target [network] + * + * @var string + * @since 5.0.4 + **/ + protected ?string $target = 'joomla-fieldtypes'; + /** * Order of global search * @@ -77,7 +85,7 @@ final class Grep extends ExtendingGrep implements GrepInterface $branch = $this->getBranchName($path); // load the base and token if set - $this->contents->load_($path->base ?? null, $path->token ?? null); + $this->loadApi($this->contents, $path->base ?? null, $path->token ?? null); // get the settings if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null && diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Service/Fieldtype.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Service/Fieldtype.php index 669f522c6..19873bbc4 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Service/Fieldtype.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Fieldtype/Service/Fieldtype.php @@ -100,6 +100,7 @@ class Fieldtype implements ServiceProviderInterface { return new Grep( $container->get('Gitea.Repository.Contents'), + $container->get('Network.Resolve'), $container->get('Config')->approved_joomla_paths ); } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php index a1d52bc50..64cd840ce 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php @@ -17,7 +17,7 @@ use Joomla\CMS\Factory as JoomlaFactory; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Utilities\RepoHelper; -use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; +use VDM\Joomla\Componentbuilder\Abstraction\ComponentConfig; /** @@ -31,7 +31,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; * * @since 3.2.0 */ -class Config extends BaseConfig +class Config extends ComponentConfig { /** * The Global Joomla Configuration diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Factory.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Factory.php index 0ced36851..3b12dcaf3 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Factory.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Factory.php @@ -20,6 +20,9 @@ use VDM\Joomla\Service\Data; use VDM\Joomla\Componentbuilder\Service\Gitea; use VDM\Joomla\Componentbuilder\Power\Service\Gitea as GiteaPower; use VDM\Joomla\Gitea\Service\Utilities as GiteaUtilities; +use VDM\Joomla\Componentbuilder\Service\Network; +use VDM\Joomla\Componentbuilder\Service\Api; +use VDM\Joomla\Componentbuilder\Service\Utilities; use VDM\Joomla\Interfaces\FactoryInterface; use VDM\Joomla\Abstraction\Factory as ExtendingFactory; @@ -54,7 +57,10 @@ abstract class Factory extends ExtendingFactory implements FactoryInterface ->registerServiceProvider(new Data()) ->registerServiceProvider(new Gitea()) ->registerServiceProvider(new GiteaPower()) - ->registerServiceProvider(new GiteaUtilities()); + ->registerServiceProvider(new GiteaUtilities()) + ->registerServiceProvider(new Network()) + ->registerServiceProvider(new Api()) + ->registerServiceProvider(new Utilities()); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php index ec51d2d63..9256b9451 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php @@ -29,6 +29,14 @@ use VDM\Joomla\Abstraction\Grep as ExtendingGrep; */ final class Grep extends ExtendingGrep implements GrepInterface { + /** + * The Grep target [network] + * + * @var string + * @since 5.0.4 + **/ + protected ?string $target = 'joomla-powers'; + /** * Order of global search * @@ -77,7 +85,7 @@ final class Grep extends ExtendingGrep implements GrepInterface $branch = $this->getBranchName($path); // load the base and token if set - $this->contents->load_($path->base ?? null, $path->token ?? null); + $this->loadApi($this->contents, $path->base ?? null, $path->token ?? null); // get the settings if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null && diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php index aadc6da79..f048c0970 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php @@ -100,6 +100,7 @@ class JoomlaPower implements ServiceProviderInterface { return new Grep( $container->get('Gitea.Repository.Contents'), + $container->get('Network.Resolve'), $container->get('Config')->approved_joomla_paths ); } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Core.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Core.php new file mode 100644 index 000000000..e6d58ac1e --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Core.php @@ -0,0 +1,33 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Network; + + +use VDM\Joomla\Abstraction\Registry; + + +/** + * The Network Core + * + * @since 5.0.4 + */ +final class Core extends Registry +{ + /** + * Path separator + * + * @var string|null + * @since 3.2.0 + */ + protected ?string $separator = '|'; +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/ParsedUrls.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/ParsedUrls.php new file mode 100644 index 000000000..92915a4fa --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/ParsedUrls.php @@ -0,0 +1,33 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Network; + + +use VDM\Joomla\Abstraction\Registry; + + +/** + * The Network Parsed Urls + * + * @since 5.0.4 + */ +final class ParsedUrls extends Registry +{ + /** + * Path separator + * + * @var string|null + * @since 3.2.0 + */ + protected ?string $separator = '|'; +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Resolve.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Resolve.php new file mode 100644 index 000000000..fec698935 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Resolve.php @@ -0,0 +1,178 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Network; + + +use Joomla\CMS\Log\Log; +use VDM\Joomla\Componentbuilder\Network\Url; +use VDM\Joomla\Componentbuilder\Network\Status; + + +/** + * The Network Resolver + * + * @since 5.0.4 + */ +final class Resolve +{ + /** + * The Url Class. + * + * @var Url + * @since 5.0.4 + */ + protected Url $url; + + /** + * The Status Class. + * + * @var Status + * @since 5.0.4 + */ + protected Status $status; + + /** + * Constructor. + * + * @param Url $url The Url Class. + * @param Status $status The Status Class. + * + * @since 5.0.4 + */ + public function __construct(Url $url, Status $status) + { + $this->url = $url; + $this->status = $status; + } + + /** + * Resolves the API for a repository if it is part of the core network. + * + * This method attempts to verify the status of the API and resolve an active URL if the current one is inactive. + * + * @param string $target The target network. + * @param string &$domain The API base domain (passed by reference). + * @param string &$organisation The repository organisation (passed by reference). + * @param string &$repository The repository name (passed by reference). + * + * @return void + * @since 5.0.4 + */ + public function api(string $target, string &$domain, string &$organisation, string &$repository): void + { + try { + // Check the status of the current API + $status = $this->status->get($target, $domain, $repository, $organisation); + + // If the API is inactive, attempt to find another active URL + if ($status == 0) + { + $this->resolve($target, $domain, $organisation, $repository); + } + } catch (\Exception $e) { + // ignore any none [in]active urls + $this->logError($e, 'Failed to resolve API status.'); + } + } + + /** + * Resolves an active API URL if the current API is inactive. + * + * Updates the `$domain`, `$organisation`, and `$repository` parameters to point to an active API URL. + * + * @param string $target The target network. + * @param string &$domain The API base domain (passed by reference). + * @param string &$organisation The repository organisation (passed by reference). + * @param string &$repository The repository name (passed by reference). + * + * @return void + * @since 5.0.4 + */ + private function resolve(string $target, string &$domain, string &$organisation, string &$repository): void + { + $activeRepo = $this->active($target); + + if ($activeRepo === null) { + // No active API found, log or handle this case as needed + throw new \Exception('No active API found for the target: ' . $target); + } + + try { + // Parse the active repository's URL and update the references + $parsedUrl = $this->url->parse($activeRepo->url); + + $noneActiveDomain = "{$domain}/{$organisation}/{$repository}"; + $activeDomain = "{$parsedUrl->scheme}://{$parsedUrl->domain}/{$parsedUrl->organisation}/{$parsedUrl->repository}"; + + // update the values passed by reference + $domain = $parsedUrl->scheme . '://' . $parsedUrl->domain; + $organisation = $parsedUrl->organisation ?? $organisation; + $repository = $parsedUrl->repository ?? $repository; + + // add info + $this->logInfo("Resolved [{$noneActiveDomain}] to [{$activeDomain}]"); + } catch (\Exception $e) { + // ignore any none [in]active urls + $this->logError($e, 'Failed to parse active repository URL.'); + } + } + + /** + * Retrieves a random active repository target, excluding the specified domain. + * + * @param string $target The target network. + * + * @return object|null The randomly selected active repository, or null if none found. + * @since 5.0.4 + */ + private function active(string $target): ?object + { + try { + $activeRepo = $this->status->active($target); + } catch (\Exception $e) { + // ignore any none [in]active urls + $this->logError($e, "Failed to get an [{$target}] active repository."); + } + + return $activeRepo; + } + + /** + * Logs an info custom message. + * + * @param string $message A custom message to include with the log entry. + * + * @return void + * @since 5.0.4 + */ + private function logInfo(string $message): void + { + Log::add($message, Log::INFO, 'jcb-network-resolve'); + } + + /** + * Logs an error with a custom message. + * + * This method is a placeholder for your actual logging mechanism. + * + * @param \Exception $exception The exception to log. + * @param string $message A custom message to include with the log entry. + * + * @return void + * @since 5.0.4 + */ + private function logError(\Exception $exception, string $message): void + { + Log::add($message . ' Exception: ' . $exception->getMessage(), Log::ERROR, 'jcb-network-resolve'); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Status.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Status.php new file mode 100644 index 000000000..e95c0d947 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Status.php @@ -0,0 +1,258 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Network; + + +use VDM\Joomla\Componentbuilder\Api\Network; +use VDM\Joomla\Componentbuilder\Network\Core; +use VDM\Joomla\Componentbuilder\Network\Url; + + +/** + * The Network Status + * + * @since 5.0.4 + */ +final class Status +{ + /** + * The Network Class. + * + * @var Network + * @since 5.0.4 + */ + protected Network $network; + + /** + * The Core Class. + * + * @var Core + * @since 5.0.4 + */ + protected Core $core; + + /** + * The Url Class. + * + * @var Url + * @since 5.0.4 + */ + protected Url $url; + + /** + * Constructor. + * + * @param Network $network The Network Class. + * @param Core $core The Core Class. + * @param Url $url The Url Class. + * + * @since 5.0.4 + */ + public function __construct(Network $network, Core $core, Url $url) + { + $this->network = $network; + $this->core = $core; + $this->url = $url; + } + + /** + * Retrieves the status for the given network target, utilizing caching via the Core registry. + * + * @param string $target The target network. + * @param string $domain The domain to retrieve [example: codeberg.org]. + * @param string $repository The repository name. + * @param string $organization The target repository organization. (default: joomla) + * + * @return int Will return 1 if active, 0 if not, and -1 if not part of the core. + * + * @since 5.0.4 + */ + public function get(string $target, string $domain, string $repository, string $organization = 'joomla'): int + { + try { + $repo = $this->network($target, $domain, $organization, $repository); + + if ($repo === null) + { + // Domain not found in the network data + return -1; + } + + // Check if the repository is active + if (isset($repo->status) && is_numeric($repo->status)) + { + return (int) $repo->status; + } + else + { + // 'status' property not found or not numeric + return -1; + } + } + catch (\Exception $e) + { + // In case of any exception, return -1 + return -1; + } + } + + /** + * Retrieves a random active repository target, excluding the specified domain. + * + * @param string $target The target network name. + * @param array|null $excludeDomains The domain to exclude [default: ['git.vdm.dev']]. + * + * @return object|null The randomly selected active repository, or null if none found. + * @since 5.0.4 + */ + public function active(string $target, ?array $excludeDomains = ['git.vdm.dev']): ?object + { + try { + // Get the network data for the target + $data = $this->network($target); + + // Filter active repositories excluding the specified domain + $activeRepos = array_filter($data->network, function ($repo) use ($excludeDomains) { + $parsed = $this->url->parse($repo->url); + return isset($repo->status) && + $repo->status == 1 && + !in_array($parsed->domain, $excludeDomains); + }); + + // Reindex the array to ensure array_rand works correctly + $activeRepos = array_values($activeRepos); + + // If there are active repositories, select one at random + if (!empty($activeRepos)) + { + return $activeRepos[array_rand($activeRepos)]; + } + else + { + // No active repositories found excluding the specified domain + return null; + } + } + catch (\Exception $e) + { + // In case of any exception, return null + return null; + } + } + + /** + * Retrieves the data for the given network target, utilizing caching via the Core registry. + * + * If the data for the target is already cached in the Core registry, it returns that data. + * Otherwise, it fetches the data from the Network, caches it, and returns it. + * + * @param string $target The target network name. + * @param string|null $domain The domain to retrieve [example: codeberg.org]. + * @param string|null $organization The target repository organization. + * @param string|null $repository The repository name. + * + * @return object|null The data retrieved for the target. + * @throws \Exception If an error occurs during the network call or if the result contains an 'error' key. + * @since 5.0.4 + */ + public function network(string $target, ?string $domain = null, ?string $organization = null, ?string $repository = null): ?object + { + $networkData = $this->fetchNetworkData($target); + + if ($domain !== null) + { + return $this->getDomainData($networkData->network, $domain, $organization, $repository); + } + + return $networkData; + } + + /** + * Retrieves the data filtered by domain, organization, and optionally repository. + * + * @param array $network The network data array. + * @param string $domain The domain to filter by. + * @param string|null $organization The organization to filter by. + * @param string|null $repository The repository to filter by. + * + * @return object|null The filtered data, or null if no match is found. + * @since 5.0.4 + */ + private function getDomainData(array $network, string $domain, ?string $organization = null, ?string $repository = null): ?object + { + $domainBase = $this->url->base($domain); + + foreach ($network as $repo) + { + $parsedUrl = $this->url->parse($repo->url); + + if ($parsedUrl->domain === $domainBase) + { + if ($organization !== null && $parsedUrl->organization !== $organization) + { + continue; + } + + if ($repository !== null && $parsedUrl->repository !== $repository) + { + continue; + } + + return $repo; + } + } + + return null; + } + + /** + * Fetches and caches the network data for a given target. + * + * @param string $target The target network name. + * + * @return object The cached or freshly fetched network data. + * @throws \Exception If an error occurs during the network call. + * @since 5.0.4 + */ + private function fetchNetworkData(string $target): object + { + // Check if data is cached + if (($cachedData = $this->core->get($target)) !== null) + { + return $cachedData; + } + + try { + // Fetch data from the network + $networkData = $this->network->get($target); + } catch (\Exception $e) { + throw new \Exception('Network error: ' . $e->getMessage(), 0, $e); + } + + // Validate the fetched data + if (!is_object($networkData) || !property_exists($networkData, 'network')) + { + throw new \Exception('Invalid network data: Missing "network" property.'); + } + + if (property_exists($networkData, 'error')) + { + throw new \Exception('Network error: ' . $networkData->error); + } + + // Cache the result + $this->core->set($target, $networkData); + + return $networkData; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Url.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Url.php new file mode 100644 index 000000000..c40ea7a4a --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/Url.php @@ -0,0 +1,237 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Network; + + +use VDM\Joomla\Componentbuilder\Network\ParsedUrls; + + +/** + * The Network Url + * + * @since 5.0.4 + */ +final class Url +{ + /** + * The ParsedUrls Class. + * + * @var ParsedUrls + * @since 5.0.4 + */ + protected ParsedUrls $parsedurls; + + /** + * Constructor. + * + * @param ParsedUrls $parsedurls The ParsedUrls Class. + * + * @since 5.0.4 + */ + public function __construct(ParsedUrls $parsedurls) + { + $this->parsedurls = $parsedurls; + } + + /** + * Parses a URL and extracts the domain, organization, and repository. + * + * This method takes a URL of the format 'https://[domain]/[organization]/[repository]' + * and returns an associative array with keys 'domain', 'organization', and 'repository'. + * + * @param string $url The URL to parse. + * + * @return object An object with keys 'domain', 'organization', and 'repository'. + * @throws \InvalidArgumentException If the URL is invalid or lacks required components. + * @since 5.0.4 + */ + public function parse(string $url): object + { + // Check if the URL has already been parsed and is present in the cache + if (($parsed = $this->parsedurls->get($url)) !== null) + { + return (object) $parsed; + } + + // Validate the URL format + if (!filter_var($url, FILTER_VALIDATE_URL)) + { + throw new \InvalidArgumentException("Invalid URL format: $url"); + } + + // Parse the URL and extract its components + $parsedUrl = parse_url($url); + + if ($parsedUrl === false) + { + throw new \InvalidArgumentException("Invalid URL provided: $url"); + } + + // Ensure the URL contains a host (domain) + if (empty($parsedUrl['host'])) + { + throw new \InvalidArgumentException("The URL does not contain a valid domain: $url"); + } + $domain = $parsedUrl['host']; + + // Set the scheme + $scheme = $parsedUrl['scheme'] ?? 'https'; + + // Ensure the URL contains a path + if (empty($parsedUrl['path'])) + { + throw new \InvalidArgumentException("The URL does not contain a valid path: $url"); + } + + // Remove leading and trailing slashes from the path + $path = trim($parsedUrl['path'], '/'); + + // Split the path into components + $pathParts = explode('/', $path); + + // Ensure the path contains at least two components: organization and repository + if (count($pathParts) < 2) + { + throw new \InvalidArgumentException("The URL must contain both an organization and a repository: $url"); + } + + $organization = $pathParts[0]; + $repository = $pathParts[1]; + + // Create a new Parsed Url array + $parsed = [ + 'scheme' => $scheme, + 'domain' => $domain, + 'organization' => $organization, + 'repository' => $repository + ]; + + // Store the parsed URL in the cache + $this->parsedurls->set($url, $parsed); + + // Return the parsed URL object + return (object) $parsed; + } + + /** + * Extract the base domain from a given URL or domain string. + * + * @param string $url The input URL or domain string. + * + * @return string The core domain (e.g., domain.com). + * @since 5.0.4 + */ + public function base(string $url): string + { + // Parse the URL to extract host + $parsedUrl = parse_url($url, PHP_URL_HOST); + + // If no host is found, check if the input itself is a domain without protocol + if (!$parsedUrl) + { + $parsedUrl = $url; + } + + // Remove any trailing slashes or unnecessary characters + $parsedUrl = rtrim($parsedUrl, '/'); + + return $parsedUrl; + } + + /** + * Compares two URLs and checks if their domain and repository are the same. + * + * This method returns true if both the domain and repository are identical in both URLs. + * + * @param string $url1 The first URL to compare. + * @param string $url2 The second URL to compare. + * + * @return bool Returns true if the domain and repository are the same; false otherwise. + * @throws InvalidArgumentException If any of the URLs are invalid or lack required components. + * @since 5.0.4 + */ + public function equal(string $url1, string $url2): bool + { + return $this->compare($url1, $url2, ['domain', 'repository']); + } + + /** + * Compares two URLs strictly and checks if their domain, organization, and repository are the same. + * + * This method returns true if the domain, organization, and repository are identical in both URLs. + * + * @param string $url1 The first URL to compare. + * @param string $url2 The second URL to compare. + * + * @return bool Returns true if the domain, organization, and repository are the same; false otherwise. + * @throws \InvalidArgumentException If any of the URLs are invalid or lack required components. + * @since 5.0.4 + */ + public function equalStrict(string $url1, string $url2): bool + { + return $this->compare($url1, $url2, ['domain', 'organization', 'repository']); + } + + /** + * Compares two URLs and checks if their repositories are the same. + * + * This method returns true if the repository names are identical in both URLs, regardless of domain and organization. + * + * @param string $url1 The first URL to compare. + * @param string $url2 The second URL to compare. + * + * @return bool Returns true if the repositories are the same; false otherwise. + * @throws \InvalidArgumentException If any of the URLs are invalid or lack required components. + * @since 5.0.4 + */ + public function equalRepo(string $url1, string $url2): bool + { + return $this->compare($url1, $url2, ['repository']); + } + + /** + * Compares two URLs based on specified fields. + * + * This method allows you to compare specific components of two URLs, such as 'domain', + * 'organization', and 'repository'. It returns true if all specified fields are equal. + * + * @param string $url1 The first URL to compare. + * @param string $url2 The second URL to compare. + * @param string[] $fields The fields to compare ('domain', 'organization', 'repository'). + * + * @return bool Returns true if all specified fields are equal; false otherwise. + * @throws \InvalidArgumentException If any of the URLs are invalid or lack required components, + * or if an invalid field is specified. + * @since 5.0.4 + */ + private function compare(string $url1, string $url2, array $fields): bool + { + $parsedUrl1 = $this->parse($url1); + $parsedUrl2 = $this->parse($url2); + + foreach ($fields as $field) + { + if (!property_exists($parsedUrl1, $field) || !property_exists($parsedUrl2, $field)) + { + throw new \InvalidArgumentException("Invalid field specified for comparison: $field"); + } + + if ($parsedUrl1->$field !== $parsedUrl2->$field) + { + return false; + } + } + + return true; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Network/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php index d5e624373..75a4ef9e5 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php @@ -18,7 +18,7 @@ use Joomla\Input\Input; use VDM\Joomla\Utilities\GetHelper; use VDM\Joomla\Utilities\StringHelper; use VDM\Joomla\Componentbuilder\Utilities\RepoHelper; -use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; +use VDM\Joomla\Componentbuilder\Abstraction\ComponentConfig; /** @@ -32,7 +32,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig; * * @since 3.2.0 */ -class Config extends BaseConfig +class Config extends ComponentConfig { /** * The Global Joomla Configuration diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Factory.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Factory.php index cea2a0533..ad63834dc 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Factory.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Factory.php @@ -21,6 +21,9 @@ use VDM\Joomla\Componentbuilder\Power\Service\Generator; use VDM\Joomla\Componentbuilder\Service\Gitea; use VDM\Joomla\Componentbuilder\Power\Service\Gitea as GiteaPower; use VDM\Joomla\Gitea\Service\Utilities as GiteaUtilities; +use VDM\Joomla\Componentbuilder\Service\Network; +use VDM\Joomla\Componentbuilder\Service\Api; +use VDM\Joomla\Componentbuilder\Service\Utilities; use VDM\Joomla\Interfaces\FactoryInterface; use VDM\Joomla\Abstraction\Factory as ExtendingFactory; @@ -56,7 +59,10 @@ abstract class Factory extends ExtendingFactory implements FactoryInterface ->registerServiceProvider(new Generator()) ->registerServiceProvider(new Gitea()) ->registerServiceProvider(new GiteaPower()) - ->registerServiceProvider(new GiteaUtilities()); + ->registerServiceProvider(new GiteaUtilities()) + ->registerServiceProvider(new Api()) + ->registerServiceProvider(new Network()) + ->registerServiceProvider(new Utilities()); } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php index 2b93cdd96..53ad47581 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php @@ -131,7 +131,7 @@ final class Grep extends ExtendingGrep implements GrepInterface $branch = $this->getBranchName($path); // load the base and token if set - $this->contents->load_($path->base ?? null, $path->token ?? null); + $this->loadApi($this->contents, $path->base ?? null, $path->token ?? null); // get the settings if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->settings, $branch)) !== null && diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php index 2763c2ff3..e58446ff1 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php @@ -108,6 +108,7 @@ class Power implements ServiceProviderInterface { return new Grep( $container->get('Gitea.Repository.Contents'), + $container->get('Network.Resolve'), $container->get('Config')->approved_paths, $container->get('Config')->local_powers_repository_path ); diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php index ecb35d9d0..c4c0dcc54 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Search/Config.php @@ -14,7 +14,7 @@ namespace VDM\Joomla\Componentbuilder\Search; use Joomla\CMS\Factory; use Joomla\Input\Input; -use VDM\Joomla\Abstraction\BaseConfig; +use VDM\Joomla\Abstraction\FunctionRegistry; /** @@ -22,7 +22,7 @@ use VDM\Joomla\Abstraction\BaseConfig; * * @since 3.2.0 */ -class Config extends BaseConfig +class Config extends FunctionRegistry { /** * Hold a JInput object for easier access to the input variables. @@ -43,9 +43,6 @@ class Config extends BaseConfig public function __construct(?Input $input = null) { $this->input = $input ?: Factory::getApplication()->input; - - // run parent constructor - parent::__construct(); } /** @@ -200,7 +197,6 @@ class Config extends BaseConfig protected function getMarkerend(): string { return ']=' . '|' . '+}'; - } - + } } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Api.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Api.php new file mode 100644 index 000000000..116557531 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Api.php @@ -0,0 +1,58 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Api\Network; + + +/** + * The Joomla Component Builder Api Service + * + * @since 5.0.4 + */ +class Api implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 5.0.4 + */ + public function register(Container $container) + { + $container->alias(Network::class, 'Api.Network') + ->share('Api.Network', [$this, 'getNetwork'], true); + } + + /** + * Get The Network Class. + * + * @param Container $container The DI container. + * + * @return Network + * @since 5.0.4 + */ + public function getNetwork(Container $container): Network + { + return new Network( + $container->get('Utilities.Http'), + $container->get('Utilities.Uri'), + $container->get('Utilities.Response') + ); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Network.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Network.php new file mode 100644 index 000000000..815fa06d9 --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Network.php @@ -0,0 +1,131 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Network\Resolve; +use VDM\Joomla\Componentbuilder\Network\Status; +use VDM\Joomla\Componentbuilder\Network\Url; +use VDM\Joomla\Componentbuilder\Network\Core; +use VDM\Joomla\Componentbuilder\Network\ParsedUrls; + + +/** + * The Joomla Component Builder Network Service + * + * @since 5.0.4 + */ +class Network implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 5.0.4 + */ + public function register(Container $container) + { + $container->alias(Resolve::class, 'Network.Resolve') + ->share('Network.Resolve', [$this, 'getResolve'], true); + + $container->alias(Status::class, 'Network.Status') + ->share('Network.Status', [$this, 'getStatus'], true); + + $container->alias(Url::class, 'Network.Url') + ->share('Network.Url', [$this, 'getUrl'], true); + + $container->alias(Core::class, 'Network.Core') + ->share('Network.Core', [$this, 'getCore'], true); + + $container->alias(ParsedUrls::class, 'Network.Parsed.Urls') + ->share('Network.Parsed.Urls', [$this, 'getParsedUrls'], true); + } + + /** + * Get The Resolve Class. + * + * @param Container $container The DI container. + * + * @return Resolve + * @since 5.0.4 + */ + public function getResolve(Container $container): Resolve + { + return new Resolve( + $container->get('Network.Url'), + $container->get('Network.Status') + ); + } + + /** + * Get The Status Class. + * + * @param Container $container The DI container. + * + * @return Status + * @since 5.0.4 + */ + public function getStatus(Container $container): Status + { + return new Status( + $container->get('Api.Network'), + $container->get('Network.Core'), + $container->get('Network.Url') + ); + } + + /** + * Get The Url Class. + * + * @param Container $container The DI container. + * + * @return Url + * @since 5.0.4 + */ + public function getUrl(Container $container): Url + { + return new Url( + $container->get('Network.Parsed.Urls') + ); + } + + /** + * Get The Core Class. + * + * @param Container $container The DI container. + * + * @return Core + * @since 5.0.4 + */ + public function getCore(Container $container): Core + { + return new Core(); + } + + /** + * Get The ParsedUrls Class. + * + * @param Container $container The DI container. + * + * @return ParsedUrls + * @since 5.0.4 + */ + public function getParsedUrls(Container $container): ParsedUrls + { + return new ParsedUrls(); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Utilities.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Utilities.php new file mode 100644 index 000000000..40842c24d --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Utilities.php @@ -0,0 +1,88 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Service; + + +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use VDM\Joomla\Componentbuilder\Utilities\Uri; +use VDM\Joomla\Componentbuilder\Utilities\Http; +use VDM\Joomla\Componentbuilder\Utilities\Response; + + +/** + * The Joomla Component Builder Utilities Service + * + * @since 5.0.4 + */ +class Utilities implements ServiceProviderInterface +{ + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return void + * @since 5.0.4 + */ + public function register(Container $container) + { + $container->alias(Uri::class, 'Utilities.Uri') + ->share('Utilities.Uri', [$this, 'getUri'], true); + + $container->alias(Http::class, 'Utilities.Http') + ->share('Utilities.Http', [$this, 'getHttp'], true); + + $container->alias(Response::class, 'Utilities.Response') + ->share('Utilities.Response', [$this, 'getResponse'], true); + } + + /** + * Get The Uri Class. + * + * @param Container $container The DI container. + * + * @return Uri + * @since 5.0.4 + */ + public function getUri(Container $container): Uri + { + return new Uri(); + } + + /** + * Get The Http Class. + * + * @param Container $container The DI container. + * + * @return Http + * @since 5.0.4 + */ + public function getHttp(Container $container): Http + { + return new Http(); + } + + /** + * Get The Response Class. + * + * @param Container $container The DI container. + * + * @return Response + * @since 5.0.4 + */ + public function getResponse(Container $container): Response + { + return new Response(); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php index 6e4222d2c..12b96ae5e 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php @@ -109,8 +109,8 @@ final class Table extends BaseTable implements TableInterface 'tab_name' => 'publishing', 'db' => [ 'type' => 'DATETIME', - 'default' => '0000-00-00 00:00:00', - 'null_switch' => 'NOT NULL', + 'default' => 'CURRENT_TIMESTAMP', + 'null_switch' => 'NULL', 'unique_key' => false, 'key' => false, ], @@ -1626,8 +1626,8 @@ final class Table extends BaseTable implements TableInterface 'tab_name' => 'publishing', 'db' => [ 'type' => 'DATETIME', - 'default' => '0000-00-00 00:00:00', - 'null_switch' => 'NOT NULL', + 'default' => 'EMPTY', + 'null_switch' => 'NULL', 'unique_key' => false, 'key' => false, ], diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Http.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Http.php new file mode 100644 index 000000000..4c84ccabd --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Http.php @@ -0,0 +1,49 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Utilities; + + +use Joomla\CMS\Http\Http as JoomlaHttp; +use Joomla\Registry\Registry; + + + +/** + * The Joomla Component Builder Http + * + * @since 5.0.4 + */ +final class Http extends JoomlaHttp +{ + /** + * Constructor. + * + * @since 5.0.4 + * @throws \InvalidArgumentException + **/ + public function __construct() + { + // setup config + $config = [ + 'userAgent' => 'JCB/5.0', + 'headers' => [ + 'Content-Type' => 'application/json' + ] + ]; + + $options = new Registry($config); + + // run parent constructor + parent::__construct($options); + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Response.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Response.php new file mode 100644 index 000000000..b44ec9e9d --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Response.php @@ -0,0 +1,125 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Utilities; + + +use Joomla\CMS\Http\Response as JoomlaResponse; +use VDM\Joomla\Utilities\JsonHelper; +use VDM\Joomla\Utilities\StringHelper; + + +/** + * The Response + * + * @since 2.0.1 + */ +final class Response +{ + /** + * Process the response and decode it. + * + * @param JoomlaResponse $response The response. + * @param integer $expectedCode The expected "good" code. + * @param mixed $default The default if body not have length + * + * @return mixed + * + * @since 2.0.1 + * @throws \DomainException + **/ + public function get($response, int $expectedCode = 200, $default = null) + { + // Validate the response code. + if ($response->code != $expectedCode) + { + // Decode the error response and throw an exception. + $message = $this->error($response); + + // Throw an exception with the error message and code. + throw new \DomainException($message, $response->code); + } + + return $this->getBody($response, $default); + } + + /** + * Return the body from the response + * + * @param JoomlaResponse $response The response. + * @param mixed $default The default if body not have length + * + * @return mixed + * @since 2.0.1 + **/ + protected function getBody($response, $default = null) + { + $body = $response->body ?? null; + // check that we have a body + if (StringHelper::check($body)) + { + // if it's JSON, decode it + if (JsonHelper::check($body)) + { + return json_decode((string) $body); + } + + // if it's XML, convert it to an object + libxml_use_internal_errors(true); + $xml = simplexml_load_string($body); + if ($xml !== false) + { + return $xml; + } + + // if it's neither JSON nor XML, return as is + return $body; + } + + return $default; + } + + /** + * Get the error message from the System API response + * + * @param JoomlaResponse $response The response. + * + * @return string + * @since 2.0.1 + **/ + protected function error($response): string + { + $body = $response->body ?? null; + // do we have a json string + if (JsonHelper::check($body)) + { + $error = json_decode($body); + } + else + { + return 'Invalid or empty response body.'; + } + + // check if system returned an error object + if (isset($error->Error)) + { + // error object found, extract message and code + $errorMessage = isset($error->Error->Message) ? $error->Error->Message : 'Unknown error.'; + $errorCode = isset($error->Error->Code) ? $error->Error->Code : 'Unknown error code.'; + + // return formatted error message + return 'Error: ' . $errorMessage . ' Code: ' . $errorCode; + } + + return 'No error information found in response.'; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Uri.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Uri.php new file mode 100644 index 000000000..4837402bc --- /dev/null +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/Uri.php @@ -0,0 +1,127 @@ + + * @git 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 VDM\Joomla\Componentbuilder\Utilities; + + +use Joomla\Uri\Uri as JoomlaUri; + + +/** + * The Joomla Component Builder Uri + * + * @since 5.0.4 + */ +final class Uri +{ + /** + * The api version + * + * @var string + * @since 3.2.0 + */ + private string $version; + + /** + * The api URL + * + * @var string + * @since 3.2.0 + */ + private string $url; + + /** + * Constructor + * + * @param string $url URL to the api system + * example: https://api.joomlacomponentbuilder.com + * @param string $endpoint Endpoint to the gitea system + * @param string $version Version to the gitea system + * + * @since 3.2.0 + **/ + public function __construct( + string $url = 'https://api.joomlacomponentbuilder.com', + string $version = 'v1') + { + // set the API details + $this->setUrl($url); + $this->setVersion($version); + } + + /** + * Method to build and return a full request URL for the request. This method will + * add appropriate pagination details if necessary and also prepend the API url + * to have a complete URL for the request. + * + * @param string $path URL to inflect + * + * @return JoomlaUri + * @since 3.2.0 + **/ + public function get(string $path): JoomlaUri + { + // Get a new Uri object focusing the api url and given path. + $uri = new JoomlaUri($this->api() . $path); + + return $uri; + } + + /** + * Get the full API URL + * + * @return string + * @since 3.2.0 + **/ + public function api(): string + { + return $this->url . '/' . $this->version; + } + + /** + * Set the URL of the API + * + * @param string $url URL to your gitea system + * example: https://api.joomlacomponentbuilder.com + * + * @return void + * @since 3.2.0 + **/ + public function setUrl(string $url) + { + $this->url = $url; + } + + /** + * Get the URL of the API + * + * @return string|null + * @since 3.2.0 + **/ + public function getUrl(): ?string + { + return $this->url ?? null; + } + + /** + * Set the version of the API + * + * @param string $version version to your gitea API + * + * @return void + * @since 3.2.0 + **/ + private function setVersion($version) + { + $this->version = $version; + } +} + diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/GrepInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/GrepInterface.php index d3199d52e..013f7f01a 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/GrepInterface.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/GrepInterface.php @@ -12,6 +12,9 @@ namespace VDM\Joomla\Interfaces; +use VDM\Joomla\Interfaces\Git\ApiInterface as Api; + + /** * Global Resource Empowerment Platform * @@ -77,6 +80,22 @@ interface GrepInterface * @return object|null * @since 3.2.2 */ - public function getRemoteIndex(string $guid): ?object; + public function getRemoteIndex(string $guid): ?object; + + /** + * Loads API config using the provided base URL and token. + * + * This method checks if the base URL contains 'https://git.vdm.dev/'. + * If it does, it uses the token as is (which may be null). + * If not, it ensures the token is not null by defaulting to an empty string. + * + * @param Api $api The api object with a load_ method. + * @param string|null $base The base URL path. + * @param string|null $token The token for authentication (can be null). + * + * @return void + * @since 5.0.4 + */ + public function loadApi(Api $api, ?string $base, ?string $token): void; } diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php index 58aae26a2..272dedfb3 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php @@ -18,10 +18,128 @@ use VDM\Joomla\Interfaces\Activeregistryinterface; /** * The Registry Interface * - * @since 3.2.0 + * @since 3.2.0 + * @since 5.0.4 Joomla Registry Compatible */ interface Registryinterface extends Activeregistryinterface { + /** + * Magic method to get a value from the registry. + * + * Allows for accessing registry data using object property syntax. + * + * @param string $name The name of the property to get. + * + * @return mixed The value of the property, or null if not found. + * @since 5.0.4 + */ + public function __get($name); + + /** + * Magic method to set a value in the registry. + * + * Allows for setting registry data using object property syntax. + * + * @param string $name The name of the property to set. + * @param mixed $value The value to set. + * + * @return void + * @since 5.0.4 + */ + public function __set($name, $value); + + /** + * Magic method to check if a property is set in the registry. + * + * Allows for using isset() on registry properties. + * + * @param string $name The name of the property to check. + * + * @return bool True if the property is set, false otherwise. + * @since 5.0.4 + */ + public function __isset($name); + + /** + * Magic method to unset a property in the registry. + * + * Allows for using unset() on registry properties. + * + * @param string $name The name of the property to unset. + * + * @return void + * @since 5.0.4 + */ + public function __unset($name); + + /** + * Magic method to clone the registry. + * + * Performs a deep copy of the registry data. + * + * @return void + * @since 5.0.4 + */ + public function __clone(); + + /** + * Magic method to convert the registry to a string. + * + * Returns the registry data in JSON format. + * + * @return string The registry data in JSON format. + * @since 5.0.4 + */ + public function __toString(); + + /** + * Loads data into the registry from a string using Joomla's format classes. + * + * @param string $data The data string to load. + * @param string $format The format of the data string. Supported formats: 'json', 'ini', 'xml', 'php'. + * @param array $options Options used by the formatter + * + * @return self + * @throws \InvalidArgumentException If the format is not supported. + * @since 5.0.4 + */ + public function loadString(string $data, string $format = 'JSON', array $options = []): self; + + /** + * Loads data into the registry from an object. + * + * @param object $object The data object to load. + * + * @return self + * @since 5.0.4 + */ + public function loadObject(object $object): self; + + /** + * Loads data into the registry from an array. + * + * The loaded data will be merged into the registry's existing data. + * + * @param array $array The array of data to load into the registry. + * + * @return self + * @since 5.0.4 + */ + public function loadArray(array $array): self; + + /** + * Loads data into the registry from a file. + * + * @param string $path The path to the file to load. + * @param string $format The format of the file. Supported formats: 'json', 'ini', 'xml', 'php'. + * + * @return self + * @throws \InvalidArgumentException If the file does not exist or is not readable. + * @throws \RuntimeException If the file cannot be read. + * @since 5.0.4 + */ + public function loadFile(string $path, string $format = 'json'): self; + /** * Sets a value into the registry using multiple keys. * @@ -30,7 +148,7 @@ interface Registryinterface extends Activeregistryinterface * * @throws \InvalidArgumentException If any of the path values are not a number or string. * @return self - * @since 3.2.0 + * @since 3.2.0 */ public function set(string $path, $value): self; @@ -46,7 +164,7 @@ interface Registryinterface extends Activeregistryinterface * * @throws \InvalidArgumentException If any of the path values are not a number or string. * @return self - * @since 3.2.0 + * @since 3.2.0 */ public function add(string $path, $value, ?bool $asArray = null): self; @@ -58,9 +176,9 @@ interface Registryinterface extends Activeregistryinterface * * @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 + * @since 3.2.0 */ - public function get(string $path, $default = null); + public function get(string $path, $default = null): mixed; /** * Removes a value (or sub-array) from the registry using multiple keys. @@ -69,7 +187,7 @@ interface Registryinterface extends Activeregistryinterface * * @throws \InvalidArgumentException If any of the path values are not a number or string. * @return self - * @since 3.2.0 + * @since 3.2.0 */ public function remove(string $path): self; @@ -80,18 +198,207 @@ interface Registryinterface extends Activeregistryinterface * * @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 + * @since 3.2.0 */ public function exists(string $path): bool; + /** + * Specify data which should be serialized to JSON. + * + * @return mixed Data which can be serialized by json_encode(), + * which is a value of any type other than a resource. + * @since 5.0.4 + */ + public function jsonSerialize(): mixed; + + /** + * Count elements of the registry. + * + * @return int The number of elements in the registry. + * @since 5.0.4 + */ + public function count(): int; + + /** + * Whether a given offset exists in the registry. + * + * @param mixed $offset An offset to check for. + * + * @return bool True if the offset exists, false otherwise. + * @since 5.0.4 + */ + public function offsetExists(mixed $offset): bool; + + /** + * Retrieve the value at a given offset. + * + * @param mixed $offset The offset to retrieve. + * + * @return mixed The value at the specified offset. + * @since 5.0.4 + */ + public function offsetGet(mixed $offset): mixed; + + /** + * Set the value at a given offset. + * + * @param mixed $offset The offset to assign the value to. + * @param mixed $value The value to set. + * + * @return void + * @since 5.0.4 + */ + public function offsetSet(mixed $offset, mixed $value): void; + + /** + * Unset the value at a given offset. + * + * @param mixed $offset The offset to unset. + * + * @return void + * @since 5.0.4 + */ + public function offsetUnset(mixed $offset): void; + + /** + * Retrieve an external iterator for the registry. + * + * @return \Traversable An instance of an object implementing Iterator or Traversable. + * @since 5.0.4 + */ + public function getIterator(): \Traversable; + + /** + * Get the registry data as an associative array. + * + * @return array The registry data. + * @since 5.0.4 + */ + public function toArray(): array; + + /** + * Get the registry data as an object. + * + * @return object The registry data converted to an object. + * @since 5.0.4 + */ + public function toObject(); + + /** + * Converts the registry data to a string in the specified format. + * + * @param string $format The format to output the string in. Supported formats: 'json', 'ini', 'xml', 'php'. + * @param array $options Options used by the formatter. + * + * @return string The registry data in the specified format. + * + * @throws \InvalidArgumentException If the format is not supported. + * @since 5.0.4 + */ + public function toString(string $format = 'JSON', array $options = []): string; + + /** + * Flattens the registry data into a one-dimensional array. + * + * @param string|null $separator The separator for the key names. + * @param bool $full True to include the full path as keys. + * + * @return array The flattened data array. + * @since 5.0.4 + */ + public function flatten(?string $separator = null, bool $full = false): array; + + /** + * Sets a default value if not already set. + * + * @param string $path The registry path (e.g., 'vdm.content.builder'). + * @param mixed $default The default value to set if the path does not exist. + * + * @return mixed The value of the path after the method call. + * @since 5.0.4 + */ + public function def(string $path, $default); + + /** + * Merges another registry into this one. + * + * The data from the source registry will be merged into this registry, + * overwriting any existing values with the same keys. + * + * @param Registryinterface $source The registry to merge with this one. + * + * @return self + * @since 5.0.4 + */ + public function merge(Registryinterface $source): self; + + /** + * Clears all data from the registry. + * + * @return self + * @since 5.0.4 + */ + public function clear(): self; + + /** + * Extracts a subset of the registry data based on a given path. + * + * @param string $path The registry path to extract. + * @param mixed $default Optional default value, returned if the path does not exist. + * @param string|null $separator The path separator. + * + * @return self A new Registry instance with the extracted data. + * @since 5.0.4 + */ + public function extract(string $path, $default = null, ?string $separator = null): self; + + /** + * Appends content into the registry. + * + * If a key exists, the value will be appended to the existing value. + * + * @param string $path The registry path (e.g., 'vdm.content.builder'). + * @param mixed $value The value to append. + * + * @return self + * @since 5.0.4 + */ + public function append(string $path, $value): self; + + /** + * Gets the name of the registry. + * + * @return string|null The name of the registry. + * @since 5.0.4 + */ + public function getName(): ?string; + + /** + * Sets the name of the registry. + * + * @param string|null $name The name to set. + * + * @return self + * @since 5.0.4 + */ + public function setName(?string $name): self; + /** * Sets a separator value * * @param string|null $value The value to set. * * @return self - * @since 3.2.0 + * @since 3.2.0 */ - public function setSeparator(?string $value): self; + public function setSeparator(?string $value): self; + + /** + * Gets the current path separator used in registry paths. + * + * @return string|null The path separator. + * @since 5.0.4 + */ + public function getSeparator(): ?string; }