diff --git a/CHANGELOG.md b/CHANGELOG.md
index cacbbac48..4859f5382 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,14 +1,17 @@
-# v5.0.1-alpha4
+# v5.0.1-alpha5
-- Change the extendsinterfaces field to allow null, #1139
-- Update the Schema class to also update null mismatching if needed
+- Add repositories for better integration with gitea
+- Refactored the Data classes
+- Add new Data classes
# v5.0.1-alpha
- Fix auto build from SQL in Joomla 5.
- Fix permission issue for admin views.
- Add in JCB gitea push feature to help maintain JCB core features.
-- Add extending options to interfaces.
+- Add extending options to interfaces.
+- Change the extendsinterfaces field to allow null, #1139
+- Update the Schema class to also update null mismatching if needed
# v5.0.0
diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php
index 9b5113b12..f06024a41 100644
--- a/ComponentbuilderInstallerScript.php
+++ b/ComponentbuilderInstallerScript.php
@@ -264,6 +264,9 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Remove Server Data
$this->removeViewData("com_componentbuilder.server");
+ // Remove Repository Data
+ $this->removeViewData("com_componentbuilder.repository");
+
// Remove Help document Data
$this->removeViewData("com_componentbuilder.help_document");
@@ -423,6 +426,9 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Remove Server from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.server');
+ // Remove Repository from action logs config table.
+ $this->removeActionLogConfig('com_componentbuilder.repository');
+
// Remove Help_document from action logs config table.
$this->removeActionLogConfig('com_componentbuilder.help_document');
@@ -617,11 +623,11 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
- '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_site_event","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_site_event":"php_site_event","component_version":"component_version","php_admin_event":"php_admin_event","crowdin_username":"crowdin_username","php_preflight_install":"php_preflight_install","remove_line_breaks":"remove_line_breaks","description":"description","php_method_uninstall":"php_method_uninstall","debug_linenr":"debug_linenr","mvc_versiondate":"mvc_versiondate","css_admin":"css_admin","addreadme":"addreadme","php_postflight_install":"php_postflight_install","add_placeholders":"add_placeholders","sql":"sql","author":"author","update_server_url":"update_server_url","email":"email","add_backup_folder_path":"add_backup_folder_path","website":"website","translation_tool":"translation_tool","add_license":"add_license","buildcompsql":"buildcompsql","license_type":"license_type","php_helper_admin":"php_helper_admin","php_helper_site":"php_helper_site","whmcs_key":"whmcs_key","javascript":"javascript","whmcs_url":"whmcs_url","css_site":"css_site","whmcs_buy_link":"whmcs_buy_link","license":"license","php_preflight_update":"php_preflight_update","bom":"bom","php_postflight_update":"php_postflight_update","image":"image","php_method_install":"php_method_install","copyright":"copyright","sql_uninstall":"sql_uninstall","preferred_joomla_version":"preferred_joomla_version","add_powers":"add_powers","add_sales_server":"add_sales_server","backup_folder_path":"backup_folder_path","add_jcb_powers_path":"add_jcb_powers_path","crowdin_project_identifier":"crowdin_project_identifier","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_namespace_prefix":"add_namespace_prefix","add_javascript":"add_javascript","namespace_prefix":"namespace_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","add_menu_prefix":"add_menu_prefix","dashboard_type":"dashboard_type","menu_prefix":"menu_prefix","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","toignore":"toignore","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","export_key":"export_key","add_php_method_install":"add_php_method_install","joomla_source_link":"joomla_source_link","add_sql":"add_sql","export_buy_link":"export_buy_link","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","add_update_server":"add_update_server","emptycontributors":"emptycontributors","update_server_target":"update_server_target","number":"number","update_server":"update_server","sales_server":"sales_server","add_git_folder_path":"add_git_folder_path","git_folder_path":"git_folder_path","jcb_powers_path":"jcb_powers_path","creatuserhelper":"creatuserhelper","adduikit":"adduikit","crowdin_project_api_key":"crowdin_project_api_key","addfootable":"addfootable","crowdin_account_api_key":"crowdin_account_api_key","add_email_helper":"add_email_helper","buildcomp":"buildcomp","add_php_helper_both":"add_php_helper_both","guid":"guid","php_helper_both":"php_helper_both","name":"name"}}',
+ '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_postflight_update","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","crowdin_project_identifier":"crowdin_project_identifier","backup_folder_path":"backup_folder_path","sql_uninstall":"sql_uninstall","php_postflight_update":"php_postflight_update","css_site":"css_site","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_helper_site":"php_helper_site","javascript":"javascript","description":"description","debug_linenr":"debug_linenr","author":"author","php_method_install":"php_method_install","email":"email","website":"website","add_sales_server":"add_sales_server","license":"license","add_jcb_powers_path":"add_jcb_powers_path","bom":"bom","image":"image","php_admin_event":"php_admin_event","copyright":"copyright","php_site_event":"php_site_event","css_admin":"css_admin","php_preflight_update":"php_preflight_update","component_version":"component_version","php_preflight_install":"php_preflight_install","preferred_joomla_version":"preferred_joomla_version","php_postflight_install":"php_postflight_install","add_powers":"add_powers","php_method_uninstall":"php_method_uninstall","sql":"sql","addreadme":"addreadme","update_server_url":"update_server_url","add_backup_folder_path":"add_backup_folder_path","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_namespace_prefix":"add_namespace_prefix","namespace_prefix":"namespace_prefix","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_menu_prefix":"add_menu_prefix","add_javascript":"add_javascript","menu_prefix":"menu_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","dashboard_type":"dashboard_type","toignore":"toignore","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","joomla_source_link":"joomla_source_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_php_method_install":"add_php_method_install","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","assets_table_fix":"assets_table_fix","number":"number","readme":"readme","add_update_server":"add_update_server","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","creatuserhelper":"creatuserhelper","add_git_folder_path":"add_git_folder_path","adduikit":"adduikit","git_folder_path":"git_folder_path","addfootable":"addfootable","jcb_powers_path":"jcb_powers_path","add_email_helper":"add_email_helper","add_php_helper_both":"add_php_helper_both","crowdin_project_api_key":"crowdin_project_api_key","php_helper_both":"php_helper_both","crowdin_account_api_key":"crowdin_account_api_key","add_php_helper_admin":"add_php_helper_admin","buildcomp":"buildcomp","php_helper_admin":"php_helper_admin","guid":"guid","add_admin_event":"add_admin_event","name":"name"}}',
// router
'',
// contentHistoryOptions
- '{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","remove_line_breaks","debug_linenr","mvc_versiondate","addreadme","add_placeholders","add_backup_folder_path","translation_tool","add_license","license_type","preferred_joomla_version","add_powers","add_sales_server","add_jcb_powers_path","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","add_sql","add_sql_uninstall","assets_table_fix","add_update_server","emptycontributors","update_server_target","number","update_server","sales_server","add_git_folder_path","creatuserhelper","adduikit","addfootable","add_email_helper","buildcomp","add_php_helper_both"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
+ '{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","mvc_versiondate","remove_line_breaks","add_placeholders","debug_linenr","add_sales_server","add_jcb_powers_path","preferred_joomla_version","add_powers","addreadme","add_backup_folder_path","translation_tool","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","add_sql","add_sql_uninstall","emptycontributors","assets_table_fix","number","add_update_server","update_server_target","update_server","sales_server","creatuserhelper","add_git_folder_path","adduikit","addfootable","add_email_helper","add_php_helper_both","add_php_helper_admin","buildcomp","add_admin_event"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
);
// Install Joomla module Content Types.
$this->setContentType(
@@ -923,7 +929,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
- '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "css_views","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","on_save_model_field":"on_save_model_field","initiator_on_get_model":"initiator_on_get_model","initiator_on_save_model":"initiator_on_save_model","xml":"xml","datalenght":"datalenght","css_views":"css_views","css_view":"css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","on_get_model_field":"on_get_model_field","javascript_view_footer":"javascript_view_footer","javascript_views_footer":"javascript_views_footer","add_css_view":"add_css_view","add_css_views":"add_css_views","add_javascript_view_footer":"add_javascript_view_footer","add_javascript_views_footer":"add_javascript_views_footer","guid":"guid"}}',
+ '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "javascript_view_footer","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","on_get_model_field":"on_get_model_field","on_save_model_field":"on_save_model_field","initiator_on_get_model":"initiator_on_get_model","xml":"xml","datalenght":"datalenght","javascript_view_footer":"javascript_view_footer","css_views":"css_views","css_view":"css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","javascript_views_footer":"javascript_views_footer","add_css_view":"add_css_view","add_css_views":"add_css_views","add_javascript_view_footer":"add_javascript_view_footer","add_javascript_views_footer":"add_javascript_views_footer","initiator_on_save_model":"initiator_on_save_model","guid":"guid"}}',
// router
'',
// contentHistoryOptions
@@ -1031,6 +1037,23 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/server.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","protocol","authentication"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
);
+ // Install Repository Content Types.
+ $this->setContentType(
+ // typeTitle
+ 'Componentbuilder Repository',
+ // typeAlias
+ 'com_componentbuilder.repository',
+ // table
+ '{"special": {"dbtable": "#__componentbuilder_repository","key": "id","type": "RepositoryTable","prefix": "VDM\Component\Componentbuilder\Administrator\Table"}}',
+ // rules
+ '',
+ // fieldMappings
+ '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","organisation":"organisation","repository":"repository","target":"target","type":"type","base":"base","guid":"guid","access_repo":"access_repo","write_branch":"write_branch","read_branch":"read_branch","token":"token","username":"username"}}',
+ // router
+ '',
+ // contentHistoryOptions
+ '{"formFile": "administrator/components/com_componentbuilder/forms/repository.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","target","type","access_repo"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
+ );
// Install Help document Content Types.
$this->setContentType(
// typeTitle
@@ -1493,10 +1516,10 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Fix the assets table rules column size.
- $this->setDatabaseAssetsRulesFix(93920, "MEDIUMTEXT");
+ $this->setDatabaseAssetsRulesFix(96000, "MEDIUMTEXT");
// Install the global extension params.
$this->setExtensionsParams(
- '{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","approved_paths":"default","add_custom_gitea_url":"1","custom_gitea_url":"https://git.vdm.dev","super_powers_core_organisation":"joomla","super_powers_core":"joomla/super-powers","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"»","namespace_prefix":"JCB","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","import_guid_only":"1","export_language_strings":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}'
+ '{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"»","namespace_prefix":"JCB","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","import_guid_only":"1","export_language_strings":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}'
);
@@ -1879,6 +1902,22 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
'COM_COMPONENTBUILDER'
);
+ // Add Repository to the action logs config table.
+ $this->setActionLogConfig(
+ // typeTitle
+ 'REPOSITORY',
+ // typeAlias
+ 'com_componentbuilder.repository',
+ // idHolder
+ 'id',
+ // titleHolder
+ 'system_name',
+ // tableName
+ '#__componentbuilder_repository',
+ // textPrefix
+ 'COM_COMPONENTBUILDER'
+ );
+
// Add Help_document to the action logs config table.
$this->setActionLogConfig(
// typeTitle
@@ -2327,11 +2366,11 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
- '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_site_event","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","php_site_event":"php_site_event","component_version":"component_version","php_admin_event":"php_admin_event","crowdin_username":"crowdin_username","php_preflight_install":"php_preflight_install","remove_line_breaks":"remove_line_breaks","description":"description","php_method_uninstall":"php_method_uninstall","debug_linenr":"debug_linenr","mvc_versiondate":"mvc_versiondate","css_admin":"css_admin","addreadme":"addreadme","php_postflight_install":"php_postflight_install","add_placeholders":"add_placeholders","sql":"sql","author":"author","update_server_url":"update_server_url","email":"email","add_backup_folder_path":"add_backup_folder_path","website":"website","translation_tool":"translation_tool","add_license":"add_license","buildcompsql":"buildcompsql","license_type":"license_type","php_helper_admin":"php_helper_admin","php_helper_site":"php_helper_site","whmcs_key":"whmcs_key","javascript":"javascript","whmcs_url":"whmcs_url","css_site":"css_site","whmcs_buy_link":"whmcs_buy_link","license":"license","php_preflight_update":"php_preflight_update","bom":"bom","php_postflight_update":"php_postflight_update","image":"image","php_method_install":"php_method_install","copyright":"copyright","sql_uninstall":"sql_uninstall","preferred_joomla_version":"preferred_joomla_version","add_powers":"add_powers","add_sales_server":"add_sales_server","backup_folder_path":"backup_folder_path","add_jcb_powers_path":"add_jcb_powers_path","crowdin_project_identifier":"crowdin_project_identifier","add_php_helper_admin":"add_php_helper_admin","add_admin_event":"add_admin_event","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_namespace_prefix":"add_namespace_prefix","add_javascript":"add_javascript","namespace_prefix":"namespace_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","add_menu_prefix":"add_menu_prefix","dashboard_type":"dashboard_type","menu_prefix":"menu_prefix","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","toignore":"toignore","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","export_key":"export_key","add_php_method_install":"add_php_method_install","joomla_source_link":"joomla_source_link","add_sql":"add_sql","export_buy_link":"export_buy_link","add_sql_uninstall":"add_sql_uninstall","assets_table_fix":"assets_table_fix","readme":"readme","add_update_server":"add_update_server","emptycontributors":"emptycontributors","update_server_target":"update_server_target","number":"number","update_server":"update_server","sales_server":"sales_server","add_git_folder_path":"add_git_folder_path","git_folder_path":"git_folder_path","jcb_powers_path":"jcb_powers_path","creatuserhelper":"creatuserhelper","adduikit":"adduikit","crowdin_project_api_key":"crowdin_project_api_key","addfootable":"addfootable","crowdin_account_api_key":"crowdin_account_api_key","add_email_helper":"add_email_helper","buildcomp":"buildcomp","add_php_helper_both":"add_php_helper_both","guid":"guid","php_helper_both":"php_helper_both","name":"name"}}',
+ '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_postflight_update","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "metadata","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "metakey","core_metadesc": "metadesc","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_code":"name_code","short_description":"short_description","companyname":"companyname","crowdin_project_identifier":"crowdin_project_identifier","backup_folder_path":"backup_folder_path","sql_uninstall":"sql_uninstall","php_postflight_update":"php_postflight_update","css_site":"css_site","mvc_versiondate":"mvc_versiondate","remove_line_breaks":"remove_line_breaks","add_placeholders":"add_placeholders","php_helper_site":"php_helper_site","javascript":"javascript","description":"description","debug_linenr":"debug_linenr","author":"author","php_method_install":"php_method_install","email":"email","website":"website","add_sales_server":"add_sales_server","license":"license","add_jcb_powers_path":"add_jcb_powers_path","bom":"bom","image":"image","php_admin_event":"php_admin_event","copyright":"copyright","php_site_event":"php_site_event","css_admin":"css_admin","php_preflight_update":"php_preflight_update","component_version":"component_version","php_preflight_install":"php_preflight_install","preferred_joomla_version":"preferred_joomla_version","php_postflight_install":"php_postflight_install","add_powers":"add_powers","php_method_uninstall":"php_method_uninstall","sql":"sql","addreadme":"addreadme","update_server_url":"update_server_url","add_backup_folder_path":"add_backup_folder_path","translation_tool":"translation_tool","crowdin_username":"crowdin_username","buildcompsql":"buildcompsql","add_namespace_prefix":"add_namespace_prefix","namespace_prefix":"namespace_prefix","add_php_helper_site":"add_php_helper_site","add_site_event":"add_site_event","add_menu_prefix":"add_menu_prefix","add_javascript":"add_javascript","menu_prefix":"menu_prefix","add_css_admin":"add_css_admin","add_css_site":"add_css_site","dashboard_type":"dashboard_type","toignore":"toignore","dashboard":"dashboard","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","export_key":"export_key","add_php_postflight_install":"add_php_postflight_install","joomla_source_link":"joomla_source_link","add_php_postflight_update":"add_php_postflight_update","export_buy_link":"export_buy_link","add_php_method_uninstall":"add_php_method_uninstall","add_php_method_install":"add_php_method_install","add_sql":"add_sql","add_sql_uninstall":"add_sql_uninstall","emptycontributors":"emptycontributors","assets_table_fix":"assets_table_fix","number":"number","readme":"readme","add_update_server":"add_update_server","update_server_target":"update_server_target","update_server":"update_server","sales_server":"sales_server","creatuserhelper":"creatuserhelper","add_git_folder_path":"add_git_folder_path","adduikit":"adduikit","git_folder_path":"git_folder_path","addfootable":"addfootable","jcb_powers_path":"jcb_powers_path","add_email_helper":"add_email_helper","add_php_helper_both":"add_php_helper_both","crowdin_project_api_key":"crowdin_project_api_key","php_helper_both":"php_helper_both","crowdin_account_api_key":"crowdin_account_api_key","add_php_helper_admin":"add_php_helper_admin","buildcomp":"buildcomp","php_helper_admin":"php_helper_admin","guid":"guid","add_admin_event":"add_admin_event","name":"name"}}',
// router
'',
// contentHistoryOptions
- '{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","remove_line_breaks","debug_linenr","mvc_versiondate","addreadme","add_placeholders","add_backup_folder_path","translation_tool","add_license","license_type","preferred_joomla_version","add_powers","add_sales_server","add_jcb_powers_path","add_php_helper_admin","add_admin_event","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","add_sql","add_sql_uninstall","assets_table_fix","add_update_server","emptycontributors","update_server_target","number","update_server","sales_server","add_git_folder_path","creatuserhelper","adduikit","addfootable","add_email_helper","buildcomp","add_php_helper_both"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
+ '{"formFile": "administrator/components/com_componentbuilder/forms/joomla_component.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","mvc_versiondate","remove_line_breaks","add_placeholders","debug_linenr","add_sales_server","add_jcb_powers_path","preferred_joomla_version","add_powers","addreadme","add_backup_folder_path","translation_tool","add_php_helper_site","add_site_event","add_javascript","add_css_admin","add_css_site","dashboard_type","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_method_install","add_sql","add_sql_uninstall","emptycontributors","assets_table_fix","number","add_update_server","update_server_target","update_server","sales_server","creatuserhelper","add_git_folder_path","adduikit","addfootable","add_email_helper","add_php_helper_both","add_php_helper_admin","buildcomp","add_admin_event"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dashboard","targetTable": "#__componentbuilder_custom_admin_view","targetColumn": "","displayColumn": "system_name"},{"sourceColumn": "update_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "sales_server","targetTable": "#__componentbuilder_server","targetColumn": "id","displayColumn": "name"}]}'
);
// Update Joomla module Content Types.
$this->setContentType(
@@ -2633,7 +2672,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// rules
'',
// fieldMappings
- '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "css_views","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","on_save_model_field":"on_save_model_field","initiator_on_get_model":"initiator_on_get_model","initiator_on_save_model":"initiator_on_save_model","xml":"xml","datalenght":"datalenght","css_views":"css_views","css_view":"css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","on_get_model_field":"on_get_model_field","javascript_view_footer":"javascript_view_footer","javascript_views_footer":"javascript_views_footer","add_css_view":"add_css_view","add_css_views":"add_css_views","add_javascript_view_footer":"add_javascript_view_footer","add_javascript_views_footer":"add_javascript_views_footer","guid":"guid"}}',
+ '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "javascript_view_footer","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","store":"store","on_get_model_field":"on_get_model_field","on_save_model_field":"on_save_model_field","initiator_on_get_model":"initiator_on_get_model","xml":"xml","datalenght":"datalenght","javascript_view_footer":"javascript_view_footer","css_views":"css_views","css_view":"css_view","datadefault_other":"datadefault_other","datadefault":"datadefault","datalenght_other":"datalenght_other","javascript_views_footer":"javascript_views_footer","add_css_view":"add_css_view","add_css_views":"add_css_views","add_javascript_view_footer":"add_javascript_view_footer","add_javascript_views_footer":"add_javascript_views_footer","initiator_on_save_model":"initiator_on_save_model","guid":"guid"}}',
// router
'',
// contentHistoryOptions
@@ -2741,6 +2780,23 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// contentHistoryOptions
'{"formFile": "administrator/components/com_componentbuilder/forms/server.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","protocol","authentication"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
);
+ // Update Repository Content Types.
+ $this->setContentType(
+ // typeTitle
+ 'Componentbuilder Repository',
+ // typeAlias
+ 'com_componentbuilder.repository',
+ // table
+ '{"special": {"dbtable": "#__componentbuilder_repository","key": "id","type": "RepositoryTable","prefix": "VDM\Component\Componentbuilder\Administrator\Table"}}',
+ // rules
+ '',
+ // fieldMappings
+ '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","organisation":"organisation","repository":"repository","target":"target","type":"type","base":"base","guid":"guid","access_repo":"access_repo","write_branch":"write_branch","read_branch":"read_branch","token":"token","username":"username"}}',
+ // router
+ '',
+ // contentHistoryOptions
+ '{"formFile": "administrator/components/com_componentbuilder/forms/repository.xml","hideFields": ["asset_id","checked_out","checked_out_time"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","target","type","access_repo"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'
+ );
// Update Help document Content Types.
$this->setContentType(
// typeTitle
@@ -3210,7 +3266,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '
-
Upgrade to Version 5.0.1-alpha4 Was Successful! Let us know if anything is not working as expected. ';
+ Upgrade to Version 5.0.1-alpha5 Was Successful! Let us know if anything is not working as expected. ';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();
@@ -3583,6 +3639,22 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
'COM_COMPONENTBUILDER'
);
+ // Add/Update Repository in the action logs config table.
+ $this->setActionLogConfig(
+ // typeTitle
+ 'REPOSITORY',
+ // typeAlias
+ 'com_componentbuilder.repository',
+ // idHolder
+ 'id',
+ // titleHolder
+ 'system_name',
+ // tableName
+ '#__componentbuilder_repository',
+ // textPrefix
+ 'COM_COMPONENTBUILDER'
+ );
+
// Add/Update Help_document in the action logs config table.
$this->setActionLogConfig(
// typeTitle
diff --git a/README.md b/README.md
index 2f82cc05d..93be80b99 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.1-alpha4) 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.1-alpha5) 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 June, 2024
-+ *Version*: 5.0.1-alpha4
++ *Last Build*: 21st June, 2024
++ *Version*: 5.0.1-alpha5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **750452**
-+ *Field count*: **2106**
-+ *File count*: **5319**
-+ *Folder count*: **540**
++ *Line count*: **758868**
++ *Field count*: **2110**
++ *File count*: **5376**
++ *Folder count*: **544**
> 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 2f82cc05d..93be80b99 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.1-alpha4) 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.1-alpha5) 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 June, 2024
-+ *Version*: 5.0.1-alpha4
++ *Last Build*: 21st June, 2024
++ *Version*: 5.0.1-alpha5
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **750452**
-+ *Field count*: **2106**
-+ *File count*: **5319**
-+ *Folder count*: **540**
++ *Line count*: **758868**
++ *Field count*: **2110**
++ *File count*: **5376**
++ *Folder count*: **544**
> 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/access.xml b/admin/access.xml
index 9557fb999..3391674c7 100644
--- a/admin/access.xml
+++ b/admin/access.xml
@@ -483,6 +483,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -766,6 +778,17 @@
+
diff --git a/admin/assets/css/repositories.css b/admin/assets/css/repositories.css
new file mode 100644
index 000000000..2731fc5aa
--- /dev/null
+++ b/admin/assets/css/repositories.css
@@ -0,0 +1,13 @@
+/**
+ * @package Joomla.Component.Builder
+ *
+ * @created 30th April, 2015
+ * @author Llewellyn van der Merwe
+ * @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
+ */
+
+/* CSS Document */
+
+
diff --git a/admin/assets/css/repository.css b/admin/assets/css/repository.css
new file mode 100644
index 000000000..2731fc5aa
--- /dev/null
+++ b/admin/assets/css/repository.css
@@ -0,0 +1,13 @@
+/**
+ * @package Joomla.Component.Builder
+ *
+ * @created 30th April, 2015
+ * @author Llewellyn van der Merwe
+ * @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
+ */
+
+/* CSS Document */
+
+
diff --git a/admin/assets/images/icons/repositories.png b/admin/assets/images/icons/repositories.png
new file mode 100644
index 000000000..32d7a0559
Binary files /dev/null and b/admin/assets/images/icons/repositories.png differ
diff --git a/admin/config.xml b/admin/config.xml
index d7bd6cea3..068004446 100644
--- a/admin/config.xml
+++ b/admin/config.xml
@@ -756,62 +756,7 @@
COM_COMPONENTBUILDER_CONFIG_NO
-
-
-
-
-
+
@@ -832,88 +777,6 @@
autocomplete="on"
showon="powers_repository:1"
/>
-
-
-
-
- COM_COMPONENTBUILDER_CONFIG_GITVDMDEV
-
- COM_COMPONENTBUILDER_CONFIG_CUSTOMGITEA
-
-
-
-
-
-
-
-
-
-
-
-
-
COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY
-
- COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION
COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM
@@ -243,6 +241,21 @@
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox"
/>
+
+
+
+
-
-
@@ -327,8 +327,22 @@
COM_COMPONENTBUILDER_FIELD_OTHER
-
-
+
+
-
-
-
-
-
-
+
+
COM_COMPONENTBUILDER_FIELD_NO
-
-
-
-
+
+
+
+
COM_COMPONENTBUILDER_FIELDTYPE_MEDIUM_ENCRYPTION_LOCALFILEKEY
-
- COM_COMPONENTBUILDER_FIELDTYPE_WHMCSKEY_ENCRYPTION
COM_COMPONENTBUILDER_FIELDTYPE_EXPERT_MODE_CUSTOM
diff --git a/admin/forms/filter_repositories.xml b/admin/forms/filter_repositories.xml
new file mode 100644
index 000000000..2f32873e1
--- /dev/null
+++ b/admin/forms/filter_repositories.xml
@@ -0,0 +1,100 @@
+
+
\ No newline at end of file
diff --git a/admin/forms/joomla_component.xml b/admin/forms/joomla_component.xml
index b025e9396..fd4f2a568 100644
--- a/admin/forms/joomla_component.xml
+++ b/admin/forms/joomla_component.xml
@@ -160,121 +160,70 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_HINT"
/>
-
+
-
+
-
-
-
-
-
-
-
+
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
+
+
+
-
+
+
+
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
@@ -328,28 +279,12 @@
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_ONLY_FIRST_NUMBER_OF_GLOBAL_VERSION_1XX
-
-
-
+
@@ -359,27 +294,6 @@
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GLOBAL
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OVERRIDE
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NONE
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_ENCRYPTION_ONLY_TO_LOCK_DATAFIELDS
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATES_NOT_READY
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOCK_DOWN_USE_USED_TO_VERIFY_OWNERSHIP
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
+
-
-
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OVERRIDE
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
-
-
-
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+
+
+
+
@@ -909,54 +713,96 @@
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GLOBAL
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OVERRIDE
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NONE
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN
+
-
+
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
+ type="text"
+ name="crowdin_username"
+ label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_LABEL"
+ size="50"
+ maxlength="150"
+ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_DESCRIPTION"
+ class="text_area"
+ required="true"
+ filter="CMD"
+ message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_MESSAGE"
+ autocomplete="off"
+ />
-
+
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
+ type="textarea"
+ name="buildcompsql"
+ label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_HINT"
+ required="true"
+ />
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OVERRIDE
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
+
@@ -1018,11 +850,11 @@
-
+
@@ -1048,20 +880,19 @@
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
+
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
-
-
-
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
@@ -1108,19 +942,20 @@
-
+
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEFAULT
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC
-
+
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
+ type="dynamicdashboard"
+ name="dashboard"
+ label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_LABEL"
+ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_DESCRIPTION"
+ class="fieldMedium"
+ layout="joomla.form.field.list-fancy-select"
+ multiple="false"
+ default=""
+ />
-
+
@@ -1168,11 +1000,11 @@
-
+
@@ -1196,11 +1028,11 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_HINT"
/>
-
+
@@ -1226,11 +1058,11 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA_SOURCE_LINK_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA_SOURCE_LINK_HINT"
/>
-
+
@@ -1256,11 +1088,11 @@
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_MESSAGE"
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_BUY_LINK_HINT"
/>
-
+
@@ -1272,40 +1104,36 @@
-
+
+ type="radio"
+ name="add_php_method_install"
+ label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_INSTALL_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_GLOBAL
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DO_NOT_ADD_FIX_EVER
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_ADDREMOVE
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INTELLIGENT_ADDREMOVEIF
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
+
+ type="radio"
+ name="add_sql"
+ label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
-
+
@@ -1445,6 +1273,67 @@
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_USE_GLOBAL
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DO_NOT_ADD_FIX_EVER
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_ADDREMOVE
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INTELLIGENT_ADDREMOVEIF
+
+
+
+
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OTHER
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GLOBAL
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OVERRIDE
-
-
-
-
-
-
-
+
+
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
-
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GLOBAL
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_OVERRIDE
+
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UIKIT_V3
-
+
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_FOOTABLE_V2
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
+
+
+
-
+
@@ -1669,20 +1588,23 @@
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
+
-
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
-
- COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
-
+ type="editor"
+ name="php_helper_admin"
+ label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL"
+ description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_DESCRIPTION"
+ width="100%"
+ height="550px"
+ cols="15"
+ rows="80"
+ buttons="no"
+ syntax="php"
+ editor="codemirror|none"
+ filter="raw"
+ validate="code"
+ showon="add_php_helper_admin:1"
+ />
-
+
+ type="radio"
+ name="add_admin_event"
+ label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_ADMIN_EVENT_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES
+
+ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO
+
+
\ No newline at end of file
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index 26b333d32..33d884235 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -3337,8 +3337,6 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_YES="Yes"
COM_COMPONENTBUILDER_CONCATENATE="Concatenate"
COM_COMPONENTBUILDER_CONDITIONS="Conditions"
COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active"
-COM_COMPONENTBUILDER_CONFIG_ADD_CUSTOM_GITEA_URL_DESCRIPTION="Switch to set your own Gitea url."
-COM_COMPONENTBUILDER_CONFIG_ADD_CUSTOM_GITEA_URL_LABEL="Target Gitea URL"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix"
COM_COMPONENTBUILDER_CONFIG_ADD_PLACEHOLDERS_DESCRIPTION="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code."
@@ -3352,7 +3350,6 @@ COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot"
COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call."
COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User"
-COM_COMPONENTBUILDER_CONFIG_APPROVED_PATHS_LABEL="Super Powers Repository Paths"
COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_DESCRIPTION="How to apply the assets table fix in JCB. SQL (add&remove) this is the default which adds the SQL fix and removes it once the component is uninstalled. Intelligent (add&remove+if) same as default, but on uninstall will only remove this fix if no other component needs it. Note that this option will only work with other components that also use the intelligent path ."
COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_LABEL="Assets Table Fix"
COM_COMPONENTBUILDER_CONFIG_AUTHOR="Author Info"
@@ -3382,8 +3379,6 @@ COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_DESC="Set the basic local key here."
COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_LABEL="Basic Key"
COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_NOTE_DESC="When using the basic encryption please use set a 32 character passphrase. Never change this passphrase once it is set! DATA WILL GET CORRUPTED IF YOU DO! "
COM_COMPONENTBUILDER_CONFIG_BASIC_KEY_NOTE_LABEL="Basic Encryption"
-COM_COMPONENTBUILDER_CONFIG_BRANCH_HINT="[branch]"
-COM_COMPONENTBUILDER_CONFIG_BRANCH_LABEL="Branch"
COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_DESCRIPTION="Select the artwork you would like to show during compilation of your projects in the compiler area."
COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_LABEL="Compiler Artwork Options"
COM_COMPONENTBUILDER_CONFIG_CHECK_TIMER_DESC="Set the intervals for the auto checkin fuction of tables that checks out the items to an user."
@@ -3420,18 +3415,10 @@ COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_DESCRIPTION="Select your backu
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_LABEL="Cronjob Backup Server"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_TYPE_DESCRIPTION="Select how you would like to backup JCB"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_TYPE_LABEL="Cronjob Backup type"
-COM_COMPONENTBUILDER_CONFIG_CUSTOMGITEA="custom.gitea"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_DESCRIPTION="Here you can set the path to the custom folder"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_HINT="/home/user/custom"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_LABEL="Custom Folder Path"
COM_COMPONENTBUILDER_CONFIG_CUSTOM_FOLDER_PATH_MESSAGE="Error! Please add folder path here."
-COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_DESCRIPTION="This token is used to access private repositories as needed to get the super powers."
-COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_HINT="Gitea Access Tokens"
-COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_LABEL="Gitea Access TokenGet token from your Gitea at: /user/settings/applications. "
-COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_DESCRIPTION="Enter Gitea Address"
-COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_HINT="https://git.vdm.dev"
-COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_LABEL="Gitea URL"
-COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_MESSAGE="Error! Please add website here."
COM_COMPONENTBUILDER_CONFIG_DEFAULT="Default"
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD="Development Method"
COM_COMPONENTBUILDER_CONFIG_DEVELOPMENT_METHOD_DESCRIPTION="Select what development method you would like to use."
@@ -3539,7 +3526,6 @@ COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_MESSAGE="Error! Please add token here
COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_DESCRIPTION="This is only needed when you are on a shared IP or/and have reached the public free limit of API queries to gitHub. So unless you have seen some kind of error that directed you here to add an access token you can just ignore this field."
COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_HINT="OAUTH-TOKEN"
COM_COMPONENTBUILDER_CONFIG_GITHUB_ACCESS_TOKEN_LABEL="gitHub Access TokenCheck https://developer.github.com/v3/#authentication for more info. "
-COM_COMPONENTBUILDER_CONFIG_GITVDMDEV="git.vdm.dev"
COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_DESCRIPTION="Here you can set the path to the git folder."
COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_HINT="/home/user/git"
COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_LABEL="Git Folder Path"
@@ -3603,8 +3589,6 @@ COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_DESCRIPTION="The compiler
COM_COMPONENTBUILDER_CONFIG_NOTE_COMPILER_FOLDER_PATH_LABEL="Moving The Compiler Folder"
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_DESCRIPTION="The custom folder is where all files and folders that you would like to include in your components are stored, the default location is [administrator/components/com_componentbuilder/custom]. You can move this folder by adding your own path here. Remember to move the content of the default custom folder to this new location."
COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_FOLDER_PATH_LABEL="Moving The Custom Folder"
-COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_GITEA_URL_DESCRIPTION="Each JCB system can only target one Gitea system at a time. Setting your own Gitea URL means you are decoupling from the git.vdm.dev system and will no longer be loading your super powers from the git.vdm.dev system!
This will affect the [layers:all], so JCB will not search for any Powers on the git.vdm.dev system at all.
This option is ideal for managing your own Core Super Powers and your own private Super Powers on your own, or another Gitea System, and allows you to use the Super Power integration completely independent from VDM. Our hope is that this gives you enough freedom and liberty to use our system or your own. Let's decentralize our systems so that we can start focusing on what we are building, and not be worried that some large conglomerate is stealing our ideas and building their empires on our hard work.
"
-COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_GITEA_URL_LABEL="Decentralize Super Powers, Yea!"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_DESCRIPTION="This method is basically the way JCB has always worked by default.
So once you have made changes, you go to the compiler view and compile your component. Then you have the option to install and/or distribute the Joomla installation package.
This option will always be active to those with permission to access the compiler. You can change this permission in the Permissions tab with the option called Compiler Access .
"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_DEFAULT_LABEL="Default Development Method"
COM_COMPONENTBUILDER_CONFIG_NOTE_DEVELOPMENT_METHOD_EXPANSION_DESCRIPTION="This method adds easy compile and install of multiple components to the current Joomla system. This automated action is called expansion .
Expansion can be achieved in two ways.
Button Expansion Option The first and most common way is to click on any of the Run Expansion buttons found at the top of some of the JCB admin views.
Cronjob Expansion Option The second is by running a cronjob as explained bellow the area of selection in this tab. So you do not need to manually compile and install the selected components any more, the system does all that automatically for you. The latency of the workflow is based on your cronjob frequency and the size of your component.
Expansion is pause for a component in a few ways, one by actually checking out/opening the Joomla Component view of the component in JCB, or changing the state to unpublish, archive or trashed, or simply remove if from the list below.
The Expansion method is there to speedup development testing. Below you should set the behaviour of a selected set of components that will be auto build and installed when the expansion module is run.
"
@@ -3619,15 +3603,13 @@ COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_DESCRIPTION="The powers
COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_LABEL="Local Powers Repository Path"
COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_DESCRIPTION="Joomla Component Builder (JCB), has super powers . Which is another way of saying it now allows for powers to be pulled in from a global array of areas, over which you have full control. This allows for easy sharing of your powers between your JCB instances with your own power repositories on https://git.vdm.dev/[username]/my-powers. While at the same time be able to use the JCB core powers where needed.
Let's explain: This feature called super-powers , manages powers by use of layers, events, tasks, methods, switches, and algorithms that all work in combination of different ways to achieve super powers.
The [powers] are:
[guid] => Each power has a global unique identifier used to control the power global identity. This [power:guid] looks like this: b836c1b1-b6b1-44f7-b8a2-9a763a4185b1 [code] => The actual code of the power that is found in a PHP file [settings] => The settings define the power details, relationships, and more. They are stored in a Json formatted file in [layer:repo] and/or [layer:local] and/or as column values in the [layer:database] The [layers] are:[database] This JCB instance's Database [repo] The https://git.vdm.dev/ git website that holds all repos, and which is managed by Vast Development Method [core] The core super-power repo of JCB https://git.vdm.dev/joomla/super-powers (this target can be changed in global options) [own] Your own super-powers repos https://git.vdm.dev/[username]/my-powers (sub-paths) [local] Local path, and its sub-paths that hold [core] and [own] repositories. The [events] are:[compile] Compilation of a component [sync] Synchronisation of selected powers with [algorithm:cascading] [init] Uploads all powers from all active [layers] into [layer:database] if not already exist in [layer:database] [reset] Force synchronisation of selected powers with [layer:core] The [tasks] are:[get] To get powers from any of the layers [set] To set powers to database or local paths The [methods] are:[auto] When JCB automatically does this for you [manual] When you must manually do something The [switches] are:[activate] This switch activates super-powers, and allows for [layer:local] path to be set [token] This is the VDM access token from the global tab. [super] This switch allows for [layer:own] paths to be set [approved] This switch allows a power to be added to a [layer:core] or [layer:own] paths The [algorithms] are:[cascading] The is the way in which JCB [task:get] a power during the [events] so that it can use the power in your component, and store in [layer:database] These terminologies and ideas are what you need to remember whenever you read any of the comments and other information about super-powers in JCB.
JCB uses powers as the foundation of all it builds. You can build things with JCB without knowing how to use or work with powers. But JCB cannot build anything without powers. That means JCB needs to load powers from the [layer:core] and usually will do this whenever an [event] is triggered based on the [algorithm:cascading].
All these events can possibly move powers into your [layer:database]. These [events] have the [method:auto] behaviour, and therefore we make use of the [algorithm:cascading] that allows for overriding any power in any way you like. Beware that divergence from the core powers may have side effects and therefore should only be done with knowledge and full understanding on your part.
Let's Explain the [algorithm:cascading] During [events] we must [auto] load powers, and so there is a search path for each event.
The [event:compile] when building your component, here is the [algorithm:cascading] :
[layer:database] [layer:local IF switch:activate AND switch:approved] [layer:own IF switch:token AND switch:activate AND switch:super AND switch:approved] [layer:core] This means, that if JCB gets a [power:guid] in the [layer:database] it stops the search and uses that found power. But if not, it will continue until it finds the power, or it will show an error that the power could not be found. Once it finds the power, it will make sure that the power is in [layer:database], and if [layer:local] is active, it will update those as well as determined by the approved path selection of each power.
The [event:sync] when the sync button is clicked, here is the [algorithm:cascading] :
[layer:own IF switch:token AND switch:activate AND switch:super AND switch:approved] [layer:local IF switch:activate AND switch:approved] [layer:core] This means, that if JCB gets a [power:guid] in any of the targeted [layer:own] it stops the search for that power at the first instance it finds that power. Then JCB will update your [layer:database] with the found power, irrespective of modify or creation date. The [power:guid] is used as the key, and should JCB therefore have a power in any of your [layer:own] it will override the [layer:core] and [layer:local] version of any power, and update the [layer:database].
The [event:reset] when the reset button is clicked, will update [layer:database] with [layer:core] version of the selected powers if found in [layer:core], irrespective of modify or creation date.
The [event:init] when the init button is clicked, will initialise [layer:database] with all [layers] powers not found in [layer:database]. Should you have the same power in multiple of the layers, here is the [algorithm:cascading] :
[layer:own IF switch:token AND switch:activate AND switch:super AND switch:approved] [layer:local IF switch:activate] [layer:core IF_NOT layer:database] This means, that if JCB gets a [power:guid] in any of the targeted [layer:own] it will not use any of the other [layers] versions. JCB will add this first found power to your [layer:database] unless it's already in [layer:database], in which case it will be ignored. Use [event:sync] or [event:reset] should you like to update [layer:database] existing powers.
"
COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_LABEL="Super Powers"
-COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_DESCRIPTION="Add the paths to those repositories you would like to target with this instance of JCB.
You only need to add the path , so if your repository is located here: https://git.vdm.dev/Llewellyn/workshop. Then the path will be: Llewellyn/workshop
We will use these paths in all [events] based on the [algorithm:cascading]
"
+COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_DESCRIPTION="We have moved this whole area to the new Repositories area in JCB.
Check it out right under the Servers menu, the Repositories menu can be found.
"
COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_LABEL="Super Powers Repositories [layer:local:own]"
COM_COMPONENTBUILDER_CONFIG_OFF="Off"
COM_COMPONENTBUILDER_CONFIG_ON="On"
COM_COMPONENTBUILDER_CONFIG_ONLY_BOOLEAN="Only Boolean"
COM_COMPONENTBUILDER_CONFIG_ONLY_EXTRA="Only Extra"
COM_COMPONENTBUILDER_CONFIG_ORIGINAL_VDM="Original (VDM)"
-COM_COMPONENTBUILDER_CONFIG_OWNER_HINT="[owner]"
-COM_COMPONENTBUILDER_CONFIG_OWNER_LABEL="Owner"
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_DESCRIPTION="[YEAR]
[MONTH]
[DAY]
[HOUR]
[MINUTE]
"
COM_COMPONENTBUILDER_CONFIG_PACKAGE_NAME_PLAEHOLDERS_LABEL="Package Name Placeholders"
COM_COMPONENTBUILDER_CONFIG_PERCENTAGELANGUAGEADD_DESCRIPTION="Select percentage any language should be translated before the system should add the language to the component during compilation."
@@ -3644,8 +3626,6 @@ COM_COMPONENTBUILDER_CONFIG_REPLYNAME_HINT="Reply Name Here"
COM_COMPONENTBUILDER_CONFIG_REPLYNAME_LABEL="Reply to Name"
COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION="Should the component be moved to your local repository folder?"
COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL="Add to Repository Folder"
-COM_COMPONENTBUILDER_CONFIG_REPO_HINT="[repo]"
-COM_COMPONENTBUILDER_CONFIG_REPO_LABEL="Repo"
COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_DESCRIPTION="Should the system return the build info/messages, or simply 1 for success and 0 for failure."
COM_COMPONENTBUILDER_CONFIG_RETURN_OPTIONS_BUILD_LABEL="Return Options for Build"
COM_COMPONENTBUILDER_CONFIG_SENDMAIL="Sendmail"
@@ -3681,13 +3661,6 @@ COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation"
COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION="Select the sub-form layouts you would like to use."
COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_LABEL="Sub-form Layouts"
COM_COMPONENTBUILDER_CONFIG_SUPER_POWER="Super Power"
-COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_HINT="joomla/super-powers"
-COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_LABEL="Super Powers Core"
-COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_DESCRIPTION="Set the organisation on your Gitea system where all the JCB core super powers repositories can be found."
-COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_HINT="joomla"
-COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_LABEL="Gitea Core Organisation"
-COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_DESCRIPTION="The organisation on your Gitea system where all the core super powers repositories can be found. Example: https://your.gitea.system.com/[core-org] /super-powers
These are the core super powers: https://git.vdm.dev/joomla/super-powers (required) https://git.vdm.dev/joomla/phpseclib (encryption) https://git.vdm.dev/joomla/fof (legacy encryption) https://git.vdm.dev/joomla/gitea (Easy Gitea classes) https://git.vdm.dev/joomla/openai (Easy Openai classes) https://git.vdm.dev/joomla/minify (not usually required) https://git.vdm.dev/joomla/psr (not usually required) https://git.vdm.dev/joomla/jcb-compiler (not usually required) https://git.vdm.dev/joomla/jcb-packager (not usually required) https://git.vdm.dev/joomla/search (not usually required) You should mirror theses repositories to your Gitea system. Depending on your extension setup JCB may need these repositories to effectively build your extension.
"
-COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_LABEL="Gitea Core Organisation"
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_DOCUMENTATION_DESCRIPTION="Switch to show or hide the documentation of super powers."
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_DOCUMENTATION_LABEL="Documentation"
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_REPOSITORIES_DESCRIPTION="Do you have your own repositories on https://git.vdm.dev/ with super powers?"
@@ -4296,6 +4269,7 @@ COM_COMPONENTBUILDER_DASHBOARD_LIBRARIES="Libraries "
COM_COMPONENTBUILDER_DASHBOARD_LIST_OF_RECORDS="Dashboard (list of records)"
COM_COMPONENTBUILDER_DASHBOARD_PLACEHOLDERS="Placeholders "
COM_COMPONENTBUILDER_DASHBOARD_POWERS="Powers "
+COM_COMPONENTBUILDER_DASHBOARD_REPOSITORIES="Repositories "
COM_COMPONENTBUILDER_DASHBOARD_SEARCH="Search "
COM_COMPONENTBUILDER_DASHBOARD_SERVERS="Servers "
COM_COMPONENTBUILDER_DASHBOARD_SITE_VIEWS="Site Views "
@@ -4887,7 +4861,6 @@ COM_COMPONENTBUILDER_FIELDTYPE_UNIQUE_KEY="UNIQUE KEY"
COM_COMPONENTBUILDER_FIELDTYPE_VARCHAR="VARCHAR"
COM_COMPONENTBUILDER_FIELDTYPE_VERSION_DESC="A count of the number of times this Fieldtype has been revised."
COM_COMPONENTBUILDER_FIELDTYPE_VERSION_LABEL="Version"
-COM_COMPONENTBUILDER_FIELDTYPE_WHMCSKEY_ENCRYPTION="WHMCS-key Encryption"
COM_COMPONENTBUILDER_FIELDTYPE_YES="Yes"
COM_COMPONENTBUILDER_FIELDTYPE_ZERO="0"
COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEWS_LABEL="Add CSS (views)"
@@ -4991,8 +4964,6 @@ COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_DESCRIPTION="This fi
COM_COMPONENTBUILDER_FIELD_NOTE_NO_DATABASE_SETTINGS_NEEDED_LABEL="No Database Require"
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_DESCRIPTION="Please select a field type that you would like to build."
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_LABEL="Building a field"
-COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION="When using the WHMCS encryption you need to get a WHMCS key from:https://www.vdm.io , or your own WHMCS install.
Please note that you will need to enable the add-on in the Joomla Component area (Add WHMCS)->Yes.
You can get more info about the WHMCS licensing add-on at the following links.
Helpful Links: https://www.whmcs.com/software-licensing/ http://docs.whmcs.com/Licensing_Addon/
Support JCB and use our affiliate link (https://www.whmcs.com/members/aff.php?aff=37513 ) to sign-up with WHMCS .
"
-COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL="The WHMCS Encryption"
COM_COMPONENTBUILDER_FIELD_NOT_NULL="NOT NULL"
COM_COMPONENTBUILDER_FIELD_NOT_REQUIRED="Not Required"
COM_COMPONENTBUILDER_FIELD_NULL="NULL"
@@ -5033,7 +5004,6 @@ COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY="UNIQUE KEY"
COM_COMPONENTBUILDER_FIELD_VARCHAR="VARCHAR"
COM_COMPONENTBUILDER_FIELD_VERSION_DESC="A count of the number of times this Field has been revised."
COM_COMPONENTBUILDER_FIELD_VERSION_LABEL="Version"
-COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION="WHMCS-key Encryption"
COM_COMPONENTBUILDER_FIELD_XML="Xml"
COM_COMPONENTBUILDER_FIELD_YES="Yes"
COM_COMPONENTBUILDER_FIELD_ZERO="0"
@@ -5048,6 +5018,8 @@ COM_COMPONENTBUILDER_FILTER_ADD_TYPE_ASCENDING="Add Type ascending"
COM_COMPONENTBUILDER_FILTER_ADD_TYPE_DESCENDING="Add Type descending"
COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_ASCENDING="Admin Views ascending"
COM_COMPONENTBUILDER_FILTER_ADMIN_VIEWS_DESCENDING="Admin Views descending"
+COM_COMPONENTBUILDER_FILTER_BASE_URL_ASCENDING="Base URL ascending"
+COM_COMPONENTBUILDER_FILTER_BASE_URL_DESCENDING="Base URL descending"
COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_USED_IN_PLACEHOLDER_ASCENDING="Comment Type (used in placeholder) ascending"
COM_COMPONENTBUILDER_FILTER_COMMENT_TYPE_USED_IN_PLACEHOLDER_DESCENDING="Comment Type (used in placeholder) descending"
COM_COMPONENTBUILDER_FILTER_COMPANY_NAME_ASCENDING="Company Name ascending"
@@ -5106,6 +5078,8 @@ COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_RECORDNAMING_CONVENTIONS_ASCENDING="Name
COM_COMPONENTBUILDER_FILTER_NAME_SINGLE_RECORDNAMING_CONVENTIONS_DESCENDING="Name (single record)Naming Conventions descending"
COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_ASCENDING="Null Switch ascending"
COM_COMPONENTBUILDER_FILTER_NULL_SWITCH_DESCENDING="Null Switch descending"
+COM_COMPONENTBUILDER_FILTER_ORGANISATION_ASCENDING="Organisation ascending"
+COM_COMPONENTBUILDER_FILTER_ORGANISATION_DESCENDING="Organisation descending"
COM_COMPONENTBUILDER_FILTER_PROTOCOL_ASCENDING="Protocol ascending"
COM_COMPONENTBUILDER_FILTER_PROTOCOL_DESCENDING="Protocol descending"
COM_COMPONENTBUILDER_FILTER_PUBLISHED="Status"
@@ -5153,12 +5127,15 @@ COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_CONFIG="Status options for libra
COM_COMPONENTBUILDER_FILTER_PUBLISHED_LIBRARIES_FILES_FOLDERS_URLS="Status options for libraries files folders urls"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_PLACEHOLDERS="Status options for placeholders"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_POWERS="Status options for powers"
+COM_COMPONENTBUILDER_FILTER_PUBLISHED_REPOSITORIES="Status options for repositories"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SERVERS="Status options for servers"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SITE_VIEWS="Status options for site views"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SNIPPETS="Status options for snippets"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_SNIPPET_TYPES="Status options for snippet types"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_TEMPLATES="Status options for templates"
COM_COMPONENTBUILDER_FILTER_PUBLISHED_VALIDATION_RULES="Status options for validation rules"
+COM_COMPONENTBUILDER_FILTER_REPOSITORY_ASCENDING="Repository ascending"
+COM_COMPONENTBUILDER_FILTER_REPOSITORY_DESCENDING="Repository descending"
COM_COMPONENTBUILDER_FILTER_SEARCH="Searchjoomla components"
COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_CUSTOM_TABS="Search the admin custom tabs items. Prefix with ID: to search for an item by ID."
COM_COMPONENTBUILDER_FILTER_SEARCH_ADMINS_FIELDS="Search the admin fields items. Prefix with ID: to search for an item by ID."
@@ -5204,6 +5181,7 @@ COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_CONFIG="Search the library config i
COM_COMPONENTBUILDER_FILTER_SEARCH_LIBRARIES_FILES_FOLDERS_URLS="Search the library files folders urls items. Prefix with ID: to search for an item by ID."
COM_COMPONENTBUILDER_FILTER_SEARCH_PLACEHOLDERS="Search the placeholder items. Prefix with ID: to search for an item by ID."
COM_COMPONENTBUILDER_FILTER_SEARCH_POWERS="Search the power items. Prefix with ID: to search for an item by ID."
+COM_COMPONENTBUILDER_FILTER_SEARCH_REPOSITORIES="Search the repository items. Prefix with ID: to search for an item by ID."
COM_COMPONENTBUILDER_FILTER_SEARCH_SERVERS="Search the server items. Prefix with ID: to search for an item by ID."
COM_COMPONENTBUILDER_FILTER_SEARCH_SITE_VIEWS="Search the site view items. Prefix with ID: to search for an item by ID."
COM_COMPONENTBUILDER_FILTER_SEARCH_SNIPPETS="Search the snippet items. Prefix with ID: to search for an item by ID."
@@ -5217,6 +5195,7 @@ COM_COMPONENTBUILDER_FILTER_SELECT_ADD_PHP_CUSTOM_VIEW_SCRIPT="Select Add PHP (c
COM_COMPONENTBUILDER_FILTER_SELECT_ADD_TYPE="Select Add Type"
COM_COMPONENTBUILDER_FILTER_SELECT_ADMIN_VIEWS="Select Admin Views"
COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR="Select Author"
+COM_COMPONENTBUILDER_FILTER_SELECT_BASE_URL="Select Base URL"
COM_COMPONENTBUILDER_FILTER_SELECT_COMMENT_TYPE_USED_IN_PLACEHOLDER="Select Comment Type (used in placeholder)"
COM_COMPONENTBUILDER_FILTER_SELECT_COMPANY_NAME="Select Company Name"
COM_COMPONENTBUILDER_FILTER_SELECT_COMPONENT="Select Component"
@@ -5237,7 +5216,9 @@ COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_SOURCE="Select Main Source"
COM_COMPONENTBUILDER_FILTER_SELECT_MODELLING_METHOD="Select Modelling Method"
COM_COMPONENTBUILDER_FILTER_SELECT_NAME="Select Name"
COM_COMPONENTBUILDER_FILTER_SELECT_NULL_SWITCH="Select Null Switch"
+COM_COMPONENTBUILDER_FILTER_SELECT_ORGANISATION="Select Organisation"
COM_COMPONENTBUILDER_FILTER_SELECT_PROTOCOL="Select Protocol"
+COM_COMPONENTBUILDER_FILTER_SELECT_REPOSITORY="Select Repository"
COM_COMPONENTBUILDER_FILTER_SELECT_ROUTER_MODECONSTRUCTOR_AFTER_PARENT="Select Router Mode[constructor_after_parent]"
COM_COMPONENTBUILDER_FILTER_SELECT_ROUTER_MODECONSTRUCTOR_BEFORE_PARENT="Select Router Mode[constructor_before_parent]"
COM_COMPONENTBUILDER_FILTER_SELECT_ROUTER_MODEMETHODS="Select Router Mode[methods]"
@@ -5245,6 +5226,7 @@ COM_COMPONENTBUILDER_FILTER_SELECT_SITE_VIEWS="Select Site Views"
COM_COMPONENTBUILDER_FILTER_SELECT_SUPER_POWER="Select Super Power"
COM_COMPONENTBUILDER_FILTER_SELECT_TARGET="Select Target"
COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_AREA="Select Target Area"
+COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_CONTENT="Select Target Content"
COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_FOLDER="Select Target Folder"
COM_COMPONENTBUILDER_FILTER_SELECT_TYPE="Select Type"
COM_COMPONENTBUILDER_FILTER_SELECT_TYPE_BEHAVIOR="Select Type Behavior"
@@ -5261,6 +5243,8 @@ COM_COMPONENTBUILDER_FILTER_SOURCE_STRING_DESCENDING="Source String descending"
COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_ASCENDING="System Name ascending"
COM_COMPONENTBUILDER_FILTER_SYSTEM_NAME_DESCENDING="System Name descending"
COM_COMPONENTBUILDER_FILTER_TARGET_ASCENDING="Target ascending"
+COM_COMPONENTBUILDER_FILTER_TARGET_CONTENT_ASCENDING="Target Content ascending"
+COM_COMPONENTBUILDER_FILTER_TARGET_CONTENT_DESCENDING="Target Content descending"
COM_COMPONENTBUILDER_FILTER_TARGET_DESCENDING="Target descending"
COM_COMPONENTBUILDER_FILTER_TARGET_FOLDER_ASCENDING="Target Folder ascending"
COM_COMPONENTBUILDER_FILTER_TARGET_FOLDER_DESCENDING="Target Folder descending"
@@ -5628,8 +5612,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_GIT_FOLDER_PATH_LABEL="Git Folder Path
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_JAVASCRIPT_LABEL="Add Javascript"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_JCB_POWERS_PATH_DESCRIPTION="Would you like to override the global jcb powers path for this component?"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_JCB_POWERS_PATH_LABEL="JCB Powers Path"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_LICENSE_DESCRIPTION="Add the option to use the whmcs license add-on in the component."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_LICENSE_LABEL="Add WHMCS(license add-on) "
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of this component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_MENU_PREFIX_LABEL="Add Menu Prefix"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_NAMESPACE_PREFIX_DESCRIPTION="Override the namespace prefix, or use the global value found under the component builder global option under the compiler tab."
@@ -5714,7 +5696,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL="CSS (admin)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_DESCRIPTION="Add CSS for the entire front-end of your component. Do not add the style tags."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL="CSS (site)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_ADMIN_VIEWS="Custom Admin Views"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CUSTOM_USED_IN_CUSTOM_CODE="Custom (used in custom code)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_DESCRIPTION="Select a custom admin view that is already linked to this component as a dynamic dashboard."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_LABEL="Dynamic Dashboard(admin or custom admin view) "
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_TYPE_DESCRIPTION="Select the type of dashboard you would like to use."
@@ -5778,9 +5759,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LIBS_HELPERS="Libs & Helpers"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_DESCRIPTION="Add License Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_HINT="Add License Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL="License"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE_DESCRIPTION="How should the license be implemented."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE_LABEL="Implementation"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LOCK_DOWN_USE_USED_TO_VERIFY_OWNERSHIP="Lock Down Use (used to verify ownership)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_PREFIX_DESCRIPTION="Add the prefix you would like to use. Make sure that it is HTML Character Entities since it is being used in XML."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_PREFIX_HINT="»"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_PREFIX_LABEL="PrefixCheck out these lists:Char-ref or Emoji "
@@ -5853,8 +5831,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_UPDATE_SERVER_NOTE_ZIP_LABEL="The ZIP
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_1_DESCRIPTION="Use the modified date, and version number of the view/fields instead of the global version in related files."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_2_DESCRIPTION="Use only the first two numbers from your global version. This is useful if you are using git. Since all document will not then be updated, with version change, with each compilation when only a minor update is made."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_VERSION_OPTIONS_3_DESCRIPTION="Use only the first numbers from your global version. This is useful if you are using git. Since all document will not then be updated, with version change, with each compilation when major or minor updates are made."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_DESCRIPTION="You can use WHMCS licensing addon in your componentHelpful Links https://www.whmcs.com/software-licensing/ http://docs.whmcs.com/Licensing_Addon Support JCB and use our affiliate link (https://www.whmcs.com/members/aff.php?aff=37513 ) to sign-up with WHMCS ."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_WHMCS_LISENCING_NOTE_LABEL="Licensing addon module for WHMCS"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOT_REQUIRED="Not Required"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NUMBER_LABEL="Number"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ORDERING_LABEL="Ordering"
@@ -5923,7 +5899,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TOIGNORE_LABEL="Repository Folders or File
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TO_IGNORE_NOTE_DESCRIPTION="During compilation JCB deletes all files and folders from the repository folder, and then adds the newly created files and folders back into the repository folder. Yet there may be files or folders you may not want deleted, like the .git folder, since JCB does not dynamically create that folder and so it will not be placed back, but simply delete it, unless you add it in this text field below, so that it will be ignored, and therefore not deleted in the first place. You can add multiple folders and files, separated by commas. Like: .git, .hg
"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TO_IGNORE_NOTE_LABEL="Repository Folders or Files to Ignore"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION_TOOL_LABEL="Translation Tool"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATES_NOT_READY="Updates (NOT READY!)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_DESCRIPTION="Select your update server for this component."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_LABEL="Update Server"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_DESCRIPTION="Select the type of way you would like the update server to be set."
@@ -5946,19 +5921,6 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION="Enter website address
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT="http://www.example.com"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Author Website"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_MESSAGE="Error! Please add website here."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_DESCRIPTION="Enter link where your WHMCS License key can be bought."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_HINT="http://www.example.com/buy-whmcs-key"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_LABEL="Buy Link(to get WHMCS License Key) "
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_MESSAGE="Error! Please add link here."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_ENCRYPTION_ONLY_TO_LOCK_DATAFIELDS="WHMCS encryption (only to lock data/fields)"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_DESCRIPTION="Add your WHMCS Secret Key here that is needed for this license"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_HINT="Secret Key"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_LABEL="WHMCS Secret Key(encrypted field) "
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_MESSAGE="Error! Please add some secret key here."
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_DESCRIPTION="Enter whmcs address"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_HINT="http://www.yoursite.com/whmcs"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_LABEL="URL to your WHMCS install"
-COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_MESSAGE="Error! Please add website here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES="Yes"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZIP="ZIP"
COM_COMPONENTBUILDER_JOOMLA_FIELDS="Joomla fields"
@@ -7639,6 +7601,7 @@ COM_COMPONENTBUILDER_NOT_SAVED="Not saved!"
COM_COMPONENTBUILDER_NOT_SET="not set"
COM_COMPONENTBUILDER_NOT_TRANSLATED_IN="Not translated in"
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
+COM_COMPONENTBUILDER_NO_ACTIVE_REPOSITORIES_FOUND="No Active Repositories Found"
COM_COMPONENTBUILDER_NO_ADMIN_VIEWS_FOUND="No Admin Views Found"
COM_COMPONENTBUILDER_NO_COMPONENTS_FOUND="No Components Found"
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
@@ -7927,7 +7890,7 @@ COM_COMPONENTBUILDER_POWER_NAME_LABEL="Name"
COM_COMPONENTBUILDER_POWER_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_POWER_NEW="A New Power"
COM_COMPONENTBUILDER_POWER_NO="No"
-COM_COMPONENTBUILDER_POWER_NOTE_APPROVED_PATHS_DESCRIPTION="Select the sub paths inside the local path where you would like to add this power. The default is the core JCB path which is joomla/super-powers (this can be changed in the global options)
To set the local path , and to add more sub paths , open the JCB global options, and look for the super power tab, there you will find all the instructions needed.
"
+COM_COMPONENTBUILDER_POWER_NOTE_APPROVED_PATHS_DESCRIPTION="Select the sub paths inside the local path where you would like to add this power.
To add more sub paths , go to the repositories view under servers.
"
COM_COMPONENTBUILDER_POWER_NOTE_APPROVED_PATHS_LABEL="Super Powers Repositories"
COM_COMPONENTBUILDER_POWER_NOTE_LINKED_TO_NOTICE_DESCRIPTION="Searching the database.
"
COM_COMPONENTBUILDER_POWER_NOTE_LINKED_TO_NOTICE_LABEL="Linked To"
@@ -7977,6 +7940,7 @@ COM_COMPONENTBUILDER_PROPERTY="Property"
COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER="Property already selected, try another."
COM_COMPONENTBUILDER_PROPERTY_NAME="Property Name"
COM_COMPONENTBUILDER_PROPERTY_VALUE="Property Value"
+COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BHTTPSGITVDMDEVSB_CAN_BE_USED_TO_OVERRIDE_ANY_POWERBR_BUT_HAS_NOT_YET_BEEN_SET_IN_YOUR_ACCOUNT_AT_HTTPSGITVDMDEVSBR_SMALLTHIS_IS_AND_OPTIONAL_FEATURESMALL="Super Power repository at https://git.vdm.dev/%s can be used to override any power! But has not yet been set in your account at https://git.vdm.dev/%sThis is and optional feature. "
COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="
Super Power repository at %s/%s gave the following error! %s
"
COM_COMPONENTBUILDER_PS_NAMING_MISMATCH_ERROR_SPPTHE_S_NAME_IS_BSB_AND_THE_ENDING_FILE_NAME_IN_THE_NAMESPACE_IS_BSB_THIS_IS_BAD_CONVENTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPA_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP="%s naming mismatch error (%s)
The %s name is %s and the ending file name in the namespace is %s . This is bad convention, please see psr-4 for more info.
Click here to fix this issue.
"
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
@@ -7992,6 +7956,121 @@ COM_COMPONENTBUILDER_REPLACE="Replace"
COM_COMPONENTBUILDER_REPLACED_WITH="replaced with"
COM_COMPONENTBUILDER_REPLACE_PROCESS_COMPLETE="replace process complete"
COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s "
+COM_COMPONENTBUILDER_REPOSITORIES="Repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_ACCESS="Repositories Access"
+COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC="Allows the users in this group to access access repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_BATCH_OPTIONS="Batch process the selected Repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_BATCH_TIP="All changes will be applied to all selected Repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE="Repositories Batch Use"
+COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_CREATE="Repositories Create"
+COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC="Allows the users in this group to create create repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST="Repositories Dashboard List"
+COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of repository"
+COM_COMPONENTBUILDER_REPOSITORIES_DELETE="Repositories Delete"
+COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC="Allows the users in this group to delete delete repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT="Repositories Edit"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY="Repositories Edit Created By"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE="Repositories Edit Created Date"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC="Allows the users in this group to edit the repository"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN="Repositories Edit Own"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own repositories created by them"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE="Repositories Edit State"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the repository"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION="Repositories Edit Version"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EMPTYSTATE_BUTTON_ADD="Add your first repository"
+COM_COMPONENTBUILDER_REPOSITORIES_EMPTYSTATE_CONTENT="Repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EMPTYSTATE_TITLE="No repositories have been created yet."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_ARCHIVED="%s Repositories archived."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_ARCHIVED_1="%s Repository archived."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_CHECKED_IN_0="No Repository successfully checked in."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_CHECKED_IN_1="%d Repository successfully checked in."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_CHECKED_IN_MORE="%d Repositories successfully checked in."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_DELETED="%s Repositories deleted."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_DELETED_1="%s Repository deleted."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_FAILED_PUBLISHING="%s Repositories failed publishing."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_FAILED_PUBLISHING_1="%s Repository failed publishing."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_FEATURED="%s Repositories featured."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_FEATURED_1="%s Repository featured."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_PUBLISHED="%s Repositories published."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_PUBLISHED_1="%s Repository published."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_TRASHED="%s Repositories trashed."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_TRASHED_1="%s Repository trashed."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_UNFEATURED="%s Repositories unfeatured."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_UNFEATURED_1="%s Repository unfeatured."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_UNPUBLISHED="%s Repositories unpublished."
+COM_COMPONENTBUILDER_REPOSITORIES_N_ITEMS_UNPUBLISHED_1="%s Repository unpublished."
+COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU="Repositories Submenu"
+COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC="Allows the users in this group to submenu of repository"
+COM_COMPONENTBUILDER_REPOSITORY="Repository"
+COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_DESCRIPTION="Set the access options to this repository"
+COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_LABEL="Access"
+COM_COMPONENTBUILDER_REPOSITORY_BASE_DESCRIPTION="Enter Base URL"
+COM_COMPONENTBUILDER_REPOSITORY_BASE_HINT="https://git.vdm.dev"
+COM_COMPONENTBUILDER_REPOSITORY_BASE_LABEL="Base URL"
+COM_COMPONENTBUILDER_REPOSITORY_BASE_MESSAGE="Error! Please add website here."
+COM_COMPONENTBUILDER_REPOSITORY_CREATED_BY_DESC="The user that created this Repository."
+COM_COMPONENTBUILDER_REPOSITORY_CREATED_BY_LABEL="Created By"
+COM_COMPONENTBUILDER_REPOSITORY_CREATED_DATE_DESC="The date this Repository was created."
+COM_COMPONENTBUILDER_REPOSITORY_CREATED_DATE_LABEL="Created Date"
+COM_COMPONENTBUILDER_REPOSITORY_DETAILS="Details"
+COM_COMPONENTBUILDER_REPOSITORY_EDIT="Editing the Repository"
+COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS="Another Repository has the same alias."
+COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS_TRASHED="A trashed Repository has the same alias ."
+COM_COMPONENTBUILDER_REPOSITORY_GITEA="Gitea"
+COM_COMPONENTBUILDER_REPOSITORY_GLOBAL="Global"
+COM_COMPONENTBUILDER_REPOSITORY_GUID_DESCRIPTION="Globally Unique Identifier"
+COM_COMPONENTBUILDER_REPOSITORY_GUID_HINT="Auto Generated"
+COM_COMPONENTBUILDER_REPOSITORY_GUID_LABEL="GUID"
+COM_COMPONENTBUILDER_REPOSITORY_ID="Id"
+COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER="Joomla Power"
+COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_DESC="The last user that modified this Repository."
+COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_LABEL="Modified By"
+COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_DATE_DESC="The date this Repository was modified."
+COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_DATE_LABEL="Modified Date"
+COM_COMPONENTBUILDER_REPOSITORY_NEW="A New Repository"
+COM_COMPONENTBUILDER_REPOSITORY_ORDERING_LABEL="Ordering"
+COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_DESCRIPTION="Enter the name of the owner of this repository."
+COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_HINT="[org]"
+COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_LABEL="Organisation"
+COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_MESSAGE="Error! Please add organisation here."
+COM_COMPONENTBUILDER_REPOSITORY_OVERRIDE="Override"
+COM_COMPONENTBUILDER_REPOSITORY_PERMISSION="Permissions"
+COM_COMPONENTBUILDER_REPOSITORY_PUBLISHING="Publishing"
+COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_DESCRIPTION="The read branch to use in the API calls."
+COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_HINT="[master]"
+COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_LABEL="Read Branch"
+COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_MESSAGE="Error! Please add read branch here."
+COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_HINT="[repo]"
+COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_LABEL="Repository"
+COM_COMPONENTBUILDER_REPOSITORY_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Repository to customise the alias."
+COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION="Select an option"
+COM_COMPONENTBUILDER_REPOSITORY_STATUS="Status"
+COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER="Super Power"
+COM_COMPONENTBUILDER_REPOSITORY_SYSTEM_NAME_DESCRIPTION="Used only in the system."
+COM_COMPONENTBUILDER_REPOSITORY_SYSTEM_NAME_HINT="The System Name Here"
+COM_COMPONENTBUILDER_REPOSITORY_SYSTEM_NAME_LABEL="System Name"
+COM_COMPONENTBUILDER_REPOSITORY_SYSTEM_NAME_MESSAGE="Error! Please add some text here."
+COM_COMPONENTBUILDER_REPOSITORY_TARGET_DESCRIPTION="The target content this repository holds."
+COM_COMPONENTBUILDER_REPOSITORY_TARGET_LABEL="Target Content"
+COM_COMPONENTBUILDER_REPOSITORY_TOKEN_DESCRIPTION="This token is used to access the api."
+COM_COMPONENTBUILDER_REPOSITORY_TOKEN_HINT="Access Tokens"
+COM_COMPONENTBUILDER_REPOSITORY_TOKEN_LABEL="Access Token"
+COM_COMPONENTBUILDER_REPOSITORY_TYPE_DESCRIPTION="The type of git system is this repository hosted on."
+COM_COMPONENTBUILDER_REPOSITORY_TYPE_LABEL="Type"
+COM_COMPONENTBUILDER_REPOSITORY_USERNAME_DESCRIPTION="The username to use in the API calls."
+COM_COMPONENTBUILDER_REPOSITORY_USERNAME_HINT="Username"
+COM_COMPONENTBUILDER_REPOSITORY_USERNAME_LABEL="Username"
+COM_COMPONENTBUILDER_REPOSITORY_USERNAME_MESSAGE="Error! Please add username here."
+COM_COMPONENTBUILDER_REPOSITORY_VERSION_DESC="A count of the number of times this Repository has been revised."
+COM_COMPONENTBUILDER_REPOSITORY_VERSION_LABEL="Version"
+COM_COMPONENTBUILDER_REPOSITORY_WRITE_BRANCH_DESCRIPTION="The write branch to use in the API calls. This can be the same as the read branch."
+COM_COMPONENTBUILDER_REPOSITORY_WRITE_BRANCH_HINT="[dev]"
+COM_COMPONENTBUILDER_REPOSITORY_WRITE_BRANCH_LABEL="Write Branch"
+COM_COMPONENTBUILDER_REPOSITORY_WRITE_BRANCH_MESSAGE="Error! Please add write branch here."
COM_COMPONENTBUILDER_REQUIRED_FIELDS_MISSING_IN_THE_BMYSQL_TABLES_SOURCE_MAPB_SELECTIONBR_S="Required fields missing in the MySQL -> Tables -> Source Map selection: %s"
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type="list": that is, that the element is a select list."
COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE="Requires the value to be a Telephone number complying with the standards of nanpa, ITU-T T-REC-E.164 or ietf rfc4933."
@@ -8836,6 +8915,7 @@ COM_COMPONENTBUILDER_SUBMENU_LAYOUTS="Layouts"
COM_COMPONENTBUILDER_SUBMENU_LIBRARIES="Libraries"
COM_COMPONENTBUILDER_SUBMENU_PLACEHOLDERS="Placeholders"
COM_COMPONENTBUILDER_SUBMENU_POWERS="Powers"
+COM_COMPONENTBUILDER_SUBMENU_REPOSITORIES="Repositories"
COM_COMPONENTBUILDER_SUBMENU_SEARCH="Search"
COM_COMPONENTBUILDER_SUBMENU_SERVERS="Servers"
COM_COMPONENTBUILDER_SUBMENU_SITE_VIEWS="Site Views"
@@ -9149,6 +9229,7 @@ COM_COMPONENTBUILDER_TYPE_NAME="Type - Name"
COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options"
COM_COMPONENTBUILDER_TYPE_PLACEHOLDER="Placeholder"
COM_COMPONENTBUILDER_TYPE_POWER="Power"
+COM_COMPONENTBUILDER_TYPE_REPOSITORY="Repository"
COM_COMPONENTBUILDER_TYPE_SERVER="Server"
COM_COMPONENTBUILDER_TYPE_SITE_VIEW="Site View"
COM_COMPONENTBUILDER_TYPE_SNIPPET="Snippet"
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
index f7b9f4fe6..d60a51e1d 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini
@@ -936,6 +936,7 @@ COM_COMPONENTBUILDER_MENU_LAYOUTS="Layouts"
COM_COMPONENTBUILDER_MENU_LIBRARIES="Libraries"
COM_COMPONENTBUILDER_MENU_PLACEHOLDERS="Placeholders"
COM_COMPONENTBUILDER_MENU_POWERS="Powers"
+COM_COMPONENTBUILDER_MENU_REPOSITORIES="Repositories"
COM_COMPONENTBUILDER_MENU_SEARCH="Search"
COM_COMPONENTBUILDER_MENU_SERVERS="Servers"
COM_COMPONENTBUILDER_MENU_SITE_VIEWS="Site Views"
@@ -992,6 +993,30 @@ COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS="Power Reset Button Access"
COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS="Power Run Expansion Button Access"
COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
+COM_COMPONENTBUILDER_REPOSITORIES_ACCESS="Repositories Access"
+COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC="Allows the users in this group to access access repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE="Repositories Batch Use"
+COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_CREATE="Repositories Create"
+COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC="Allows the users in this group to create create repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST="Repositories Dashboard List"
+COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of repository"
+COM_COMPONENTBUILDER_REPOSITORIES_DELETE="Repositories Delete"
+COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC="Allows the users in this group to delete delete repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT="Repositories Edit"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY="Repositories Edit Created By"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE="Repositories Edit Created Date"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC="Allows the users in this group to edit the repository"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN="Repositories Edit Own"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own repositories created by them"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE="Repositories Edit State"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the repository"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION="Repositories Edit Version"
+COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version repositories"
+COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU="Repositories Submenu"
+COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC="Allows the users in this group to submenu of repository"
COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access"
COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search."
COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access"
diff --git a/admin/layouts/field/database_right.php b/admin/layouts/field/database_right.php
index 83cad5930..6a1c770ab 100644
--- a/admin/layouts/field/database_right.php
+++ b/admin/layouts/field/database_right.php
@@ -31,7 +31,6 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'store',
'medium_encryption_note',
'basic_encryption_note',
- 'note_whmcs_encryption',
'note_expert_field_save_mode',
'initiator_on_save_model',
'initiator_on_get_model',
diff --git a/admin/layouts/joomla_component/details_right.php b/admin/layouts/joomla_component/details_right.php
index 8c3b5140d..3489691b7 100644
--- a/admin/layouts/joomla_component/details_right.php
+++ b/admin/layouts/joomla_component/details_right.php
@@ -30,12 +30,6 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'author',
'email',
'website',
- 'add_license',
- 'license_type',
- 'note_whmcs_lisencing_note',
- 'whmcs_key',
- 'whmcs_url',
- 'whmcs_buy_link',
'license',
'bom',
'image',
diff --git a/admin/layouts/repository/details_above.php b/admin/layouts/repository/details_above.php
new file mode 100644
index 000000000..59921a880
--- /dev/null
+++ b/admin/layouts/repository/details_above.php
@@ -0,0 +1,54 @@
+
+ * @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
+ */
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+// get the form
+$form = $displayData->getForm();
+
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: [
+ 'system_name',
+ 'target',
+ 'access_repo'
+];
+
+// Ensure $fields is treated as an array and count its size.
+$size = count((array) $fields);
+
+// Use a ternary operator to determine the class.
+// If there are 1 to 4 fields, set the class to divide the 12-grid column equally among the fields.
+// For more than 4 fields, default to four columns (3-grid each) for medium and larger screens.
+$css_class = ($size > 0 && $size <= 4) ? 'col-12 col-md-' . round(12 / $size) : 'col-12 col-md-3';
+
+$hiddenFields = $displayData->get('hidden_fields') ?: [];
+
+?>
+
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, ['class' => $css_class . ' control-wrapper-' . $field]); ?>
+
+
+
diff --git a/admin/layouts/repository/details_left.php b/admin/layouts/repository/details_left.php
new file mode 100644
index 000000000..6fb40bfe5
--- /dev/null
+++ b/admin/layouts/repository/details_left.php
@@ -0,0 +1,45 @@
+
+ * @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
+ */
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+// get the form
+$form = $displayData->getForm();
+
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'type',
+ 'base',
+ 'username',
+ 'token'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: [];
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/layouts/repository/details_right.php b/admin/layouts/repository/details_right.php
new file mode 100644
index 000000000..87bdb6b9d
--- /dev/null
+++ b/admin/layouts/repository/details_right.php
@@ -0,0 +1,45 @@
+
+ * @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
+ */
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+// get the form
+$form = $displayData->getForm();
+
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'organisation',
+ 'repository',
+ 'read_branch',
+ 'write_branch'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: [];
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/index.html b/admin/layouts/repository/index.html
similarity index 100%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/index.html
rename to admin/layouts/repository/index.html
diff --git a/admin/layouts/repository/publishing.php b/admin/layouts/repository/publishing.php
new file mode 100644
index 000000000..d4d7b688e
--- /dev/null
+++ b/admin/layouts/repository/publishing.php
@@ -0,0 +1,47 @@
+
+ * @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
+ */
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+// get the form
+$form = $displayData->getForm();
+
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'guid',
+ 'title',
+ 'created',
+ 'created_by',
+ 'modified',
+ 'modified_by'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: [];
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/layouts/repository/publlshing.php b/admin/layouts/repository/publlshing.php
new file mode 100644
index 000000000..051a5b14f
--- /dev/null
+++ b/admin/layouts/repository/publlshing.php
@@ -0,0 +1,47 @@
+
+ * @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
+ */
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+// get the form
+$form = $displayData->getForm();
+
+// get the layout fields override method name (from layout path/ID)
+$layout_path_array = explode('.', $this->getLayoutId());
+// Since we cannot pass the layout and tab names as parameters to the model method
+// this name combination of tab and layout in the method name is the only work around
+// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
+// example of layout name: details_left.php
+// example of method name: getFields_details_left()
+$fields_tab_layout = 'fields_' . $layout_path_array[1];
+
+// get the fields
+$fields = $displayData->get($fields_tab_layout) ?: array(
+ 'published',
+ 'ordering',
+ 'access',
+ 'version',
+ 'hits',
+ 'id'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: [];
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql
index d2f83146e..422dd35df 100644
--- a/admin/sql/install.mysql.utf8.sql
+++ b/admin/sql/install.mysql.utf8.sql
@@ -12,7 +12,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
`add_git_folder_path` TINYINT(1) NOT NULL DEFAULT 0,
`add_javascript` TINYINT(1) NOT NULL DEFAULT 0,
`add_jcb_powers_path` TINYINT(1) NOT NULL DEFAULT 0,
- `add_license` TINYINT(1) NOT NULL DEFAULT 0,
`add_menu_prefix` CHAR(1) NOT NULL DEFAULT '',
`add_namespace_prefix` CHAR(1) NOT NULL DEFAULT '',
`add_php_helper_admin` TINYINT(1) NOT NULL DEFAULT 0,
@@ -67,7 +66,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
`jcb_powers_path` VARCHAR(255) NOT NULL DEFAULT '',
`joomla_source_link` VARCHAR(255) NOT NULL DEFAULT '',
`license` VARCHAR(255) NOT NULL DEFAULT '',
- `license_type` TINYINT(1) NOT NULL DEFAULT 0,
`menu_prefix` VARCHAR(100) NOT NULL DEFAULT '',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`mvc_versiondate` TINYINT(1) NOT NULL DEFAULT 0,
@@ -100,9 +98,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
`update_server_target` TINYINT(1) NOT NULL DEFAULT 0,
`update_server_url` VARCHAR(255) NOT NULL DEFAULT '',
`website` CHAR(255) NOT NULL DEFAULT '',
- `whmcs_buy_link` VARCHAR(255) NOT NULL DEFAULT '',
- `whmcs_key` VARCHAR(255) NOT NULL DEFAULT '',
- `whmcs_url` VARCHAR(255) NOT NULL DEFAULT '',
`params` TEXT NULL,
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
@@ -119,29 +114,25 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
PRIMARY KEY (`id`),
KEY `idx_system_name` (`system_name`),
KEY `idx_name_code` (`name_code`),
- KEY `idx_remove_line_breaks` (`remove_line_breaks`),
- KEY `idx_debug_linenr` (`debug_linenr`),
KEY `idx_mvc_versiondate` (`mvc_versiondate`),
- KEY `idx_addreadme` (`addreadme`),
+ KEY `idx_remove_line_breaks` (`remove_line_breaks`),
KEY `idx_add_placeholders` (`add_placeholders`),
- KEY `idx_add_backup_folder_path` (`add_backup_folder_path`),
- KEY `idx_translation_tool` (`translation_tool`),
- KEY `idx_add_license` (`add_license`),
- KEY `idx_license_type` (`license_type`),
- KEY `idx_add_powers` (`add_powers`),
+ KEY `idx_debug_linenr` (`debug_linenr`),
KEY `idx_add_sales_server` (`add_sales_server`),
KEY `idx_add_jcb_powers_path` (`add_jcb_powers_path`),
- KEY `idx_add_php_helper_admin` (`add_php_helper_admin`),
- KEY `idx_add_admin_event` (`add_admin_event`),
+ KEY `idx_add_powers` (`add_powers`),
+ KEY `idx_addreadme` (`addreadme`),
+ KEY `idx_add_backup_folder_path` (`add_backup_folder_path`),
+ KEY `idx_translation_tool` (`translation_tool`),
+ KEY `idx_add_namespace_prefix` (`add_namespace_prefix`),
+ KEY `idx_namespace_prefix` (`namespace_prefix`),
KEY `idx_add_php_helper_site` (`add_php_helper_site`),
KEY `idx_add_site_event` (`add_site_event`),
- KEY `idx_add_namespace_prefix` (`add_namespace_prefix`),
+ KEY `idx_add_menu_prefix` (`add_menu_prefix`),
KEY `idx_add_javascript` (`add_javascript`),
- KEY `idx_namespace_prefix` (`namespace_prefix`),
+ KEY `idx_menu_prefix` (`menu_prefix`),
KEY `idx_add_css_admin` (`add_css_admin`),
KEY `idx_add_css_site` (`add_css_site`),
- KEY `idx_add_menu_prefix` (`add_menu_prefix`),
- KEY `idx_menu_prefix` (`menu_prefix`),
KEY `idx_add_php_preflight_install` (`add_php_preflight_install`),
KEY `idx_add_php_preflight_update` (`add_php_preflight_update`),
KEY `idx_add_php_postflight_install` (`add_php_postflight_install`),
@@ -150,17 +141,19 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` (
KEY `idx_add_php_method_install` (`add_php_method_install`),
KEY `idx_add_sql` (`add_sql`),
KEY `idx_add_sql_uninstall` (`add_sql_uninstall`),
+ KEY `idx_emptycontributors` (`emptycontributors`),
KEY `idx_assets_table_fix` (`assets_table_fix`),
KEY `idx_add_update_server` (`add_update_server`),
- KEY `idx_emptycontributors` (`emptycontributors`),
KEY `idx_update_server_target` (`update_server_target`),
- KEY `idx_add_git_folder_path` (`add_git_folder_path`),
KEY `idx_creatuserhelper` (`creatuserhelper`),
+ KEY `idx_add_git_folder_path` (`add_git_folder_path`),
KEY `idx_adduikit` (`adduikit`),
KEY `idx_addfootable` (`addfootable`),
KEY `idx_add_email_helper` (`add_email_helper`),
KEY `idx_add_php_helper_both` (`add_php_helper_both`),
+ KEY `idx_add_php_helper_admin` (`add_php_helper_admin`),
KEY `idx_guid` (`guid`),
+ KEY `idx_add_admin_event` (`add_admin_event`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
@@ -1305,6 +1298,52 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_server` (
KEY `idx_state` (`published`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
+CREATE TABLE IF NOT EXISTS `#__componentbuilder_repository` (
+ `id` INT(11) NOT NULL AUTO_INCREMENT,
+ `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
+ `access_repo` TINYINT(1) NOT NULL DEFAULT 0,
+ `base` VARCHAR(255) NOT NULL DEFAULT '',
+ `guid` VARCHAR(36) NOT NULL DEFAULT '',
+ `organisation` VARCHAR(255) NOT NULL DEFAULT '',
+ `read_branch` VARCHAR(255) NULL DEFAULT '',
+ `repository` VARCHAR(255) NOT NULL DEFAULT '',
+ `system_name` VARCHAR(255) NOT NULL DEFAULT '',
+ `target` TINYINT(7) NOT NULL DEFAULT 1,
+ `token` VARCHAR(255) NULL DEFAULT '',
+ `type` TINYINT(1) NOT NULL DEFAULT 1,
+ `username` VARCHAR(255) NULL DEFAULT '',
+ `write_branch` VARCHAR(255) NULL DEFAULT '',
+ `params` TEXT NULL,
+ `published` TINYINT(3) NOT NULL DEFAULT 1,
+ `created_by` INT(10) unsigned NOT NULL DEFAULT 0,
+ `modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
+ `created` DATETIME DEFAULT CURRENT_TIMESTAMP,
+ `modified` DATETIME DEFAULT NULL,
+ `checked_out` int(11) unsigned NOT NULL DEFAULT 0,
+ `checked_out_time` DATETIME DEFAULT NULL,
+ `version` INT(10) unsigned NOT NULL DEFAULT 1,
+ `hits` INT(10) unsigned NOT NULL DEFAULT 0,
+ `access` INT(10) unsigned NOT NULL DEFAULT 0,
+ `ordering` INT(11) NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `idx_system_name` (`system_name`),
+ KEY `idx_organisation` (`organisation`),
+ KEY `idx_repository` (`repository`),
+ KEY `idx_target` (`target`),
+ KEY `idx_type` (`type`),
+ KEY `idx_guid` (`guid`),
+ KEY `idx_access_repo` (`access_repo`),
+ KEY `idx_write_branch` (`write_branch`),
+ KEY `idx_read_branch` (`read_branch`),
+ KEY `idx_token` (`token`),
+ KEY `idx_username` (`username`),
+ KEY `idx_access` (`access`),
+ KEY `idx_checkout` (`checked_out`),
+ KEY `idx_createdby` (`created_by`),
+ KEY `idx_modifiedby` (`modified_by`),
+ KEY `idx_state` (`published`)
+) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;
+
CREATE TABLE IF NOT EXISTS `#__componentbuilder_help_document` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
@@ -2049,8 +2088,8 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls
-- Dumping data for table `#__componentbuilder_joomla_component`
--
-INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_admin_event`, `add_backup_folder_path`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_git_folder_path`, `add_javascript`, `add_license`, `add_menu_prefix`, `add_namespace_prefix`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_method_uninstall`, `add_php_postflight_install`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_powers`, `add_sales_server`, `add_site_event`, `add_sql`, `add_sql_uninstall`, `add_update_server`, `addcontributors`, `addfootable`, `addreadme`, `adduikit`, `assets_table_fix`, `author`, `backup_folder_path`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `created`, `creatuserhelper`, `crowdin_account_api_key`, `crowdin_project_api_key`, `crowdin_project_identifier`, `crowdin_username`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `export_key`, `git_folder_path`, `guid`, `image`, `javascript`, `joomla_source_link`, `license`, `license_type`, `menu_prefix`, `modified`, `mvc_versiondate`, `name`, `name_code`, `namespace_prefix`, `number`, `php_admin_event`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_method_uninstall`, `php_method_install`, `php_postflight_install`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `php_site_event`, `readme`, `remove_line_breaks`, `sales_server`, `short_description`, `sql`, `sql_uninstall`, `system_name`, `toignore`, `translation_tool`, `update_server`, `update_server_target`, `update_server_url`, `website`, `whmcs_buy_link`, `whmcs_key`, `whmcs_url`, `params`, `published`, `version`, `hits`, `access`, `ordering`) VALUES
-(25, '', '', '', '', '', '', '', '', 1, '', '', '', 1, '', 1, '', '', '', '', 1, '', '', '', '', 1, '{}', '', 1, 1, 3, 'Llewellyn van der Merwe', '', 'default.txt', '', '', 'Vast Development Method', '2.1.0', 'Copyright (C) 2015. All Rights Reserved', '2016-10-18 11:44:09', '', 'mvVkzmHCEIoBhzD3gR3uTzXRGwNVNRWw8Hr1vrXxb+I=', 'BbloLSYT6Yup6v3I/YNmrdOwzjbI4BGfDvJSB82N9DU=', '', 'VtSt2RMz+AHCrwc7jk1G70t83ZwZsNp2upqfzMyaVHE=', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'nZDegSPK87rXA4KMC6P8I6zEldjVIJpPYGRPZlKBI+U=', '', 'efde995e-60aa-4b39-b644-44349dfb660d', 'images/vdm/demo500.jpg', '', 'https://github.com/Llewellynvdm/Joomla-Demo-Component', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 1, '»', '2024-01-19 11:57:08', '', 'Demo', 'demo', 'JCB', 4, '', '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0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'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', 'https://www.vdm.io/', '', '6GeGhXcYZEQosGCi0ZXeuAj3oXBwARl7OnRm9h3rxPQ=', '', '{\"language_options\":{\"activate\":\"0\",\"use_percentagelanguageadd\":\"1\",\"percentagelanguageadd\":\"50\"},\"joomla_component_headers\":{\"add_admin_component\":\"0\",\"admin_component\":\"\",\"power_admin_component\":[],\"add_site_component\":\"0\",\"site_component\":\"\",\"power_site_component\":[],\"add_admin_helper\":\"0\",\"admin_helper\":\"\",\"power_admin_helper\":[],\"add_site_helper\":\"0\",\"site_helper\":\"\",\"power_site_helper\":[]}}', 1, 54, '', 1, 10);
+INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_admin_event`, `add_backup_folder_path`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_git_folder_path`, `add_javascript`, `add_menu_prefix`, `add_namespace_prefix`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_method_uninstall`, `add_php_postflight_install`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_powers`, `add_sales_server`, `add_site_event`, `add_sql`, `add_sql_uninstall`, `add_update_server`, `addcontributors`, `addfootable`, `addreadme`, `adduikit`, `assets_table_fix`, `author`, `backup_folder_path`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `created`, `creatuserhelper`, `crowdin_account_api_key`, `crowdin_project_api_key`, `crowdin_project_identifier`, `crowdin_username`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `export_key`, `git_folder_path`, `guid`, `image`, `javascript`, `joomla_source_link`, `license`, `menu_prefix`, `modified`, `mvc_versiondate`, `name`, `name_code`, `namespace_prefix`, `number`, `php_admin_event`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_method_uninstall`, `php_method_install`, `php_postflight_install`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `php_site_event`, `readme`, `remove_line_breaks`, `sales_server`, `short_description`, `sql`, `sql_uninstall`, `system_name`, `toignore`, `translation_tool`, `update_server`, `update_server_target`, `update_server_url`, `website`, `params`, `published`, `version`, `hits`, `access`, `ordering`) VALUES
+(25, '', '', '', '', '', '', '', 1, '', '', '', 1, '', 1, '', '', '', '', 1, '', '', '', '', 1, '{}', '', 1, 1, 3, 'Llewellyn van der Merwe', '', 'default.txt', '', '', 'Vast Development Method', '2.1.0', 'Copyright (C) 2015. All Rights Reserved', '2016-10-18 11:44:09', '', 'mvVkzmHCEIoBhzD3gR3uTzXRGwNVNRWw8Hr1vrXxb+I=', 'BbloLSYT6Yup6v3I/YNmrdOwzjbI4BGfDvJSB82N9DU=', '', 'VtSt2RMz+AHCrwc7jk1G70t83ZwZsNp2upqfzMyaVHE=', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'nZDegSPK87rXA4KMC6P8I6zEldjVIJpPYGRPZlKBI+U=', '', 'efde995e-60aa-4b39-b644-44349dfb660d', 'images/vdm/demo500.jpg', '', 'https://github.com/Llewellynvdm/Joomla-Demo-Component', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', '»', '2024-01-19 11:57:08', '', 'Demo', 'demo', 'JCB', 4, '', '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZS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b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCltDVVNUT01DT0RFPXJlYWRNRWNvbnRyaWJ1dG9yc10=', '', '', 'Demo Component', '', '', 'Demo (public)', '.git', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', 'https://www.vdm.io/', '{\"language_options\":{\"activate\":\"0\",\"use_percentagelanguageadd\":\"1\",\"percentagelanguageadd\":\"50\"},\"joomla_component_headers\":{\"add_admin_component\":\"0\",\"admin_component\":\"\",\"power_admin_component\":[],\"add_site_component\":\"0\",\"site_component\":\"\",\"power_site_component\":[],\"add_admin_helper\":\"0\",\"admin_helper\":\"\",\"power_admin_helper\":[],\"add_site_helper\":\"0\",\"site_helper\":\"\",\"power_site_helper\":[]}}', 1, 54, '', 1, 10);
--
-- Dumping data for table `#__componentbuilder_joomla_plugin`
@@ -2567,6 +2606,13 @@ INSERT INTO `#__componentbuilder_site_view` (`id`, `add_css_document`, `add_css`
(23, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'looks', '', '', '', 'PHRhYmxlIGNsYXNzPSJ1ay10YWJsZSB1ay10YWJsZS1ob3ZlciI+DQogICAgPGNhcHRpb24+PD9waHAgZWNobyBUZXh0OjpfKCdMaXN0IG9mIGFsbCBsb29rcycpOyA/PjwvY2FwdGlvbj4NCiAgICA8dGhlYWQ+DQogICAgICAgIDx0cj4NCiAgICAgICAgICAgIDx0aD48P3BocCBlY2hvIFRleHQ6Ol8oJ05hbWUnKTsgPz48L3RoPg0KICAgICAgICAgICAgPHRoPjw/cGhwIGVjaG8gVGV4dDo6XygnRGVzY3JpcHRpb24nKTsgPz48L3RoPg0KICAgICAgICA8L3RyPg0KICAgIDwvdGhlYWQ+DQogICAgPHRib2R5Pg0KICAgICAgICA8P3BocCBmb3JlYWNoICgkdGhpcy0+aXRlbXMgYXMgJGl0ZW0pOiA/Pg0KICAgICAgICA8dHI+DQogICAgICAgICAgICA8dGQ+PGEgaHJlZj0iPD9waHAgZWNobyAgW1tbQ29tcG9uZW50XV1dSGVscGVyUm91dGU6OmdldExvb2tpbmdSb3V0ZSgkaXRlbS0+c2x1Zyk7ID8+IiA+PD9waHAgZWNobyAkaXRlbS0+bmFtZTsgPz48L2E+PC90ZD4NCiAgICAgICAgICAgIDx0ZD48P3BocCBlY2hvICR0aGlzLT5lc2NhcGUoJGl0ZW0tPmRlc2NyaXB0aW9uLCB0cnVlLCAxMjApOyA/Pjw/cGhwIGVjaG8gJGl0ZW0tPmVkaXRMaW5rOyA/PjwvdGQ+DQogICAgICAgIDwvdHI+DQogICAgICAgIDw/cGhwIGVuZGZvcmVhY2g7ID8+DQogICAgPC90Ym9keT4NCjwvdGFibGU+', 'The List of all published looks', 36, '', 36, 'Looks', 'Looks', '', '', '', '', '', '', '', '', 1, '2016-04-05 14:31:59', '2016-10-20 15:57:24', 9, '', 14, 'b2dce59e-e3b8-4467-bcb5-8f2df4bdfeb7'),
(25, '', '', '', '', 1, 1, '', '', '', '', 1, '', '', '', '', 'looking', '', '', '', 'PGFydGljbGUgY2xhc3M9InVrLWNvbW1lbnQiPg0KICAgIDxoZWFkZXIgY2xhc3M9InVrLWNvbW1lbnQtaGVhZGVyIj4NCiAgICAgICAgPGltZyBjbGFzcz0idWstY29tbWVudC1hdmF0YXIiIHNyYz0ie2ltYWdldXJsfSIgYWx0PSIiPg0KICAgICAgICA8aDQgY2xhc3M9InVrLWNvbW1lbnQtdGl0bGUiPjw/cGhwIGVjaG8gJHRoaXMtPmVzY2FwZSgkdGhpcy0+aXRlbS0+bmFtZSk7ID8+PC9oND4NCiAgICAgICAgPGRpdiBjbGFzcz0idWstY29tbWVudC1tZXRhIj48P3BocCBlY2hvIFRleHQ6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1dXV9sb29rJykpLT5zZXQoJGZpZWxkcyktPndoZXJlKCRjb25kaXRpb25zKTsNCg0KCQkJJGRiLT5zZXRRdWVyeSgkcXVlcnkpOw0KCQkJcmV0dXJuICRkYi0+ZXhlY3V0ZSgpOw0KCQl9DQoJCXJldHVybiBmYWxzZTsNCgl9', 'Ly8gYWRkIGEgaGl0IHRvIHRoZSBsb29rDQppZiAoJHRoaXMtPmhpdCgkdGhpcy0+aXRlbS0+aWQpKQ0Kew0KCSR0aGlzLT5pdGVtLT5oaXRzKys7DQp9', '', '', '', '', '', 1, '2016-10-20 15:11:29', '2016-10-20 17:10:58', 16, '', 14, '851ed44e-5431-4951-876f-4b62a4c56ad2');
+--
+-- Dumping data for table `#__componentbuilder_layout`
+--
+
+INSERT INTO `#__componentbuilder_layout` (`id`, `add_php_view`, `alias`, `description`, `dynamic_get`, `layout`, `name`, `php_view`, `snippet`, `params`, `published`, `version`, `hits`, `ordering`, `libraries`) VALUES
+(97, '', 'trashhelper', 'Trash Helper Layout', '', 'PD9waHAgaWYgKCRkaXNwbGF5RGF0YS0+c3RhdGUtPmdldCgnZmlsdGVyLnB1Ymxpc2hlZCcpID09IC0yICYmICgkZGlzcGxheURhdGEtPmNhblN0YXRlICYmICRkaXNwbGF5RGF0YS0+Y2FuRGVsZXRlKSkgOiA/Pg0KCTxzY3JpcHQ+DQoJCS8vIGNoYW5nZSB0aGUgY2xhc3Mgb2YgdGhlIGRlbGV0ZSBidXR0b24NCgkJalF1ZXJ5KCIjdG9vbGJhci1kZWxldGUgYnV0dG9uIikudG9nZ2xlQ2xhc3MoImJ0bi1kYW5nZXIiKTsNCgkJLy8gZnVuY3Rpb24gdG8gZW1wdHkgdGhlIHRyYXNoDQoJCWZ1bmN0aW9uIGVtcHR5VHJhc2goKSB7DQoJCQlpZiAoZG9jdW1lbnQuYWRtaW5Gb3JtLmJveGNoZWNrZWQudmFsdWUgPT0gMCkgew0KCQkJCS8vIHNlbGVjdCBhbGwgdGhlIGl0Z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xhc3M9ImJ0biBidG4tc21hbGwgYnRuLWRhbmdlciI+DQoJCQkJPHNwYW4gY2xhc3M9Imljb24tZGVsZXRlIiBhcmlhLWhpZGRlbj0idHJ1ZSI+PC9zcGFuPg0KCQkJCTw/PSBUZXh0OjpfKCJFbXB0eSB0cmFzaCIpID8+DQoJCQk8L2J1dHRvbj4NCgkJPD9waHAgZW5kaWY7ID8+DQoJCTxidXR0b24gb25jbGljaz0iZXhpdFRyYXNoKCk7IiBjbGFzcz0iYnRuIGJ0bi1zbWFsbCI+DQoJCQk8c3BhbiBjbGFzcz0iaWNvbi1iYWNrIiBhcmlhLWhpZGRlbj0idHJ1ZSI+PC9zcGFuPg0KCQkJPD89IFRleHQ6Ol8oIkV4aXQgdHJhc2giKSA/Pg0KCQk8L2J1dHRvbj4NCgk8L2Rpdj4NCjw/cGhwIGVuZGlmOyA/Pg==', 'Trash Helper', '', '', '', 1, 8, '', 27, '');
+
--
-- Dumping data for table `#__componentbuilder_dynamic_get`
--
@@ -2744,7 +2790,11 @@ INSERT INTO `#__componentbuilder_validation_rule` (`id`, `name`, `php`, `short_d
(3, 'uniquefield', 'CS8qKg0KCSAqIE1ldGhvZCB0byB0ZXN0IHRoZSBmaWVsZCB2YWx1ZSBmb3IgdW5pcXVlbmVzcy4NCgkgKg0KCSAqIEBwYXJhbSAgIFxTaW1wbGVYTUxFbGVtZW50ICAkZWxlbWVudCAgVGhlIFNpbXBsZVhNTEVsZW1lbnQgb2JqZWN0IHJlcHJlc2VudGluZyB0aGUgYDxmaWVsZD5gIHRhZyBmb3IgdGhlIGZvcm0gZmllbGQgb2JqZWN0Lg0KCSAqIEBwYXJhbSAgIG1peGVkICAgICAgICAgICAgICAkdmFsdWUgICAgVGhlIGZvcm0gZmllbGQgdmFsdWUgdG8gdmFsaWRhdGUuDQoJICogQHBhcmFtICAgc3RyaW5nICAgICAgICAgICAgICRncm91cCAgICBUaGUgZmllbGQgbmFtZSBncm91cCBjb250cm9sIHZhbHVlLiBUa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WzAtOV17NX1bQS1aMC05XXsxMn0kJyksDQoJCQknTFQnID0+IGFycmF5KDE2LCAnXlswLTldezV9WzAtOV17MTF9JCcpLA0KCQkJJ0xVJyA9PiBhcnJheSgxNiwgJ15bMC05XXszfVtBLVowLTldezEzfSQnKSwNCgkJCSdMVicgPT4gYXJyYXkoMTcsICdeW0EtWl17NH1bQS1aMC05XXsxM30kJyksDQoJCQknTUMnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdNRCcgPT4gYXJyYXkoMjAsICdeW0EtWjAtOV17Mn1bQS1aMC05XXsxOH0kJyksDQoJCQknTUUnID0+IGFycmF5KDE4LCAnXlswLTldezN9WzAtOV17MTN9WzAtOV17Mn0kJyksDQoJCQknTUYnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdNRycgPT4gYXJyYXkoMjMsICdeWzAtOV17MjN9JCcpLA0KCQkJJ01LJyA9PiBhcnJheSgxNSwgJ15bMC05XXszfVtBLVowLTldezEwfVswLTldezJ9JCcpLA0KCQkJJ01MJyA9PiBhcnJheSgyNCwgJ15bQS1aXXsxfVswLTldezIzfSQnKSwNCgkJCSdNUScgPT4gYXJyYXkoMjMsICdeWzAtOV17NX1bMC05XXs1fVtBLVowLTldezExfVswLTldezJ9JCcpLA0KCQkJJ01SJyA9PiBhcnJheSgyMywgJ15bMC05XXs1fVswLTldezV9WzAtOV17MTF9WzAtOV17Mn0kJyksDQoJCQknTVQnID0+IGFycmF5KDI3LCAnXltBLVpdezR9WzAtOV17NX1bQS1aMC05XXsxOH0kJyksDQoJCQknTVUnID0+IGFycmF5KDI2LCAnXltBLVpdezR9WzAtOV17Mn1bMC05XXsyfVswLTldezEyfVswLTldezN9W0EtWl17M30kJyksDQoJCQknTVonID0+IGFycmF5KDIxLCAnXlswLTldezIxfSQnKSwNCgkJCSdOQ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A9PiBhcnJheSgyMCwgJ15bMC05XXszfVswLTldezE2fVswLTldezF9JCcpLA0KCQkJJ1NJJyA9PiBhcnJheSgxNSwgJ15bMC05XXs1fVswLTldezh9WzAtOV17Mn0kJyksDQoJCQknU0snID0+IGFycmF5KDIwLCAnXlswLTldezR9WzAtOV17Nn1bMC05XXsxMH0kJyksDQoJCQknU00nID0+IGFycmF5KDIzLCAnXltBLVpdezF9WzAtOV17NX1bMC05XXs1fVtBLVowLTldezEyfSQnKSwNCgkJCSdTTicgPT4gYXJyYXkoMjQsICdeW0EtWl17MX1bMC05XXsyM30kJyksDQoJCQknU1QnID0+IGFycmF5KDIxLCAnXlswLTldezh9WzAtOV17MTF9WzAtOV17Mn0kJyksDQoJCQknVEYnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdUTCcgPT4gYXJyYXkoMTksICdeWzAtOV17M31bMC05XXsxNH1bMC05XXsyfSQnKSwNCgkJCSdUTicgPT4gYXJyYXkoMjAsICdeWzAtOV17Mn1bMC05XXszfVswLTldezEzfVswLTldezJ9JCcpLA0KCQkJJ1RSJyA9PiBhcnJheSgyMiwgJ15bMC05XXs1fVswLTldezF9W0EtWjAtOV17MTZ9JCcpLA0KCQkJJ1VBJyA9PiBhcnJheSgyNSwgJ15bMC05XXs2fVtBLVowLTldezE5fSQnKSwNCgkJCSdWRycgPT4gYXJyYXkoMjAsICdeW0EtWl17NH1bMC05XXsxNn0kJyksDQoJCQknV0YnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdYSycgPT4gYXJyYXkoMTYsICdeWzAtOV17NH1bMC05XXsxMH1bMC05XXsyfSQnKSwNCgkJCSdZVCcgPT4gYXJyYXkoMjMsICdeWzAtOV17NX1bMC05XXs1fVtBLVowLTldezExfVswLTldezJ9JCcpDQoJCSk7DQoNCgkJLy8gQ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xNiwgJ15bMC05XXszfVtBLVowLTldezEzfSQnKSwNCgkJCSdMVicgPT4gYXJyYXkoMTcsICdeW0EtWl17NH1bQS1aMC05XXsxM30kJyksDQoJCQknTUMnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdNRCcgPT4gYXJyYXkoMjAsICdeW0EtWjAtOV17Mn1bQS1aMC05XXsxOH0kJyksDQoJCQknTUUnID0+IGFycmF5KDE4LCAnXlswLTldezN9WzAtOV17MTN9WzAtOV17Mn0kJyksDQoJCQknTUYnID0+IGFycmF5KDIzLCAnXlswLTldezV9WzAtOV17NX1bQS1aMC05XXsxMX1bMC05XXsyfSQnKSwNCgkJCSdNRycgPT4gYXJyYXkoMjMsICdeWzAtOV17MjN9JCcpLA0KCQkJJ01LJyA9PiBhcnJheSgxNSwgJ15bMC05XXszfVtBLVowLTldezEwfVswLTldezJ9JCcpLA0KCQkJJ01MJyA9PiBhcnJheSgyNCwgJ15bQS1aXXsxfVswLTldezIzfSQnKSwNCgkJCSdNUScgPT4gYXJyYXkoMjMsICdeWzAtOV17NX1bMC05XXs1fVtBLVowLTldezExfVswLTldezJ9JCcpLA0KCQkJJ01SJyA9PiBhcnJheSgyMywgJ15bMC05XXs1fVswLTldezV9WzAtOV17MTF9WzAtOV17Mn0kJyksDQoJCQknTVQnID0+IGFycmF5KDI3LCAnXltBLVpdezR9WzAtOV17NX1bQS1aMC05XXsxOH0kJyksDQoJCQknTVUnID0+IGFycmF5KDI2LCAnXltBLVpdezR9WzAtOV17Mn1bMC05XXsyfVswLTldezEyfVswLTldezN9W0EtWl17M30kJyksDQoJCQknTVonID0+IGFycmF5KDIxLCAnXlswLTldezIxfSQnKSwNCgkJCSdOQycgPT4gYXJyYXkoMjMsICdeWzAtOV17NX1bMC05XXs1fVtBLVowLTldezExfVswLTldezJ9JCcpLA0KCQkJJ05MJyA9PiBhcnJheSgxNCwgJ15bQS1aXXs0f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F1aXJlZCA9ICgoc3RyaW5nKSAkZWxlbWVudFsncmVxdWlyZWQnXSA9PSAndHJ1ZScgfHwgKHN0cmluZykgJGVsZW1lbnRbJ3JlcXVpcmVkJ10gPT0gJ3JlcXVpcmVkJyk7DQoNCgkJaWYgKCEkcmVxdWlyZWQgJiYgZW1wdHkoJHZhbHVlKSkNCgkJew0KCQkJcmV0dXJuIHRydWU7DQoJCX0NCg0KCQl0cnkNCgkJew0KCQkJLy8gbWFrZSBzdXJlIHdlIGFyZSBpbiBBdXN0cmFsaWENCgkJCWRhdGVfZGVmYXVsdF90aW1lem9uZV9zZXQoJ0F1c3RyYWxpYS9TeWRuZXknKTsNCgkJCWlmIChzdHJwb3MoJHZhbHVlLCAnLycpICE9PSBmYWxzZSkNCgkJCXsNCgkJCQkkdmFsdWUgPSBpbXBsb2RlKCctJywgZXhwbG9kZSgnLycsICR2YWx1ZSkpOw0KCQkJfQ0KCQkJJHZhbHVlID0gc3RydG90aW1lKCR2YWx1ZSk7DQoJCQkvLyB3ZSBjaGVjayB0aGF0IHRoaXMgZGF0ZSBpcyBub3QgaW4gdGhlIGZ1dHVyZQ0KCQkJaWYgKCR2YWx1ZSA8PSB0aW1lKCkpDQoJCQl7DQoJCQkJcmV0dXJuIHRydWU7DQoJCQl9DQoJCX0NCgkJY2F0Y2ggKFxFeGNlcHRpb24gJGUpDQoJCXsNCgkJCXJldHVybiBmYWxzZTsNCgkJfQ0KCQlyZXR1cm4gZmFsc2U7DQoJfQ==', 'Only allow dates in the past', 1, '2020-06-27 15:36:56', '');
--
-- Dumping data for table `#__componentbuilder_field`
@@ -2894,6 +2944,22 @@ INSERT INTO `#__componentbuilder_language` (`id`, `langtag`, `name`, `params`, `
(77, 'lt-LT', 'Lithuanian', '', 2, '2018-09-14 10:39:11', '2023-12-26 07:40:20', 4, '', 2),
(78, 'kk-KZ', 'Kazakh', '', 2, '2020-03-19 13:41:00', '2023-12-26 07:40:20', 3, '', 3);
+--
+-- Dumping data for table `#__componentbuilder_repository`
+--
+
+INSERT INTO `#__componentbuilder_repository` (`id`, `system_name`, `organisation`, `repository`, `target`, `type`, `base`, `guid`, `read_branch`, `access`, `ordering`, `published`, `modified`, `created`, `params`) VALUES
+(1, 'Super Powers', 'joomla', 'super-powers', 1, 1, 'https://git.vdm.dev', '1a1b6f3d-f16c-431a-b270-7a8a80cc7f56', 'master', 1, 1, 1, '2024-06-10 11:13:46', '2024-06-10 10:59:35', ''),
+(2, 'JCB Compiler', 'joomla', 'jcb-compiler', 1, 1, 'https://git.vdm.dev', 'd12c7672-7b75-4a59-a5f3-c33f1a2f929b', 'master', 1, 2, 1, '2024-06-15 17:43:09', '2024-06-10 11:01:06', ''),
+(3, 'JCB Packager', 'joomla', 'jcb-packager', 1, 1, 'https://git.vdm.dev', 'd8155014-5734-4fb5-9ccb-6bb33367ef78', 'master', 1, 3, 1, '2024-06-15 17:43:09', '2024-06-10 11:01:35', ''),
+(4, 'PHP Seclib', 'joomla', 'phpseclib', 1, 1, 'https://git.vdm.dev', 'e63d916c-81c1-4a56-a73f-584174b36c87', 'master', 1, 4, 1, '2024-06-15 17:43:09', '2024-06-10 11:02:03', ''),
+(5, 'JCB Search', 'joomla', 'search', 1, 1, 'https://git.vdm.dev', '6e57dc23-a17d-4937-bdbf-639ae1b8409f', 'master', 1, 5, 1, '2024-06-15 17:43:09', '2024-06-10 11:02:43', ''),
+(6, 'Gitea', 'joomla', 'gitea', 1, 1, 'https://git.vdm.dev', 'a0cbfb8a-b427-48eb-b493-a02b34854019', 'master', 1, 6, 1, '2024-06-15 17:43:09', '2024-06-10 11:03:09', ''),
+(7, 'Openai', 'joomla', 'openai', 1, 1, 'https://git.vdm.dev', 'c736a46f-0880-428a-8837-02627fdbd38d', 'master', 1, 7, 1, '2024-06-15 17:43:09', '2024-06-10 11:03:19', ''),
+(8, 'Minify', 'joomla', 'minify', 1, 1, 'https://git.vdm.dev', '6c741f48-a192-4e17-a932-df552164cffb', 'master', 1, 8, 1, '2024-06-15 17:43:09', '2024-06-10 11:03:30', ''),
+(9, 'psr', 'joomla', 'psr', 1, 1, 'https://git.vdm.dev', 'bfaa857a-df24-4d8c-97c3-1da4167a2bc8', 'master', 1, 9, 1, '2024-06-15 17:43:09', '2024-06-10 11:03:41', ''),
+(10, 'fof', 'joomla', 'fof', 1, 1, 'https://git.vdm.dev', 'dd591247-1215-4faf-8a00-1f294768ba13', 'master', 1, 10, 1, '2024-06-15 17:43:09', '2024-06-10 11:03:47', '');
+
--
-- Dumping data for table `#__componentbuilder_help_document`
--
diff --git a/admin/sql/uninstall.mysql.utf8.sql b/admin/sql/uninstall.mysql.utf8.sql
index df379941b..5daf8f0e3 100644
--- a/admin/sql/uninstall.mysql.utf8.sql
+++ b/admin/sql/uninstall.mysql.utf8.sql
@@ -21,6 +21,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_fieldtype`;
DROP TABLE IF EXISTS `#__componentbuilder_language_translation`;
DROP TABLE IF EXISTS `#__componentbuilder_language`;
DROP TABLE IF EXISTS `#__componentbuilder_server`;
+DROP TABLE IF EXISTS `#__componentbuilder_repository`;
DROP TABLE IF EXISTS `#__componentbuilder_help_document`;
DROP TABLE IF EXISTS `#__componentbuilder_admin_fields`;
DROP TABLE IF EXISTS `#__componentbuilder_admin_fields_conditions`;
diff --git a/admin/src/Controller/RepositoriesController.php b/admin/src/Controller/RepositoriesController.php
new file mode 100644
index 000000000..d6f4a17cc
--- /dev/null
+++ b/admin/src/Controller/RepositoriesController.php
@@ -0,0 +1,54 @@
+
+ * @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\Component\Componentbuilder\Administrator\Controller;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\Utilities\ArrayHelper;
+use Joomla\CMS\Router\Route;
+use Joomla\CMS\Session\Session;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repositories Admin Controller
+ *
+ * @since 1.6
+ */
+class RepositoriesController extends AdminController
+{
+ /**
+ * The prefix to use with controller messages.
+ *
+ * @var string
+ * @since 1.6
+ */
+ protected $text_prefix = 'COM_COMPONENTBUILDER_REPOSITORIES';
+
+ /**
+ * Proxy for getModel.
+ *
+ * @param string $name The model name. Optional.
+ * @param string $prefix The class prefix. Optional.
+ * @param array $config Configuration array for model. Optional.
+ *
+ * @return \Joomla\CMS\MVC\Model\BaseDatabaseModel
+ *
+ * @since 1.6
+ */
+ public function getModel($name = 'Repository', $prefix = 'Administrator', $config = ['ignore_request' => true])
+ {
+ return parent::getModel($name, $prefix, $config);
+ }
+}
\ No newline at end of file
diff --git a/admin/src/Controller/RepositoryController.php b/admin/src/Controller/RepositoryController.php
new file mode 100644
index 000000000..ebff99246
--- /dev/null
+++ b/admin/src/Controller/RepositoryController.php
@@ -0,0 +1,343 @@
+
+ * @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\Component\Componentbuilder\Administrator\Controller;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Form\FormFactoryInterface;
+use Joomla\CMS\Application\CMSApplication;
+use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\Input\Input;
+use Joomla\CMS\Versioning\VersionableControllerTrait;
+use Joomla\CMS\MVC\Controller\FormController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
+use Joomla\Utilities\ArrayHelper;
+use Joomla\CMS\Router\Route;
+use Joomla\CMS\Session\Session;
+use Joomla\CMS\Uri\Uri;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repository Form Controller
+ *
+ * @since 1.6
+ */
+class RepositoryController extends FormController
+{
+ use VersionableControllerTrait;
+
+ /**
+ * The prefix to use with controller messages.
+ *
+ * @var string
+ * @since 1.6
+ */
+ protected $text_prefix = 'COM_COMPONENTBUILDER_REPOSITORY';
+
+ /**
+ * Current or most recently performed task.
+ *
+ * @var string
+ * @since 12.2
+ * @note Replaces _task.
+ */
+ protected $task;
+
+ /**
+ * The URL view list variable.
+ *
+ * @var string
+ * @since 1.6
+ */
+ protected $view_list = 'repositories';
+
+ /**
+ * Method override to check if you can add a new record.
+ *
+ * @param array $data An array of input data.
+ *
+ * @return boolean
+ *
+ * @since 1.6
+ */
+ protected function allowAdd($data = [])
+ {
+ // Get user object.
+ $user = $this->app->getIdentity();
+ // Access check.
+ $access = $user->authorise('repository.access', 'com_componentbuilder');
+ if (!$access)
+ {
+ return false;
+ }
+
+ // In the absence of better information, revert to the component permissions.
+ return $user->authorise('repository.create', $this->option);
+ }
+
+ /**
+ * Method override to check if you can edit an existing record.
+ *
+ * @param array $data An array of input data.
+ * @param string $key The name of the key for the primary key.
+ *
+ * @return boolean
+ *
+ * @since 1.6
+ */
+ protected function allowEdit($data = [], $key = 'id')
+ {
+ // get user object.
+ $user = $this->app->getIdentity();
+ // get record id.
+ $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
+
+
+ // Access check.
+ $access = ($user->authorise('repository.access', 'com_componentbuilder.repository.' . (int) $recordId) && $user->authorise('repository.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ return false;
+ }
+
+ if ($recordId)
+ {
+ // The record has been set. Check the record permissions.
+ $permission = $user->authorise('repository.edit', 'com_componentbuilder.repository.' . (int) $recordId);
+ if (!$permission)
+ {
+ if ($user->authorise('repository.edit.own', 'com_componentbuilder.repository.' . $recordId))
+ {
+ // Now test the owner is the user.
+ $ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
+ if (empty($ownerId))
+ {
+ // Need to do a lookup from the model.
+ $record = $this->getModel()->getItem($recordId);
+
+ if (empty($record))
+ {
+ return false;
+ }
+ $ownerId = $record->created_by;
+ }
+
+ // If the owner matches 'me' then allow.
+ if ($ownerId == $user->id)
+ {
+ if ($user->authorise('repository.edit.own', 'com_componentbuilder'))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }
+ // Since there is no permission, revert to the component permissions.
+ return $user->authorise('repository.edit', $this->option);
+ }
+
+ /**
+ * Gets the URL arguments to append to an item redirect.
+ *
+ * @param integer $recordId The primary key id for the item.
+ * @param string $urlVar The name of the URL variable for the id.
+ *
+ * @return string The arguments to append to the redirect URL.
+ *
+ * @since 1.6
+ */
+ protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
+ {
+ // get the referral options (old method use return instead see parent)
+ $ref = $this->input->get('ref', 0, 'string');
+ $refid = $this->input->get('refid', 0, 'int');
+
+ // get redirect info.
+ $append = parent::getRedirectToItemAppend($recordId, $urlVar);
+
+ // set the referral options
+ if ($refid && $ref)
+ {
+ $append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
+ }
+ elseif ($ref)
+ {
+ $append = '&ref='. (string) $ref . $append;
+ }
+
+ return $append;
+ }
+
+ /**
+ * Method to run batch operations.
+ *
+ * @param object $model The model.
+ *
+ * @return boolean True if successful, false otherwise and internal error is set.
+ *
+ * @since 2.5
+ */
+ public function batch($model = null)
+ {
+ Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
+
+ // Set the model
+ $model = $this->getModel('Repository', '', []);
+
+ // Preset the redirect
+ $this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=repositories' . $this->getRedirectToListAppend(), false));
+
+ return parent::batch($model);
+ }
+
+ /**
+ * Method to cancel an edit.
+ *
+ * @param string $key The name of the primary key of the URL variable.
+ *
+ * @return boolean True if access level checks pass, false otherwise.
+ *
+ * @since 12.2
+ */
+ public function cancel($key = null)
+ {
+ // get the referral options
+ $this->ref = $this->input->get('ref', 0, 'word');
+ $this->refid = $this->input->get('refid', 0, 'int');
+
+ // Check if there is a return value
+ $return = $this->input->get('return', null, 'base64');
+
+ $cancel = parent::cancel($key);
+
+ if (!is_null($return) && Uri::isInternal(base64_decode($return)))
+ {
+ $redirect = base64_decode($return);
+
+ // Redirect to the return value.
+ $this->setRedirect(
+ Route::_(
+ $redirect, false
+ )
+ );
+ }
+ elseif ($this->refid && $this->ref)
+ {
+ $redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
+
+ // Redirect to the item screen.
+ $this->setRedirect(
+ Route::_(
+ 'index.php?option=' . $this->option . $redirect, false
+ )
+ );
+ }
+ elseif ($this->ref)
+ {
+ $redirect = '&view='.(string)$this->ref;
+
+ // Redirect to the list screen.
+ $this->setRedirect(
+ Route::_(
+ 'index.php?option=' . $this->option . $redirect, false
+ )
+ );
+ }
+ return $cancel;
+ }
+
+ /**
+ * Method to save a record.
+ *
+ * @param string $key The name of the primary key of the URL variable.
+ * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
+ *
+ * @return boolean True if successful, false otherwise.
+ *
+ * @since 12.2
+ */
+ public function save($key = null, $urlVar = null)
+ {
+ // get the referral options
+ $this->ref = $this->input->get('ref', 0, 'word');
+ $this->refid = $this->input->get('refid', 0, 'int');
+
+ // Check if there is a return value
+ $return = $this->input->get('return', null, 'base64');
+ $canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
+
+ if ($this->ref || $this->refid || $canReturn)
+ {
+ // to make sure the item is checkedin on redirect
+ $this->task = 'save';
+ }
+
+ $saved = parent::save($key, $urlVar);
+
+ // This is not needed since parent save already does this
+ // Due to the ref and refid implementation we need to add this
+ if ($canReturn)
+ {
+ $redirect = base64_decode($return);
+
+ // Redirect to the return value.
+ $this->setRedirect(
+ Route::_(
+ $redirect, false
+ )
+ );
+ }
+ elseif ($this->refid && $this->ref)
+ {
+ $redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
+
+ // Redirect to the item screen.
+ $this->setRedirect(
+ Route::_(
+ 'index.php?option=' . $this->option . $redirect, false
+ )
+ );
+ }
+ elseif ($this->ref)
+ {
+ $redirect = '&view=' . (string) $this->ref;
+
+ // Redirect to the list screen.
+ $this->setRedirect(
+ Route::_(
+ 'index.php?option=' . $this->option . $redirect, false
+ )
+ );
+ }
+ return $saved;
+ }
+
+ /**
+ * Function that allows child controller access to model data
+ * after the data has been saved.
+ *
+ * @param BaseDatabaseModel &$model The data model object.
+ * @param array $validData The validated data.
+ *
+ * @return void
+ *
+ * @since 11.1
+ */
+ protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
+ {
+ return;
+ }
+}
diff --git a/admin/src/Field/RepositoriesfilterbaseField.php b/admin/src/Field/RepositoriesfilterbaseField.php
new file mode 100644
index 000000000..a1406769e
--- /dev/null
+++ b/admin/src/Field/RepositoriesfilterbaseField.php
@@ -0,0 +1,74 @@
+
+ * @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\Component\Componentbuilder\Administrator\Field;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Field\ListField;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Component\ComponentHelper;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repositoriesfilterbase Form Field class for the Componentbuilder component
+ *
+ * @since 1.6
+ */
+class RepositoriesfilterbaseField extends ListField
+{
+ /**
+ * The repositoriesfilterbase field type.
+ *
+ * @var string
+ */
+ public $type = 'Repositoriesfilterbase';
+
+ /**
+ * Method to get a list of options for a list input.
+ *
+ * @return array An array of Html options.
+ * @since 1.6
+ */
+ protected function getOptions()
+ {
+ // Get a db connection.
+ $db = Factory::getContainer()->get(\Joomla\Database\DatabaseInterface::class);
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Select the text.
+ $query->select($db->quoteName('base'));
+ $query->from($db->quoteName('#__componentbuilder_repository'));
+ $query->order($db->quoteName('base') . ' ASC');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ $_results = $db->loadColumn();
+ $_filter = [];
+ $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_BASE_URL') . ' -');
+
+ if ($_results)
+ {
+ $_results = array_unique($_results);
+ foreach ($_results as $base)
+ {
+ // Now add the base and its text to the options array
+ $_filter[] = Html::_('select.option', $base, $base);
+ }
+ }
+ return $_filter;
+ }
+}
diff --git a/admin/src/Field/RepositoriesfilterorganisationField.php b/admin/src/Field/RepositoriesfilterorganisationField.php
new file mode 100644
index 000000000..1afdf8ca6
--- /dev/null
+++ b/admin/src/Field/RepositoriesfilterorganisationField.php
@@ -0,0 +1,74 @@
+
+ * @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\Component\Componentbuilder\Administrator\Field;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Field\ListField;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Component\ComponentHelper;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repositoriesfilterorganisation Form Field class for the Componentbuilder component
+ *
+ * @since 1.6
+ */
+class RepositoriesfilterorganisationField extends ListField
+{
+ /**
+ * The repositoriesfilterorganisation field type.
+ *
+ * @var string
+ */
+ public $type = 'Repositoriesfilterorganisation';
+
+ /**
+ * Method to get a list of options for a list input.
+ *
+ * @return array An array of Html options.
+ * @since 1.6
+ */
+ protected function getOptions()
+ {
+ // Get a db connection.
+ $db = Factory::getContainer()->get(\Joomla\Database\DatabaseInterface::class);
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Select the text.
+ $query->select($db->quoteName('organisation'));
+ $query->from($db->quoteName('#__componentbuilder_repository'));
+ $query->order($db->quoteName('organisation') . ' ASC');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ $_results = $db->loadColumn();
+ $_filter = [];
+ $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ORGANISATION') . ' -');
+
+ if ($_results)
+ {
+ $_results = array_unique($_results);
+ foreach ($_results as $organisation)
+ {
+ // Now add the organisation and its text to the options array
+ $_filter[] = Html::_('select.option', $organisation, $organisation);
+ }
+ }
+ return $_filter;
+ }
+}
diff --git a/admin/src/Field/RepositoriesfilterrepositoryField.php b/admin/src/Field/RepositoriesfilterrepositoryField.php
new file mode 100644
index 000000000..b08ffc813
--- /dev/null
+++ b/admin/src/Field/RepositoriesfilterrepositoryField.php
@@ -0,0 +1,74 @@
+
+ * @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\Component\Componentbuilder\Administrator\Field;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Field\ListField;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Component\ComponentHelper;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repositoriesfilterrepository Form Field class for the Componentbuilder component
+ *
+ * @since 1.6
+ */
+class RepositoriesfilterrepositoryField extends ListField
+{
+ /**
+ * The repositoriesfilterrepository field type.
+ *
+ * @var string
+ */
+ public $type = 'Repositoriesfilterrepository';
+
+ /**
+ * Method to get a list of options for a list input.
+ *
+ * @return array An array of Html options.
+ * @since 1.6
+ */
+ protected function getOptions()
+ {
+ // Get a db connection.
+ $db = Factory::getContainer()->get(\Joomla\Database\DatabaseInterface::class);
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Select the text.
+ $query->select($db->quoteName('repository'));
+ $query->from($db->quoteName('#__componentbuilder_repository'));
+ $query->order($db->quoteName('repository') . ' ASC');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ $_results = $db->loadColumn();
+ $_filter = [];
+ $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_REPOSITORY') . ' -');
+
+ if ($_results)
+ {
+ $_results = array_unique($_results);
+ foreach ($_results as $repository)
+ {
+ // Now add the repository and its text to the options array
+ $_filter[] = Html::_('select.option', $repository, $repository);
+ }
+ }
+ return $_filter;
+ }
+}
diff --git a/admin/src/Field/RepositoriesfiltertargetField.php b/admin/src/Field/RepositoriesfiltertargetField.php
new file mode 100644
index 000000000..d23c6e916
--- /dev/null
+++ b/admin/src/Field/RepositoriesfiltertargetField.php
@@ -0,0 +1,78 @@
+
+ * @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\Component\Componentbuilder\Administrator\Field;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Field\ListField;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Component\ComponentHelper;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repositoriesfiltertarget Form Field class for the Componentbuilder component
+ *
+ * @since 1.6
+ */
+class RepositoriesfiltertargetField extends ListField
+{
+ /**
+ * The repositoriesfiltertarget field type.
+ *
+ * @var string
+ */
+ public $type = 'Repositoriesfiltertarget';
+
+ /**
+ * Method to get a list of options for a list input.
+ *
+ * @return array An array of Html options.
+ * @since 1.6
+ */
+ protected function getOptions()
+ {
+ // Get a db connection.
+ $db = Factory::getContainer()->get(\Joomla\Database\DatabaseInterface::class);
+
+ // Create a new query object.
+ $query = $db->getQuery(true);
+
+ // Select the text.
+ $query->select($db->quoteName('target'));
+ $query->from($db->quoteName('#__componentbuilder_repository'));
+ $query->order($db->quoteName('target') . ' ASC');
+
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+
+ $_results = $db->loadColumn();
+ $_filter = [];
+ $_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_CONTENT') . ' -');
+
+ if ($_results)
+ {
+ // get repositoriesmodel
+ $_model = ComponentbuilderHelper::getModel('repositories');
+ $_results = array_unique($_results);
+ foreach ($_results as $target)
+ {
+ // Translate the target selection
+ $_text = $_model->selectionTranslation($target,'target');
+ // Now add the target and its text to the options array
+ $_filter[] = Html::_('select.option', $target, Text::_($_text));
+ }
+ }
+ return $_filter;
+ }
+}
diff --git a/admin/src/Field/SuperpowerpathsField.php b/admin/src/Field/SuperpowerpathsField.php
index fd12a8823..acc078603 100644
--- a/admin/src/Field/SuperpowerpathsField.php
+++ b/admin/src/Field/SuperpowerpathsField.php
@@ -16,7 +16,6 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Form\Field\CheckboxesField;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
-use VDM\Joomla\Utilities\Component\Helper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -37,69 +36,41 @@ class SuperpowerpathsField extends CheckboxesField
// A DynamicCheckboxes@ Field
/**
- * Method to get the data to be passed to the layout for rendering.
+ * Method to get the field options.
*
- * @return array
+ * @return array The field option objects.
*
- * @since 3.5
+ * @since 3.7.0
*/
- protected function getLayoutData()
+ protected function getOptions()
{
- $data = parent::getLayoutData();
-
- // True if the field has 'value' set. In other words, it has been stored, don't use the default values.
- $hasValue = (isset($this->value) && !empty($this->value));
-
- // If a value has been stored, use it. Otherwise, use the defaults.
- $checkedOptions = $hasValue ? $this->value : $this->checkedOptions;
-
- // get the form options
+ // Get the databse object.
+ $db = Factory::getDBO();
+ $query = $db->getQuery(true);
+ $query->select($db->quoteName(array('a.repository', 'a.organisation')))
+ ->from($db->quoteName('#__componentbuilder_repository', 'a'))
+ ->where($db->quoteName('a.published') . ' >= 1')
+ ->where($db->quoteName('a.target') . ' = 1') // super powers
+ ->order($db->quoteName('a.ordering') . ' ASC');
+ $db->setQuery((string)$query);
+ $items = $db->loadObjectList();
$options = [];
-
- // get the component params
- $params = Helper::getParams();
- $activate = $params->get('super_powers_repositories', 0);
-
- // set the default
- $default = $params->get('super_powers_core', 'joomla/super-powers');
-
- // must have one / in the path
- if (strpos($default, '/') !== false)
+ if ($items)
{
- $tmp = new \stdClass;
- $tmp->text = $tmp->value = trim($default);
- $tmp->checked = false;
- $options[$tmp->value] = $tmp;
- }
-
- if ($activate == 1)
- {
- $subform = $params->get($this->fieldname);
-
- // add the paths found in global settings
- if (is_object($subform))
+ if ($this->multiple === false)
{
- foreach ($subform as $value)
- {
- if (isset($value->owner) && strlen($value->owner) > 1 &&
- isset($value->repo) && strlen($value->repo) > 1)
- {
- $tmp = new \stdClass;
- $tmp->text = $tmp->value = trim($value->owner) . '/' . trim($value->repo);
- $tmp->checked = false;
-
- $options[$tmp->value] = $tmp;
- }
- }
+ $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
+ }
+ foreach($items as $item)
+ {
+ $path = $item->organisation . '/' . $item->repository;
+ $options[] = Html::_('select.option', $path, $path);
}
}
-
- $extraData = array(
- 'checkedOptions' => is_array($checkedOptions) ? $checkedOptions : explode(',', (string) $checkedOptions),
- 'hasValue' => $hasValue,
- 'options' => array_values($options)
- );
-
- return array_merge($data, $extraData);
+ else
+ {
+ $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_NO_ACTIVE_REPOSITORIES_FOUND'));
+ }
+ return $options;
}
}
diff --git a/admin/src/Helper/ComponentbuilderHelper.php b/admin/src/Helper/ComponentbuilderHelper.php
index dce571fdd..76d66c48f 100644
--- a/admin/src/Helper/ComponentbuilderHelper.php
+++ b/admin/src/Helper/ComponentbuilderHelper.php
@@ -6169,6 +6169,10 @@ abstract class ComponentbuilderHelper
{
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_SERVERS'), 'index.php?option=com_componentbuilder&view=servers', $submenu === 'servers');
}
+ if ($user->authorise('repository.access', 'com_componentbuilder') && $user->authorise('repository.submenu', 'com_componentbuilder'))
+ {
+ \JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_REPOSITORIES'), 'index.php?option=com_componentbuilder&view=repositories', $submenu === 'repositories');
+ }
if ($user->authorise('help_document.access', 'com_componentbuilder') && $user->authorise('help_document.submenu', 'com_componentbuilder'))
{
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_componentbuilder&view=help_documents', $submenu === 'help_documents');
diff --git a/admin/src/Model/ComponentbuilderModel.php b/admin/src/Model/ComponentbuilderModel.php
index 7c6791ded..c0a40ecf2 100644
--- a/admin/src/Model/ComponentbuilderModel.php
+++ b/admin/src/Model/ComponentbuilderModel.php
@@ -67,7 +67,7 @@ class ComponentbuilderModel extends ListModel
$icons = [];
// view groups array
$viewGroups = array(
- 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.languages', 'png.servers', 'png.help_documents')
+ 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.languages', 'png.servers', 'png.repositories', 'png.help_documents')
);
// view access array
$viewAccess = [
@@ -184,6 +184,11 @@ class ComponentbuilderModel extends ListModel
'server.access' => 'server.access',
'servers.submenu' => 'server.submenu',
'servers.dashboard_list' => 'server.dashboard_list',
+ 'repository.create' => 'repository.create',
+ 'repositories.access' => 'repository.access',
+ 'repository.access' => 'repository.access',
+ 'repositories.submenu' => 'repository.submenu',
+ 'repositories.dashboard_list' => 'repository.dashboard_list',
'help_document.create' => 'help_document.create',
'help_documents.access' => 'help_document.access',
'help_document.access' => 'help_document.access',
diff --git a/admin/src/Model/FieldModel.php b/admin/src/Model/FieldModel.php
index 4e79bef99..0cba29e11 100644
--- a/admin/src/Model/FieldModel.php
+++ b/admin/src/Model/FieldModel.php
@@ -84,7 +84,6 @@ class FieldModel extends AdminModel
'store',
'medium_encryption_note',
'basic_encryption_note',
- 'note_whmcs_encryption',
'note_expert_field_save_mode',
'initiator_on_save_model',
'initiator_on_get_model',
@@ -247,6 +246,12 @@ class FieldModel extends AdminModel
$item->metadata = $registry->toArray();
}
+ if (!empty($item->on_get_model_field))
+ {
+ // base64 Decode on_get_model_field.
+ $item->on_get_model_field = base64_decode($item->on_get_model_field);
+ }
+
if (!empty($item->on_save_model_field))
{
// base64 Decode on_save_model_field.
@@ -259,10 +264,10 @@ class FieldModel extends AdminModel
$item->initiator_on_get_model = base64_decode($item->initiator_on_get_model);
}
- if (!empty($item->initiator_on_save_model))
+ if (!empty($item->javascript_view_footer))
{
- // base64 Decode initiator_on_save_model.
- $item->initiator_on_save_model = base64_decode($item->initiator_on_save_model);
+ // base64 Decode javascript_view_footer.
+ $item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->css_views))
@@ -277,24 +282,18 @@ class FieldModel extends AdminModel
$item->css_view = base64_decode($item->css_view);
}
- if (!empty($item->on_get_model_field))
- {
- // base64 Decode on_get_model_field.
- $item->on_get_model_field = base64_decode($item->on_get_model_field);
- }
-
- if (!empty($item->javascript_view_footer))
- {
- // base64 Decode javascript_view_footer.
- $item->javascript_view_footer = base64_decode($item->javascript_view_footer);
- }
-
if (!empty($item->javascript_views_footer))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
+ if (!empty($item->initiator_on_save_model))
+ {
+ // base64 Decode initiator_on_save_model.
+ $item->initiator_on_save_model = base64_decode($item->initiator_on_save_model);
+ }
+
if (!empty($item->xml))
{
// JSON Decode xml.
@@ -1225,6 +1224,12 @@ class FieldModel extends AdminModel
$data['xml'] = (string) json_encode($data['xml']);
}
+ // Set the on_get_model_field string to base64 string.
+ if (isset($data['on_get_model_field']))
+ {
+ $data['on_get_model_field'] = base64_encode($data['on_get_model_field']);
+ }
+
// Set the on_save_model_field string to base64 string.
if (isset($data['on_save_model_field']))
{
@@ -1237,10 +1242,10 @@ class FieldModel extends AdminModel
$data['initiator_on_get_model'] = base64_encode($data['initiator_on_get_model']);
}
- // Set the initiator_on_save_model string to base64 string.
- if (isset($data['initiator_on_save_model']))
+ // Set the javascript_view_footer string to base64 string.
+ if (isset($data['javascript_view_footer']))
{
- $data['initiator_on_save_model'] = base64_encode($data['initiator_on_save_model']);
+ $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the css_views string to base64 string.
@@ -1255,24 +1260,18 @@ class FieldModel extends AdminModel
$data['css_view'] = base64_encode($data['css_view']);
}
- // Set the on_get_model_field string to base64 string.
- if (isset($data['on_get_model_field']))
- {
- $data['on_get_model_field'] = base64_encode($data['on_get_model_field']);
- }
-
- // Set the javascript_view_footer string to base64 string.
- if (isset($data['javascript_view_footer']))
- {
- $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
- }
-
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
}
+ // Set the initiator_on_save_model string to base64 string.
+ if (isset($data['initiator_on_save_model']))
+ {
+ $data['initiator_on_save_model'] = base64_encode($data['initiator_on_save_model']);
+ }
+
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
diff --git a/admin/src/Model/FieldsModel.php b/admin/src/Model/FieldsModel.php
index a26656463..2135cb0fd 100644
--- a/admin/src/Model/FieldsModel.php
+++ b/admin/src/Model/FieldsModel.php
@@ -396,7 +396,6 @@ class FieldsModel extends ListModel
2 => 'COM_COMPONENTBUILDER_FIELD_BASE64',
3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY',
5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY',
- 4 => 'COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION',
6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM'
);
// Now check if value is found in this array
diff --git a/admin/src/Model/FieldtypeModel.php b/admin/src/Model/FieldtypeModel.php
index a3c626167..756982865 100644
--- a/admin/src/Model/FieldtypeModel.php
+++ b/admin/src/Model/FieldtypeModel.php
@@ -519,7 +519,6 @@ class FieldtypeModel extends AdminModel
2 => 'COM_COMPONENTBUILDER_FIELD_BASE64',
3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY',
5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY',
- 4 => 'COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION',
6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM'
);
// Now check if value is found in this array
diff --git a/admin/src/Model/Joomla_componentModel.php b/admin/src/Model/Joomla_componentModel.php
index 216319641..48736fb4f 100644
--- a/admin/src/Model/Joomla_componentModel.php
+++ b/admin/src/Model/Joomla_componentModel.php
@@ -77,12 +77,6 @@ class Joomla_componentModel extends AdminModel
'author',
'email',
'website',
- 'add_license',
- 'license_type',
- 'note_whmcs_lisencing_note',
- 'whmcs_key',
- 'whmcs_url',
- 'whmcs_buy_link',
'license',
'bom',
'image',
@@ -97,30 +91,6 @@ class Joomla_componentModel extends AdminModel
'not_required'
)
),
- 'libs_helpers' => array(
- 'fullwidth' => array(
- 'creatuserhelper',
- 'adduikit',
- 'addfootable',
- 'add_email_helper',
- 'add_php_helper_both',
- 'php_helper_both',
- 'add_php_helper_admin',
- 'php_helper_admin',
- 'add_admin_event',
- 'php_admin_event',
- 'add_php_helper_site',
- 'php_helper_site',
- 'add_site_event',
- 'php_site_event',
- 'add_javascript',
- 'javascript',
- 'add_css_admin',
- 'css_admin',
- 'add_css_site',
- 'css_site'
- )
- ),
'dynamic_integration' => array(
'left' => array(
'add_update_server',
@@ -150,6 +120,15 @@ class Joomla_componentModel extends AdminModel
'crowdin_account_api_key'
)
),
+ 'mysql' => array(
+ 'fullwidth' => array(
+ 'add_sql',
+ 'sql',
+ 'add_sql_uninstall',
+ 'sql_uninstall',
+ 'assets_table_fix'
+ )
+ ),
'dash_install' => array(
'left' => array(
'dashboard_type'
@@ -174,6 +153,30 @@ class Joomla_componentModel extends AdminModel
'php_method_install'
)
),
+ 'libs_helpers' => array(
+ 'fullwidth' => array(
+ 'creatuserhelper',
+ 'adduikit',
+ 'addfootable',
+ 'add_email_helper',
+ 'add_php_helper_both',
+ 'php_helper_both',
+ 'add_php_helper_admin',
+ 'php_helper_admin',
+ 'add_admin_event',
+ 'php_admin_event',
+ 'add_php_helper_site',
+ 'php_helper_site',
+ 'add_site_event',
+ 'php_site_event',
+ 'add_javascript',
+ 'javascript',
+ 'add_css_admin',
+ 'css_admin',
+ 'add_css_site',
+ 'css_site'
+ )
+ ),
'readme' => array(
'left' => array(
'addreadme',
@@ -183,15 +186,6 @@ class Joomla_componentModel extends AdminModel
'note_readme'
)
),
- 'mysql' => array(
- 'fullwidth' => array(
- 'add_sql',
- 'sql',
- 'add_sql_uninstall',
- 'sql_uninstall',
- 'assets_table_fix'
- )
- ),
'dynamic_build' => array(
'fullwidth' => array(
'note_buildcomp_dynamic_mysql',
@@ -403,58 +397,22 @@ class Joomla_componentModel extends AdminModel
$item->metadata = $registry->toArray();
}
- if (!empty($item->php_site_event))
+ if (!empty($item->sql_uninstall))
{
- // base64 Decode php_site_event.
- $item->php_site_event = base64_decode($item->php_site_event);
+ // base64 Decode sql_uninstall.
+ $item->sql_uninstall = base64_decode($item->sql_uninstall);
}
- if (!empty($item->php_admin_event))
+ if (!empty($item->php_postflight_update))
{
- // base64 Decode php_admin_event.
- $item->php_admin_event = base64_decode($item->php_admin_event);
+ // base64 Decode php_postflight_update.
+ $item->php_postflight_update = base64_decode($item->php_postflight_update);
}
- if (!empty($item->php_preflight_install))
+ if (!empty($item->css_site))
{
- // base64 Decode php_preflight_install.
- $item->php_preflight_install = base64_decode($item->php_preflight_install);
- }
-
- if (!empty($item->php_method_uninstall))
- {
- // base64 Decode php_method_uninstall.
- $item->php_method_uninstall = base64_decode($item->php_method_uninstall);
- }
-
- if (!empty($item->css_admin))
- {
- // base64 Decode css_admin.
- $item->css_admin = base64_decode($item->css_admin);
- }
-
- if (!empty($item->php_postflight_install))
- {
- // base64 Decode php_postflight_install.
- $item->php_postflight_install = base64_decode($item->php_postflight_install);
- }
-
- if (!empty($item->sql))
- {
- // base64 Decode sql.
- $item->sql = base64_decode($item->sql);
- }
-
- if (!empty($item->buildcompsql))
- {
- // base64 Decode buildcompsql.
- $item->buildcompsql = base64_decode($item->buildcompsql);
- }
-
- if (!empty($item->php_helper_admin))
- {
- // base64 Decode php_helper_admin.
- $item->php_helper_admin = base64_decode($item->php_helper_admin);
+ // base64 Decode css_site.
+ $item->css_site = base64_decode($item->css_site);
}
if (!empty($item->php_helper_site))
@@ -469,10 +427,28 @@ class Joomla_componentModel extends AdminModel
$item->javascript = base64_decode($item->javascript);
}
- if (!empty($item->css_site))
+ if (!empty($item->php_method_install))
{
- // base64 Decode css_site.
- $item->css_site = base64_decode($item->css_site);
+ // base64 Decode php_method_install.
+ $item->php_method_install = base64_decode($item->php_method_install);
+ }
+
+ if (!empty($item->php_admin_event))
+ {
+ // base64 Decode php_admin_event.
+ $item->php_admin_event = base64_decode($item->php_admin_event);
+ }
+
+ if (!empty($item->php_site_event))
+ {
+ // base64 Decode php_site_event.
+ $item->php_site_event = base64_decode($item->php_site_event);
+ }
+
+ if (!empty($item->css_admin))
+ {
+ // base64 Decode css_admin.
+ $item->css_admin = base64_decode($item->css_admin);
}
if (!empty($item->php_preflight_update))
@@ -481,22 +457,34 @@ class Joomla_componentModel extends AdminModel
$item->php_preflight_update = base64_decode($item->php_preflight_update);
}
- if (!empty($item->php_postflight_update))
+ if (!empty($item->php_preflight_install))
{
- // base64 Decode php_postflight_update.
- $item->php_postflight_update = base64_decode($item->php_postflight_update);
+ // base64 Decode php_preflight_install.
+ $item->php_preflight_install = base64_decode($item->php_preflight_install);
}
- if (!empty($item->php_method_install))
+ if (!empty($item->php_postflight_install))
{
- // base64 Decode php_method_install.
- $item->php_method_install = base64_decode($item->php_method_install);
+ // base64 Decode php_postflight_install.
+ $item->php_postflight_install = base64_decode($item->php_postflight_install);
}
- if (!empty($item->sql_uninstall))
+ if (!empty($item->php_method_uninstall))
{
- // base64 Decode sql_uninstall.
- $item->sql_uninstall = base64_decode($item->sql_uninstall);
+ // base64 Decode php_method_uninstall.
+ $item->php_method_uninstall = base64_decode($item->php_method_uninstall);
+ }
+
+ if (!empty($item->sql))
+ {
+ // base64 Decode sql.
+ $item->sql = base64_decode($item->sql);
+ }
+
+ if (!empty($item->buildcompsql))
+ {
+ // base64 Decode buildcompsql.
+ $item->buildcompsql = base64_decode($item->buildcompsql);
}
if (!empty($item->readme))
@@ -511,6 +499,12 @@ class Joomla_componentModel extends AdminModel
$item->php_helper_both = base64_decode($item->php_helper_both);
}
+ if (!empty($item->php_helper_admin))
+ {
+ // base64 Decode php_helper_admin.
+ $item->php_helper_admin = base64_decode($item->php_helper_admin);
+ }
+
// Get the basic encryption.
$basickey = ComponentbuilderHelper::getCryptKey('basic');
// Get the encryption object.
@@ -522,12 +516,6 @@ class Joomla_componentModel extends AdminModel
$item->crowdin_username = rtrim($basic->decryptString($item->crowdin_username), "\0");
}
- if (!empty($item->whmcs_key) && $basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true)))
- {
- // basic decrypt data whmcs_key.
- $item->whmcs_key = rtrim($basic->decryptString($item->whmcs_key), "\0");
- }
-
if (!empty($item->export_key) && $basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true)))
{
// basic decrypt data export_key.
@@ -1500,58 +1488,22 @@ class Joomla_componentModel extends AdminModel
$data['addcontributors'] = '';
}
- // Set the php_site_event string to base64 string.
- if (isset($data['php_site_event']))
+ // Set the sql_uninstall string to base64 string.
+ if (isset($data['sql_uninstall']))
{
- $data['php_site_event'] = base64_encode($data['php_site_event']);
+ $data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
}
- // Set the php_admin_event string to base64 string.
- if (isset($data['php_admin_event']))
+ // Set the php_postflight_update string to base64 string.
+ if (isset($data['php_postflight_update']))
{
- $data['php_admin_event'] = base64_encode($data['php_admin_event']);
+ $data['php_postflight_update'] = base64_encode($data['php_postflight_update']);
}
- // Set the php_preflight_install string to base64 string.
- if (isset($data['php_preflight_install']))
+ // Set the css_site string to base64 string.
+ if (isset($data['css_site']))
{
- $data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
- }
-
- // Set the php_method_uninstall string to base64 string.
- if (isset($data['php_method_uninstall']))
- {
- $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']);
- }
-
- // Set the css_admin string to base64 string.
- if (isset($data['css_admin']))
- {
- $data['css_admin'] = base64_encode($data['css_admin']);
- }
-
- // Set the php_postflight_install string to base64 string.
- if (isset($data['php_postflight_install']))
- {
- $data['php_postflight_install'] = base64_encode($data['php_postflight_install']);
- }
-
- // Set the sql string to base64 string.
- if (isset($data['sql']))
- {
- $data['sql'] = base64_encode($data['sql']);
- }
-
- // Set the buildcompsql string to base64 string.
- if (isset($data['buildcompsql']))
- {
- $data['buildcompsql'] = base64_encode($data['buildcompsql']);
- }
-
- // Set the php_helper_admin string to base64 string.
- if (isset($data['php_helper_admin']))
- {
- $data['php_helper_admin'] = base64_encode($data['php_helper_admin']);
+ $data['css_site'] = base64_encode($data['css_site']);
}
// Set the php_helper_site string to base64 string.
@@ -1566,10 +1518,28 @@ class Joomla_componentModel extends AdminModel
$data['javascript'] = base64_encode($data['javascript']);
}
- // Set the css_site string to base64 string.
- if (isset($data['css_site']))
+ // Set the php_method_install string to base64 string.
+ if (isset($data['php_method_install']))
{
- $data['css_site'] = base64_encode($data['css_site']);
+ $data['php_method_install'] = base64_encode($data['php_method_install']);
+ }
+
+ // Set the php_admin_event string to base64 string.
+ if (isset($data['php_admin_event']))
+ {
+ $data['php_admin_event'] = base64_encode($data['php_admin_event']);
+ }
+
+ // Set the php_site_event string to base64 string.
+ if (isset($data['php_site_event']))
+ {
+ $data['php_site_event'] = base64_encode($data['php_site_event']);
+ }
+
+ // Set the css_admin string to base64 string.
+ if (isset($data['css_admin']))
+ {
+ $data['css_admin'] = base64_encode($data['css_admin']);
}
// Set the php_preflight_update string to base64 string.
@@ -1578,22 +1548,34 @@ class Joomla_componentModel extends AdminModel
$data['php_preflight_update'] = base64_encode($data['php_preflight_update']);
}
- // Set the php_postflight_update string to base64 string.
- if (isset($data['php_postflight_update']))
+ // Set the php_preflight_install string to base64 string.
+ if (isset($data['php_preflight_install']))
{
- $data['php_postflight_update'] = base64_encode($data['php_postflight_update']);
+ $data['php_preflight_install'] = base64_encode($data['php_preflight_install']);
}
- // Set the php_method_install string to base64 string.
- if (isset($data['php_method_install']))
+ // Set the php_postflight_install string to base64 string.
+ if (isset($data['php_postflight_install']))
{
- $data['php_method_install'] = base64_encode($data['php_method_install']);
+ $data['php_postflight_install'] = base64_encode($data['php_postflight_install']);
}
- // Set the sql_uninstall string to base64 string.
- if (isset($data['sql_uninstall']))
+ // Set the php_method_uninstall string to base64 string.
+ if (isset($data['php_method_uninstall']))
{
- $data['sql_uninstall'] = base64_encode($data['sql_uninstall']);
+ $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']);
+ }
+
+ // Set the sql string to base64 string.
+ if (isset($data['sql']))
+ {
+ $data['sql'] = base64_encode($data['sql']);
+ }
+
+ // Set the buildcompsql string to base64 string.
+ if (isset($data['buildcompsql']))
+ {
+ $data['buildcompsql'] = base64_encode($data['buildcompsql']);
}
// Set the readme string to base64 string.
@@ -1608,6 +1590,12 @@ class Joomla_componentModel extends AdminModel
$data['php_helper_both'] = base64_encode($data['php_helper_both']);
}
+ // Set the php_helper_admin string to base64 string.
+ if (isset($data['php_helper_admin']))
+ {
+ $data['php_helper_admin'] = base64_encode($data['php_helper_admin']);
+ }
+
// Get the basic encryption key.
$basickey = ComponentbuilderHelper::getCryptKey('basic');
// Get the encryption object
@@ -1619,12 +1607,6 @@ class Joomla_componentModel extends AdminModel
$data['crowdin_username'] = $basic->encryptString($data['crowdin_username']);
}
- // Encrypt data whmcs_key.
- if (isset($data['whmcs_key']) && $basickey)
- {
- $data['whmcs_key'] = $basic->encryptString($data['whmcs_key']);
- }
-
// Encrypt data export_key.
if (isset($data['export_key']) && $basickey)
{
diff --git a/admin/src/Model/Joomla_componentsModel.php b/admin/src/Model/Joomla_componentsModel.php
index d2cd8955c..8a157cd67 100644
--- a/admin/src/Model/Joomla_componentsModel.php
+++ b/admin/src/Model/Joomla_componentsModel.php
@@ -2745,48 +2745,41 @@ class Joomla_componentsModel extends ListModel
continue;
}
- // decode php_site_event
- $item->php_site_event = base64_decode($item->php_site_event);
+ // decode sql_uninstall
+ $item->sql_uninstall = base64_decode($item->sql_uninstall);
+ // decode php_postflight_update
+ $item->php_postflight_update = base64_decode($item->php_postflight_update);
+ // decode css_site
+ $item->css_site = base64_decode($item->css_site);
+ // decode php_helper_site
+ $item->php_helper_site = base64_decode($item->php_helper_site);
+ // decode javascript
+ $item->javascript = base64_decode($item->javascript);
+ // decode php_method_install
+ $item->php_method_install = base64_decode($item->php_method_install);
// decode php_admin_event
$item->php_admin_event = base64_decode($item->php_admin_event);
+ // decode php_site_event
+ $item->php_site_event = base64_decode($item->php_site_event);
+ // decode css_admin
+ $item->css_admin = base64_decode($item->css_admin);
+ // decode php_preflight_update
+ $item->php_preflight_update = base64_decode($item->php_preflight_update);
+ // decode php_preflight_install
+ $item->php_preflight_install = base64_decode($item->php_preflight_install);
+ // decode php_postflight_install
+ $item->php_postflight_install = base64_decode($item->php_postflight_install);
+ // decode php_method_uninstall
+ $item->php_method_uninstall = base64_decode($item->php_method_uninstall);
+ // decode sql
+ $item->sql = base64_decode($item->sql);
if ($basickey && !is_numeric($item->crowdin_username) && $item->crowdin_username === base64_encode(base64_decode($item->crowdin_username, true)))
{
// decrypt crowdin_username
$item->crowdin_username = $basic->decryptString($item->crowdin_username);
}
- // decode php_preflight_install
- $item->php_preflight_install = base64_decode($item->php_preflight_install);
- // decode php_method_uninstall
- $item->php_method_uninstall = base64_decode($item->php_method_uninstall);
- // decode css_admin
- $item->css_admin = base64_decode($item->css_admin);
- // decode php_postflight_install
- $item->php_postflight_install = base64_decode($item->php_postflight_install);
- // decode sql
- $item->sql = base64_decode($item->sql);
// decode buildcompsql
$item->buildcompsql = base64_decode($item->buildcompsql);
- // decode php_helper_admin
- $item->php_helper_admin = base64_decode($item->php_helper_admin);
- // decode php_helper_site
- $item->php_helper_site = base64_decode($item->php_helper_site);
- if ($basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true)))
- {
- // decrypt whmcs_key
- $item->whmcs_key = $basic->decryptString($item->whmcs_key);
- }
- // decode javascript
- $item->javascript = base64_decode($item->javascript);
- // decode css_site
- $item->css_site = base64_decode($item->css_site);
- // decode php_preflight_update
- $item->php_preflight_update = base64_decode($item->php_preflight_update);
- // decode php_postflight_update
- $item->php_postflight_update = base64_decode($item->php_postflight_update);
- // decode php_method_install
- $item->php_method_install = base64_decode($item->php_method_install);
- // decode sql_uninstall
- $item->sql_uninstall = base64_decode($item->sql_uninstall);
if ($basickey && !is_numeric($item->export_key) && $item->export_key === base64_encode(base64_decode($item->export_key, true)))
{
// decrypt export_key
@@ -2799,13 +2792,15 @@ class Joomla_componentsModel extends ListModel
// decrypt crowdin_project_api_key
$item->crowdin_project_api_key = $basic->decryptString($item->crowdin_project_api_key);
}
+ // decode php_helper_both
+ $item->php_helper_both = base64_decode($item->php_helper_both);
if ($basickey && !is_numeric($item->crowdin_account_api_key) && $item->crowdin_account_api_key === base64_encode(base64_decode($item->crowdin_account_api_key, true)))
{
// decrypt crowdin_account_api_key
$item->crowdin_account_api_key = $basic->decryptString($item->crowdin_account_api_key);
}
- // decode php_helper_both
- $item->php_helper_both = base64_decode($item->php_helper_both);
+ // decode php_helper_admin
+ $item->php_helper_admin = base64_decode($item->php_helper_admin);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
diff --git a/admin/src/Model/PowersModel.php b/admin/src/Model/PowersModel.php
index e05d4a7c2..4a74b6c85 100644
--- a/admin/src/Model/PowersModel.php
+++ b/admin/src/Model/PowersModel.php
@@ -23,7 +23,6 @@ use Joomla\Utilities\ArrayHelper;
use Joomla\Input\Input;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Helper\TagsHelper;
-use VDM\Joomla\Utilities\Component\Helper as JCBHelper;
use VDM\Joomla\Componentbuilder\Utilities\FilterHelper as JCBFilterHelper;
use VDM\Joomla\Utilities\FormHelper as JCBFormHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
@@ -117,7 +116,7 @@ class PowersModel extends ListModel
// load form from the parent class
$form = parent::getFilterForm($data, $loadData);
- // Create the "admin_view" filter
+ // Create the "namegroup" filter
$attributes = array(
'name' => 'namegroup',
'type' => 'list',
@@ -126,7 +125,7 @@ class PowersModel extends ListModel
$options = array(
'' => '- ' . Text::_('COM_COMPONENTBUILDER_NO_NAMESPACE_FOUND') . ' -'
);
- // check if we have namespace (and limit to an extension if it is set)
+ // check if we have namespace
if (($namespaces = JCBFilterHelper::namespaces()) !== null)
{
$options = array(
@@ -144,54 +143,33 @@ class PowersModel extends ListModel
);
array_push($this->filter_fields, 'namegroup');
- // get the component params
- $params = JCBHelper::getParams();
- $activate = $params->get('super_powers_repositories', 0);
- if ($activate == 1)
+ // Create the "approved_paths" filter
+ $attributes = array(
+ 'name' => 'approved_paths',
+ 'type' => 'list',
+ 'onchange' => 'this.form.submit();',
+ );
+ $options = array(
+ '' => '- ' . Text::_('COM_COMPONENTBUILDER_NO_PATHS_FOUND') . ' -'
+ );
+ // check if we have approved_paths = 1
+ if (($approvedpaths = JCBFilterHelper::repositories(1)) !== null)
{
- $subform = $params->get('approved_paths', null);
-
- // create approved paths filter
- $attributes = array(
- 'name' => 'approved_paths',
- 'type' => 'list',
- 'onchange' => 'this.form.submit();',
- );
$options = array(
- '' => '- ' . Text::_('COM_COMPONENTBUILDER_NO_PATHS_FOUND') . ' -'
+ '' => '- ' . Text::_('COM_COMPONENTBUILDER_SELECT_APPROVED_PATH') . ' -'
);
-
- // add the paths found in global settings
- if (is_object($subform))
- {
- $core = $params->get('super_powers_core', 'joomla/super-powers');
-
- $options = array(
- '' => '- ' . Text::_('COM_COMPONENTBUILDER_SELECT_APPROVED_PATH') . ' -',
- $core => $core
- );
-
- foreach ($subform as $value)
- {
- if (isset($value->owner) && strlen($value->owner) > 1 &&
- isset($value->repo) && strlen($value->repo) > 1)
- {
- $value = trim($value->owner) . '/' . trim($value->repo);
-
- $options[$value] = $value;
- }
- }
- }
-
- $form->setField(JCBFormHelper::xml($attributes, $options), 'filter');
- $form->setValue(
- 'approved_paths',
- 'filter',
- $this->state->get("filter.approved_paths")
- );
- array_push($this->filter_fields, 'approved_paths');
+ // make sure we do not lose the key values in normal merge
+ $options = $options + $approvedpaths;
}
+ $form->setField(JCBFormHelper::xml($attributes, $options),'filter');
+ $form->setValue(
+ 'approved_paths',
+ 'filter',
+ $this->state->get("filter.approved_paths")
+ );
+ array_push($this->filter_fields, 'approved_paths');
+
return $form;
}
diff --git a/admin/src/Model/RepositoriesModel.php b/admin/src/Model/RepositoriesModel.php
new file mode 100644
index 000000000..bd30b680c
--- /dev/null
+++ b/admin/src/Model/RepositoriesModel.php
@@ -0,0 +1,559 @@
+
+ * @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\Component\Componentbuilder\Administrator\Model;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Application\CMSApplicationInterface;
+use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\MVC\Model\ListModel;
+use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Router\Route;
+use Joomla\CMS\User\User;
+use Joomla\Utilities\ArrayHelper;
+use Joomla\Input\Input;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+use Joomla\CMS\Helper\TagsHelper;
+use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use VDM\Joomla\Utilities\ObjectHelper;
+use VDM\Joomla\Utilities\StringHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repositories List Model
+ *
+ * @since 1.6
+ */
+class RepositoriesModel extends ListModel
+{
+ /**
+ * The application object.
+ *
+ * @var CMSApplicationInterface The application instance.
+ * @since 3.2.0
+ */
+ protected CMSApplicationInterface $app;
+
+ /**
+ * The styles array.
+ *
+ * @var array
+ * @since 4.3
+ */
+ protected array $styles = [
+ 'administrator/components/com_componentbuilder/assets/css/admin.css',
+ 'administrator/components/com_componentbuilder/assets/css/repositories.css'
+ ];
+
+ /**
+ * The scripts array.
+ *
+ * @var array
+ * @since 4.3
+ */
+ protected array $scripts = [
+ 'administrator/components/com_componentbuilder/assets/js/admin.js'
+ ];
+
+ /**
+ * Constructor
+ *
+ * @param array $config An array of configuration options (name, state, dbo, table_path, ignore_request).
+ * @param ?MVCFactoryInterface $factory The factory.
+ *
+ * @since 1.6
+ * @throws \Exception
+ */
+ public function __construct($config = [], MVCFactoryInterface $factory = null)
+ {
+ if (empty($config['filter_fields']))
+ {
+ $config['filter_fields'] = array(
+ 'a.id','id',
+ 'a.published','published',
+ 'a.access','access',
+ 'a.ordering','ordering',
+ 'a.created_by','created_by',
+ 'a.modified_by','modified_by',
+ 'a.organisation','organisation',
+ 'a.repository','repository',
+ 'a.target','target',
+ 'a.base','base',
+ 'a.type','type'
+ );
+ }
+
+ parent::__construct($config, $factory);
+
+ $this->app ??= Factory::getApplication();
+ }
+
+ /**
+ * Method to auto-populate the model state.
+ *
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @param string $ordering An optional ordering field.
+ * @param string $direction An optional direction (asc|desc).
+ *
+ * @return void
+ * @since 1.7.0
+ */
+ protected function populateState($ordering = null, $direction = null)
+ {
+ $app = $this->app;
+
+ // Adjust the context to support modal layouts.
+ if ($layout = $app->input->get('layout'))
+ {
+ $this->context .= '.' . $layout;
+ }
+
+ // Check if the form was submitted
+ $formSubmited = $app->input->post->get('form_submited');
+
+ $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
+ if ($formSubmited)
+ {
+ $access = $app->input->post->get('access');
+ $this->setState('filter.access', $access);
+ }
+
+ $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
+ $this->setState('filter.published', $published);
+
+ $created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
+ $this->setState('filter.created_by', $created_by);
+
+ $created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
+ $this->setState('filter.created', $created);
+
+ $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
+ $this->setState('filter.sorting', $sorting);
+
+ $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
+ $this->setState('filter.search', $search);
+
+ $organisation = $this->getUserStateFromRequest($this->context . '.filter.organisation', 'filter_organisation');
+ if ($formSubmited)
+ {
+ $organisation = $app->input->post->get('organisation');
+ $this->setState('filter.organisation', $organisation);
+ }
+
+ $repository = $this->getUserStateFromRequest($this->context . '.filter.repository', 'filter_repository');
+ if ($formSubmited)
+ {
+ $repository = $app->input->post->get('repository');
+ $this->setState('filter.repository', $repository);
+ }
+
+ $target = $this->getUserStateFromRequest($this->context . '.filter.target', 'filter_target');
+ if ($formSubmited)
+ {
+ $target = $app->input->post->get('target');
+ $this->setState('filter.target', $target);
+ }
+
+ $base = $this->getUserStateFromRequest($this->context . '.filter.base', 'filter_base');
+ if ($formSubmited)
+ {
+ $base = $app->input->post->get('base');
+ $this->setState('filter.base', $base);
+ }
+
+ $type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
+ if ($formSubmited)
+ {
+ $type = $app->input->post->get('type');
+ $this->setState('filter.type', $type);
+ }
+
+ // List state information.
+ parent::populateState($ordering, $direction);
+ }
+
+ /**
+ * Method to get an array of data items.
+ *
+ * @return mixed An array of data items on success, false on failure.
+ * @since 1.6
+ */
+ public function getItems()
+ {
+ // Check in items
+ $this->checkInNow();
+
+ // load parent items
+ $items = parent::getItems();
+
+ // Set values to display correctly.
+ if (UtilitiesArrayHelper::check($items))
+ {
+ // Get the user object if not set.
+ if (!isset($user) || !ObjectHelper::check($user))
+ {
+ $user = $this->getCurrentUser();
+ }
+ foreach ($items as $nr => &$item)
+ {
+ // Remove items the user can't access.
+ $access = ($user->authorise('repository.access', 'com_componentbuilder.repository.' . (int) $item->id) && $user->authorise('repository.access', 'com_componentbuilder'));
+ if (!$access)
+ {
+ unset($items[$nr]);
+ continue;
+ }
+
+ }
+ }
+
+ // set selection value to a translatable value
+ if (UtilitiesArrayHelper::check($items))
+ {
+ foreach ($items as $nr => &$item)
+ {
+ // convert target
+ $item->target = $this->selectionTranslation($item->target, 'target');
+ // convert type
+ $item->type = $this->selectionTranslation($item->type, 'type');
+ }
+ }
+
+
+ // return items
+ return $items;
+ }
+
+ /**
+ * Method to convert selection values to translatable string.
+ *
+ * @return string The translatable string.
+ */
+ public function selectionTranslation($value,$name)
+ {
+ // Array of target language strings
+ if ($name === 'target')
+ {
+ $targetArray = array(
+ 0 => 'COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION',
+ 1 => 'COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER',
+ 2 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER'
+ );
+ // Now check if value is found in this array
+ if (isset($targetArray[$value]) && StringHelper::check($targetArray[$value]))
+ {
+ return $targetArray[$value];
+ }
+ }
+ // Array of type language strings
+ if ($name === 'type')
+ {
+ $typeArray = array(
+ 0 => 'COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION',
+ 1 => 'COM_COMPONENTBUILDER_REPOSITORY_GITEA'
+ );
+ // Now check if value is found in this array
+ if (isset($typeArray[$value]) && StringHelper::check($typeArray[$value]))
+ {
+ return $typeArray[$value];
+ }
+ }
+ return $value;
+ }
+
+ /**
+ * Method to build an SQL query to load the list data.
+ *
+ * @return string An SQL query
+ * @since 1.6
+ */
+ protected function getListQuery()
+ {
+ // Get the user object.
+ $user = $this->getCurrentUser();
+ // Create a new query object.
+ $db = $this->getDatabase();
+ $query = $db->getQuery(true);
+
+ // Select some fields
+ $query->select('a.*');
+
+ // From the componentbuilder_item table
+ $query->from($db->quoteName('#__componentbuilder_repository', 'a'));
+
+ // Filter by published state
+ $published = $this->getState('filter.published');
+ if (is_numeric($published))
+ {
+ $query->where('a.published = ' . (int) $published);
+ }
+ elseif ($published === '')
+ {
+ $query->where('(a.published = 0 OR a.published = 1)');
+ }
+
+ // Join over the asset groups.
+ $query->select('ag.title AS access_level');
+ $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
+ // Filter by access level.
+ $_access = $this->getState('filter.access');
+ if ($_access && is_numeric($_access))
+ {
+ $query->where('a.access = ' . (int) $_access);
+ }
+ elseif (UtilitiesArrayHelper::check($_access))
+ {
+ // Secure the array for the query
+ $_access = ArrayHelper::toInteger($_access);
+ // Filter by the Access Array.
+ $query->where('a.access IN (' . implode(',', $_access) . ')');
+ }
+ // Implement View Level Access
+ if (!$user->authorise('core.options', 'com_componentbuilder'))
+ {
+ $groups = implode(',', $user->getAuthorisedViewLevels());
+ $query->where('a.access IN (' . $groups . ')');
+ }
+ // Filter by search.
+ $search = $this->getState('filter.search');
+ if (!empty($search))
+ {
+ if (stripos($search, 'id:') === 0)
+ {
+ $query->where('a.id = ' . (int) substr($search, 3));
+ }
+ else
+ {
+ $search = $db->quote('%' . $db->escape($search) . '%');
+ $query->where('(a.organisation LIKE '.$search.' OR a.repository LIKE '.$search.' OR a.target LIKE '.$search.' OR a.type LIKE '.$search.' OR a.base LIKE '.$search.' OR a.guid LIKE '.$search.' OR a.username LIKE '.$search.')');
+ }
+ }
+
+ // Filter by Organisation.
+ $_organisation = $this->getState('filter.organisation');
+ if (is_numeric($_organisation))
+ {
+ if (is_float($_organisation))
+ {
+ $query->where('a.organisation = ' . (float) $_organisation);
+ }
+ else
+ {
+ $query->where('a.organisation = ' . (int) $_organisation);
+ }
+ }
+ elseif (StringHelper::check($_organisation))
+ {
+ $query->where('a.organisation = ' . $db->quote($db->escape($_organisation)));
+ }
+ // Filter by Repository.
+ $_repository = $this->getState('filter.repository');
+ if (is_numeric($_repository))
+ {
+ if (is_float($_repository))
+ {
+ $query->where('a.repository = ' . (float) $_repository);
+ }
+ else
+ {
+ $query->where('a.repository = ' . (int) $_repository);
+ }
+ }
+ elseif (StringHelper::check($_repository))
+ {
+ $query->where('a.repository = ' . $db->quote($db->escape($_repository)));
+ }
+ // Filter by Target.
+ $_target = $this->getState('filter.target');
+ if (is_numeric($_target))
+ {
+ if (is_float($_target))
+ {
+ $query->where('a.target = ' . (float) $_target);
+ }
+ else
+ {
+ $query->where('a.target = ' . (int) $_target);
+ }
+ }
+ elseif (StringHelper::check($_target))
+ {
+ $query->where('a.target = ' . $db->quote($db->escape($_target)));
+ }
+ // Filter by Base.
+ $_base = $this->getState('filter.base');
+ if (is_numeric($_base))
+ {
+ if (is_float($_base))
+ {
+ $query->where('a.base = ' . (float) $_base);
+ }
+ else
+ {
+ $query->where('a.base = ' . (int) $_base);
+ }
+ }
+ elseif (StringHelper::check($_base))
+ {
+ $query->where('a.base = ' . $db->quote($db->escape($_base)));
+ }
+
+ // Add the list ordering clause.
+ $orderCol = $this->getState('list.ordering', 'a.id');
+ $orderDirn = $this->getState('list.direction', 'desc');
+ if ($orderCol != '')
+ {
+ // Check that the order direction is valid encase we have a field called direction as part of filers.
+ $orderDirn = (is_string($orderDirn) && in_array(strtolower($orderDirn), ['asc', 'desc'])) ? $orderDirn : 'desc';
+ $query->order($db->escape($orderCol . ' ' . $orderDirn));
+ }
+
+ return $query;
+ }
+
+ /**
+ * Method to get a store id based on model configuration state.
+ *
+ * @return string A store id.
+ * @since 1.6
+ */
+ protected function getStoreId($id = '')
+ {
+ // Compile the store id.
+ $id .= ':' . $this->getState('filter.id');
+ $id .= ':' . $this->getState('filter.search');
+ $id .= ':' . $this->getState('filter.published');
+ // Check if the value is an array
+ $_access = $this->getState('filter.access');
+ if (UtilitiesArrayHelper::check($_access))
+ {
+ $id .= ':' . implode(':', $_access);
+ }
+ // Check if this is only an number or string
+ elseif (is_numeric($_access)
+ || StringHelper::check($_access))
+ {
+ $id .= ':' . $_access;
+ }
+ $id .= ':' . $this->getState('filter.ordering');
+ $id .= ':' . $this->getState('filter.created_by');
+ $id .= ':' . $this->getState('filter.modified_by');
+ $id .= ':' . $this->getState('filter.organisation');
+ $id .= ':' . $this->getState('filter.repository');
+ $id .= ':' . $this->getState('filter.target');
+ $id .= ':' . $this->getState('filter.base');
+ $id .= ':' . $this->getState('filter.type');
+
+ return parent::getStoreId($id);
+ }
+
+ /**
+ * Method to get the styles that have to be included on the view
+ *
+ * @return array styles files
+ * @since 4.3
+ */
+ public function getStyles(): array
+ {
+ return $this->styles;
+ }
+
+ /**
+ * Method to set the styles that have to be included on the view
+ *
+ * @return void
+ * @since 4.3
+ */
+ public function setStyles(string $path): void
+ {
+ $this->styles[] = $path;
+ }
+
+ /**
+ * Method to get the script that have to be included on the view
+ *
+ * @return array script files
+ * @since 4.3
+ */
+ public function getScripts(): array
+ {
+ return $this->scripts;
+ }
+
+ /**
+ * Method to set the script that have to be included on the view
+ *
+ * @return void
+ * @since 4.3
+ */
+ public function setScript(string $path): void
+ {
+ $this->scripts[] = $path;
+ }
+
+ /**
+ * Build an SQL query to checkin all items left checked out longer then a set time.
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ protected function checkInNow(): bool
+ {
+ // Get set check in time
+ $time = ComponentHelper::getParams('com_componentbuilder')->get('check_in');
+
+ if ($time)
+ {
+ // Get a db connection.
+ $db = $this->getDatabase();
+ // Reset query.
+ $query = $db->getQuery(true);
+ $query->select('*');
+ $query->from($db->quoteName('#__componentbuilder_repository'));
+ // Only select items that are checked out.
+ $query->where($db->quoteName('checked_out') . '!=0');
+ $db->setQuery($query, 0, 1);
+ $db->execute();
+ if ($db->getNumRows())
+ {
+ // Get Yesterdays date.
+ $date = Factory::getDate()->modify($time)->toSql();
+ // Reset query.
+ $query = $db->getQuery(true);
+
+ // Fields to update.
+ $fields = array(
+ $db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
+ $db->quoteName('checked_out') . '=0'
+ );
+
+ // Conditions for which records should be updated.
+ $conditions = array(
+ $db->quoteName('checked_out') . '!=0',
+ $db->quoteName('checked_out_time') . '<\''.$date.'\''
+ );
+
+ // Check table.
+ $query->update($db->quoteName('#__componentbuilder_repository'))->set($fields)->where($conditions);
+
+ $db->setQuery($query);
+
+ return $db->execute();
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/admin/src/Model/RepositoryModel.php b/admin/src/Model/RepositoryModel.php
new file mode 100644
index 000000000..e43cb8312
--- /dev/null
+++ b/admin/src/Model/RepositoryModel.php
@@ -0,0 +1,968 @@
+
+ * @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\Component\Componentbuilder\Administrator\Model;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Application\CMSApplicationInterface;
+use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Form\Form;
+use Joomla\CMS\Filter\InputFilter;
+use Joomla\CMS\Filter\OutputFilter;
+use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\Table\Table;
+use Joomla\CMS\UCM\UCMType;
+use Joomla\CMS\Versioning\VersionableModelTrait;
+use Joomla\CMS\User\User;
+use Joomla\Registry\Registry;
+use Joomla\String\StringHelper;
+use Joomla\Utilities\ArrayHelper;
+use Joomla\Input\Input;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+use Joomla\CMS\Helper\TagsHelper;
+use VDM\Joomla\Utilities\GuidHelper;
+use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
+use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use VDM\Joomla\Utilities\GetHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Componentbuilder Repository Admin Model
+ *
+ * @since 1.6
+ */
+class RepositoryModel extends AdminModel
+{
+ use VersionableModelTrait;
+
+ /**
+ * The tab layout fields array.
+ *
+ * @var array
+ * @since 3.0.0
+ */
+ protected $tabLayoutFields = array(
+ 'details' => array(
+ 'left' => array(
+ 'type',
+ 'base',
+ 'username',
+ 'token'
+ ),
+ 'right' => array(
+ 'organisation',
+ 'repository',
+ 'read_branch',
+ 'write_branch'
+ ),
+ 'above' => array(
+ 'system_name',
+ 'target',
+ 'access_repo'
+ )
+ )
+ );
+
+ /**
+ * The styles array.
+ *
+ * @var array
+ * @since 4.3
+ */
+ protected array $styles = [
+ 'administrator/components/com_componentbuilder/assets/css/admin.css',
+ 'administrator/components/com_componentbuilder/assets/css/repository.css'
+ ];
+
+ /**
+ * The scripts array.
+ *
+ * @var array
+ * @since 4.3
+ */
+ protected array $scripts = [
+ 'administrator/components/com_componentbuilder/assets/js/admin.js',
+ 'media/com_componentbuilder/js/repository.js'
+ ];
+
+ /**
+ * @var string The prefix to use with controller messages.
+ * @since 1.6
+ */
+ protected $text_prefix = 'COM_COMPONENTBUILDER';
+
+ /**
+ * The type alias for this content type.
+ *
+ * @var string
+ * @since 3.2
+ */
+ public $typeAlias = 'com_componentbuilder.repository';
+
+ /**
+ * Returns a Table object, always creating it
+ *
+ * @param type $type The table type to instantiate
+ * @param string $prefix A prefix for the table class name. Optional.
+ * @param array $config Configuration array for model. Optional.
+ *
+ * @return Table A database object
+ * @since 3.0
+ * @throws \Exception
+ */
+ public function getTable($type = 'repository', $prefix = 'Administrator', $config = [])
+ {
+ // get instance of the table
+ return parent::getTable($type, $prefix, $config);
+ }
+
+ /**
+ * Method to get a single record.
+ *
+ * @param integer $pk The id of the primary key.
+ *
+ * @return mixed Object on success, false on failure.
+ * @since 1.6
+ */
+ public function getItem($pk = null)
+ {
+ if ($item = parent::getItem($pk))
+ {
+ if (!empty($item->params) && !is_array($item->params))
+ {
+ // Convert the params field to an array.
+ $registry = new Registry;
+ $registry->loadString($item->params);
+ $item->params = $registry->toArray();
+ }
+
+ if (!empty($item->metadata))
+ {
+ // Convert the metadata field to an array.
+ $registry = new Registry;
+ $registry->loadString($item->metadata);
+ $item->metadata = $registry->toArray();
+ }
+ }
+
+ return $item;
+ }
+
+ /**
+ * Method to get the record form.
+ *
+ * @param array $data Data for the form.
+ * @param boolean $loadData True if the form is to load its own data (default case), false if not.
+ * @param array $options Optional array of options for the form creation.
+ *
+ * @return Form|boolean A Form object on success, false on failure
+ * @since 1.6
+ */
+ public function getForm($data = [], $loadData = true, $options = ['control' => 'jform'])
+ {
+ // set load data option
+ $options['load_data'] = $loadData;
+ // check if xpath was set in options
+ $xpath = false;
+ if (isset($options['xpath']))
+ {
+ $xpath = $options['xpath'];
+ unset($options['xpath']);
+ }
+ // check if clear form was set in options
+ $clear = false;
+ if (isset($options['clear']))
+ {
+ $clear = $options['clear'];
+ unset($options['clear']);
+ }
+
+ // Get the form.
+ $form = $this->loadForm('com_componentbuilder.repository', 'repository', $options, $clear, $xpath);
+
+ if (empty($form))
+ {
+ return false;
+ }
+
+ $jinput = Factory::getApplication()->input;
+
+ // The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
+ if ($jinput->get('a_id'))
+ {
+ $id = $jinput->get('a_id', 0, 'INT');
+ }
+ // The back end uses id so we use that the rest of the time and set it to 0 by default.
+ else
+ {
+ $id = $jinput->get('id', 0, 'INT');
+ }
+
+ $user = Factory::getApplication()->getIdentity();
+
+ // Check for existing item.
+ // Modify the form based on Edit State access controls.
+ if ($id != 0 && (!$user->authorise('repository.edit.state', 'com_componentbuilder.repository.' . (int) $id))
+ || ($id == 0 && !$user->authorise('repository.edit.state', 'com_componentbuilder')))
+ {
+ // Disable fields for display.
+ $form->setFieldAttribute('ordering', 'disabled', 'true');
+ $form->setFieldAttribute('published', 'disabled', 'true');
+ // Disable fields while saving.
+ $form->setFieldAttribute('ordering', 'filter', 'unset');
+ $form->setFieldAttribute('published', 'filter', 'unset');
+ }
+ // If this is a new item insure the greated by is set.
+ if (0 == $id)
+ {
+ // Set the created_by to this user
+ $form->setValue('created_by', null, $user->id);
+ }
+ // Modify the form based on Edit Creaded By access controls.
+ if ($id != 0 && (!$user->authorise('repository.edit.created_by', 'com_componentbuilder.repository.' . (int) $id))
+ || ($id == 0 && !$user->authorise('repository.edit.created_by', 'com_componentbuilder')))
+ {
+ // Disable fields for display.
+ $form->setFieldAttribute('created_by', 'disabled', 'true');
+ // Disable fields for display.
+ $form->setFieldAttribute('created_by', 'readonly', 'true');
+ // Disable fields while saving.
+ $form->setFieldAttribute('created_by', 'filter', 'unset');
+ }
+ // Modify the form based on Edit Creaded Date access controls.
+ if ($id != 0 && (!$user->authorise('repository.edit.created', 'com_componentbuilder.repository.' . (int) $id))
+ || ($id == 0 && !$user->authorise('repository.edit.created', 'com_componentbuilder')))
+ {
+ // Disable fields for display.
+ $form->setFieldAttribute('created', 'disabled', 'true');
+ // Disable fields while saving.
+ $form->setFieldAttribute('created', 'filter', 'unset');
+ }
+ // Only load these values if no id is found
+ if (0 == $id)
+ {
+ // Set redirected view name
+ $redirectedView = $jinput->get('ref', null, 'STRING');
+ // Set field name (or fall back to view name)
+ $redirectedField = $jinput->get('field', $redirectedView, 'STRING');
+ // Set redirected view id
+ $redirectedId = $jinput->get('refid', 0, 'INT');
+ // Set field id (or fall back to redirected view id)
+ $redirectedValue = $jinput->get('field_id', $redirectedId, 'INT');
+ if (0 != $redirectedValue && $redirectedField)
+ {
+ // Now set the local-redirected field default value
+ $form->setValue($redirectedField, null, $redirectedValue);
+ }
+ }
+
+ // Only load the GUID if new item (or empty)
+ if (0 == $id || !($val = $form->getValue('guid')))
+ {
+ $form->setValue('guid', null, GuidHelper::get());
+ }
+
+ return $form;
+ }
+
+ /**
+ * Method to get the styles that have to be included on the view
+ *
+ * @return array styles files
+ * @since 4.3
+ */
+ public function getStyles(): array
+ {
+ return $this->styles;
+ }
+
+ /**
+ * Method to set the styles that have to be included on the view
+ *
+ * @return void
+ * @since 4.3
+ */
+ public function setStyles(string $path): void
+ {
+ $this->styles[] = $path;
+ }
+
+ /**
+ * Method to get the script that have to be included on the view
+ *
+ * @return array script files
+ * @since 4.3
+ */
+ public function getScripts(): array
+ {
+ return $this->scripts;
+ }
+
+ /**
+ * Method to set the script that have to be included on the view
+ *
+ * @return void
+ * @since 4.3
+ */
+ public function setScript(string $path): void
+ {
+ $this->scripts[] = $path;
+ }
+
+ /**
+ * Method to test whether a record can be deleted.
+ *
+ * @param object $record A record object.
+ *
+ * @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
+ * @since 1.6
+ */
+ protected function canDelete($record)
+ {
+ if (empty($record->id) || ($record->published != -2))
+ {
+ return false;
+ }
+
+ // The record has been set. Check the record permissions.
+ return $this->getCurrentUser()->authorise('repository.delete', 'com_componentbuilder.repository.' . (int) $record->id);
+ }
+
+ /**
+ * Method to test whether a record can have its state edited.
+ *
+ * @param object $record A record object.
+ *
+ * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
+ * @since 1.6
+ */
+ protected function canEditState($record)
+ {
+ $user = $this->getCurrentUser();
+ $recordId = $record->id ?? 0;
+
+ if ($recordId)
+ {
+ // The record has been set. Check the record permissions.
+ $permission = $user->authorise('repository.edit.state', 'com_componentbuilder.repository.' . (int) $recordId);
+ if (!$permission && !is_null($permission))
+ {
+ return false;
+ }
+ }
+ // In the absence of better information, revert to the component permissions.
+ return $user->authorise('repository.edit.state', 'com_componentbuilder');
+ }
+
+ /**
+ * Method override to check if you can edit an existing record.
+ *
+ * @param array $data An array of input data.
+ * @param string $key The name of the key for the primary key.
+ *
+ * @return boolean
+ * @since 2.5
+ */
+ protected function allowEdit($data = [], $key = 'id')
+ {
+ // Check specific edit permission then general edit permission.
+ $user = Factory::getApplication()->getIdentity();
+
+ return $user->authorise('repository.edit', 'com_componentbuilder.repository.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('repository.edit', 'com_componentbuilder');
+ }
+
+ /**
+ * Prepare and sanitise the table data prior to saving.
+ *
+ * @param Table $table A Table object.
+ *
+ * @return void
+ * @since 1.6
+ */
+ protected function prepareTable($table)
+ {
+ $date = Factory::getDate();
+ $user = $this->getCurrentUser();
+
+ if (isset($table->name))
+ {
+ $table->name = \htmlspecialchars_decode($table->name, ENT_QUOTES);
+ }
+
+ if (isset($table->alias) && empty($table->alias))
+ {
+ $table->generateAlias();
+ }
+
+ if (empty($table->id))
+ {
+ $table->created = $date->toSql();
+ // set the user
+ if ($table->created_by == 0 || empty($table->created_by))
+ {
+ $table->created_by = $user->id;
+ }
+ // Set ordering to the last item if not set
+ if (empty($table->ordering))
+ {
+ $db = $this->getDatabase();
+ $query = $db->getQuery(true)
+ ->select('MAX(ordering)')
+ ->from($db->quoteName('#__componentbuilder_repository'));
+ $db->setQuery($query);
+ $max = $db->loadResult();
+
+ $table->ordering = $max + 1;
+ }
+ }
+ else
+ {
+ $table->modified = $date->toSql();
+ $table->modified_by = $user->id;
+ }
+
+ if (!empty($table->id))
+ {
+ // Increment the items version number.
+ $table->version++;
+ }
+ }
+
+ /**
+ * Method to get the data that should be injected in the form.
+ *
+ * @return mixed The data for the form.
+ * @since 1.6
+ */
+ protected function loadFormData()
+ {
+ // Check the session for previously entered form data.
+ $data = Factory::getApplication()->getUserState('com_componentbuilder.edit.repository.data', []);
+
+ if (empty($data))
+ {
+ $data = $this->getItem();
+ }
+
+ // run the perprocess of the data
+ $this->preprocessData('com_componentbuilder.repository', $data);
+
+ return $data;
+ }
+
+ /**
+ * Method to get the unique fields of this table.
+ *
+ * @return mixed An array of field names, boolean false if none is set.
+ *
+ * @since 3.0
+ */
+ protected function getUniqueFields()
+ {
+ return array('guid');
+ }
+
+ /**
+ * Method to delete one or more records.
+ *
+ * @param array &$pks An array of record primary keys.
+ *
+ * @return boolean True if successful, false if an error occurs
+ * @since 12.2
+ */
+ public function delete(&$pks)
+ {
+ if (!parent::delete($pks))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Method to change the published state of one or more records.
+ *
+ * @param array &$pks A list of the primary keys to change.
+ * @param integer $value The value of the published state.
+ *
+ * @return boolean True on success.
+ * @since 12.2
+ */
+ public function publish(&$pks, $value = 1)
+ {
+ if (!parent::publish($pks, $value))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Method to perform batch operations on an item or a set of items.
+ *
+ * @param array $commands An array of commands to perform.
+ * @param array $pks An array of item ids.
+ * @param array $contexts An array of item contexts.
+ *
+ * @return boolean Returns true on success, false on failure.
+ * @since 12.2
+ */
+ public function batch($commands, $pks, $contexts)
+ {
+ // Sanitize ids.
+ $pks = array_unique($pks);
+ ArrayHelper::toInteger($pks);
+
+ // Remove any values of zero.
+ if (array_search(0, $pks, true))
+ {
+ unset($pks[array_search(0, $pks, true)]);
+ }
+
+ if (empty($pks))
+ {
+ $this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED'));
+ return false;
+ }
+
+ $done = false;
+
+ // Set some needed variables.
+ $this->user ??= $this->getCurrentUser();
+ $this->table = $this->getTable();
+ $this->tableClassName = get_class($this->table);
+ $this->contentType = new UCMType;
+ $this->type = $this->contentType->getTypeByTable($this->tableClassName);
+ $this->canDo = ComponentbuilderHelper::getActions('repository');
+ $this->batchSet = true;
+
+ if (!$this->canDo->get('core.batch'))
+ {
+ $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
+ return false;
+ }
+
+ if ($this->type == false)
+ {
+ $type = new UCMType;
+ $this->type = $type->getTypeByAlias($this->typeAlias);
+ }
+
+ $this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags');
+
+ if (!empty($commands['move_copy']))
+ {
+ $cmd = ArrayHelper::getValue($commands, 'move_copy', 'c');
+
+ if ($cmd == 'c')
+ {
+ $result = $this->batchCopy($commands, $pks, $contexts);
+
+ if (is_array($result))
+ {
+ foreach ($result as $old => $new)
+ {
+ $contexts[$new] = $contexts[$old];
+ }
+ $pks = array_values($result);
+ }
+ else
+ {
+ return false;
+ }
+ }
+ elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts))
+ {
+ return false;
+ }
+
+ $done = true;
+ }
+
+ if (!$done)
+ {
+ $this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
+ return false;
+ }
+
+ // Clear the cache
+ $this->cleanCache();
+
+ return true;
+ }
+
+ /**
+ * Batch copy items to a new category or current.
+ *
+ * @param integer $values The new values.
+ * @param array $pks An array of row IDs.
+ * @param array $contexts An array of item contexts.
+ *
+ * @return mixed An array of new IDs on success, boolean false on failure.
+ *
+ * @since 12.2
+ */
+ protected function batchCopy($values, $pks, $contexts)
+ {
+ if (empty($this->batchSet))
+ {
+ // Set some needed variables.
+ $this->user = Factory::getApplication()->getIdentity();
+ $this->table = $this->getTable();
+ $this->tableClassName = get_class($this->table);
+ $this->canDo = ComponentbuilderHelper::getActions('repository');
+ }
+
+ if (!$this->canDo->get('repository.create') && !$this->canDo->get('repository.batch'))
+ {
+ return false;
+ }
+
+ // get list of unique fields
+ $uniqueFields = $this->getUniqueFields();
+ // remove move_copy from array
+ unset($values['move_copy']);
+
+ // make sure published is set
+ if (!isset($values['published']))
+ {
+ $values['published'] = 0;
+ }
+ elseif (isset($values['published']) && !$this->canDo->get('repository.edit.state'))
+ {
+ $values['published'] = 0;
+ }
+
+ $newIds = [];
+ // Parent exists so let's proceed
+ while (!empty($pks))
+ {
+ // Pop the first ID off the stack
+ $pk = array_shift($pks);
+
+ $this->table->reset();
+
+ // only allow copy if user may edit this item.
+ if (!$this->user->authorise('repository.edit', $contexts[$pk]))
+ {
+ // Not fatal error
+ $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
+ continue;
+ }
+
+ // Check that the row actually exists
+ if (!$this->table->load($pk))
+ {
+ if ($error = $this->table->getError())
+ {
+ // Fatal error
+ $this->setError($error);
+ return false;
+ }
+ else
+ {
+ // Not fatal error
+ $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
+ continue;
+ }
+ }
+
+ // Only for strings
+ if (UtilitiesStringHelper::check($this->table->system_name) && !is_numeric($this->table->system_name))
+ {
+ $this->table->system_name = $this->generateUnique('system_name',$this->table->system_name);
+ }
+
+ // insert all set values
+ if (UtilitiesArrayHelper::check($values))
+ {
+ foreach ($values as $key => $value)
+ {
+ if (strlen($value) > 0 && isset($this->table->$key))
+ {
+ $this->table->$key = $value;
+ }
+ }
+ }
+
+ // update all unique fields
+ if (UtilitiesArrayHelper::check($uniqueFields))
+ {
+ foreach ($uniqueFields as $uniqueField)
+ {
+ $this->table->$uniqueField = $this->generateUnique($uniqueField,$this->table->$uniqueField);
+ }
+ }
+
+ // Reset the ID because we are making a copy
+ $this->table->id = 0;
+
+ // TODO: Deal with ordering?
+ // $this->table->ordering = 1;
+
+ // Check the row.
+ if (!$this->table->check())
+ {
+ $this->setError($this->table->getError());
+
+ return false;
+ }
+
+ if (!empty($this->type))
+ {
+ $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
+ }
+
+ // Store the row.
+ if (!$this->table->store())
+ {
+ $this->setError($this->table->getError());
+
+ return false;
+ }
+
+ // Get the new item ID
+ $newId = $this->table->get('id');
+
+ // Add the new ID to the array
+ $newIds[$pk] = $newId;
+ }
+
+ // Clean the cache
+ $this->cleanCache();
+
+ return $newIds;
+ }
+
+ /**
+ * Batch move items to a new category
+ *
+ * @param integer $value The new category ID.
+ * @param array $pks An array of row IDs.
+ * @param array $contexts An array of item contexts.
+ *
+ * @return boolean True if successful, false otherwise and internal error is set.
+ *
+ * @since 12.2
+ */
+ protected function batchMove($values, $pks, $contexts)
+ {
+ if (empty($this->batchSet))
+ {
+ // Set some needed variables.
+ $this->user = Factory::getApplication()->getIdentity();
+ $this->table = $this->getTable();
+ $this->tableClassName = get_class($this->table);
+ $this->canDo = ComponentbuilderHelper::getActions('repository');
+ }
+
+ if (!$this->canDo->get('repository.edit') && !$this->canDo->get('repository.batch'))
+ {
+ $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
+ return false;
+ }
+
+ // make sure published only updates if user has the permission.
+ if (isset($values['published']) && !$this->canDo->get('repository.edit.state'))
+ {
+ unset($values['published']);
+ }
+ // remove move_copy from array
+ unset($values['move_copy']);
+
+ // Parent exists so we proceed
+ foreach ($pks as $pk)
+ {
+ if (!$this->user->authorise('repository.edit', $contexts[$pk]))
+ {
+ $this->setError(Text::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
+ return false;
+ }
+
+ // Check that the row actually exists
+ if (!$this->table->load($pk))
+ {
+ if ($error = $this->table->getError())
+ {
+ // Fatal error
+ $this->setError($error);
+ return false;
+ }
+ else
+ {
+ // Not fatal error
+ $this->setError(Text::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
+ continue;
+ }
+ }
+
+ // insert all set values.
+ if (UtilitiesArrayHelper::check($values))
+ {
+ foreach ($values as $key => $value)
+ {
+ // Do special action for access.
+ if ('access' === $key && strlen($value) > 0)
+ {
+ $this->table->$key = $value;
+ }
+ elseif (strlen($value) > 0 && isset($this->table->$key))
+ {
+ $this->table->$key = $value;
+ }
+ }
+ }
+
+
+ // Check the row.
+ if (!$this->table->check())
+ {
+ $this->setError($this->table->getError());
+
+ return false;
+ }
+
+ if (!empty($this->type))
+ {
+ $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
+ }
+
+ // Store the row.
+ if (!$this->table->store())
+ {
+ $this->setError($this->table->getError());
+
+ return false;
+ }
+ }
+
+ // Clean the cache
+ $this->cleanCache();
+
+ return true;
+ }
+
+ /**
+ * Method to save the form data.
+ *
+ * @param array $data The form data.
+ *
+ * @return boolean True on success.
+ * @since 1.6
+ */
+ public function save($data)
+ {
+ $input = Factory::getApplication()->getInput();
+ $filter = InputFilter::getInstance();
+
+ // set the metadata to the Item Data
+ if (isset($data['metadata']) && isset($data['metadata']['author']))
+ {
+ $data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
+
+ $metadata = new Registry;
+ $metadata->loadArray($data['metadata']);
+ $data['metadata'] = (string) $metadata;
+ }
+
+
+ // Set the GUID if empty or not valid
+ if (empty($data['guid']) && $data['id'] > 0)
+ {
+ // get the existing one
+ $data['guid'] = (string) GetHelper::var('repository', $data['id'], 'id', 'guid');
+ }
+
+ // Set the GUID if empty or not valid
+ while (!GuidHelper::valid($data['guid'], "repository", $data['id']))
+ {
+ // must always be set
+ $data['guid'] = (string) GuidHelper::get();
+ }
+
+ // Set the Params Items to data
+ if (isset($data['params']) && is_array($data['params']))
+ {
+ $params = new Registry;
+ $params->loadArray($data['params']);
+ $data['params'] = (string) $params;
+ }
+
+ // Alter the unique field for save as copy
+ if ($input->get('task') === 'save2copy')
+ {
+ // Automatic handling of other unique fields
+ $uniqueFields = $this->getUniqueFields();
+ if (UtilitiesArrayHelper::check($uniqueFields))
+ {
+ foreach ($uniqueFields as $uniqueField)
+ {
+ $data[$uniqueField] = $this->generateUnique($uniqueField,$data[$uniqueField]);
+ }
+ }
+ }
+
+ if (parent::save($data))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Method to generate a unique value.
+ *
+ * @param string $field name.
+ * @param string $value data.
+ *
+ * @return string New value.
+ * @since 3.0
+ */
+ protected function generateUnique($field, $value)
+ {
+ // set field value unique
+ $table = $this->getTable();
+
+ while ($table->load([$field => $value]))
+ {
+ $value = StringHelper::increment($value);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Method to change the title
+ *
+ * @param string $title The title.
+ *
+ * @return array Contains the modified title and alias.
+ *
+ */
+ protected function _generateNewTitle($title)
+ {
+
+ // Alter the title
+ $table = $this->getTable();
+
+ while ($table->load(['title' => $title]))
+ {
+ $title = StringHelper::increment($title);
+ }
+
+ return $title;
+ }
+}
diff --git a/admin/src/Table/RepositoryTable.php b/admin/src/Table/RepositoryTable.php
new file mode 100644
index 000000000..17eb1c7c5
--- /dev/null
+++ b/admin/src/Table/RepositoryTable.php
@@ -0,0 +1,377 @@
+
+ * @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\Component\Componentbuilder\Administrator\Table;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Table\Table;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\String\PunycodeHelper;
+use Joomla\CMS\Access\Access as AccessRules;
+use Joomla\CMS\Access\Rules;
+use Joomla\CMS\Tag\TaggableTableInterface;
+use Joomla\CMS\Tag\TaggableTableTrait;
+use Joomla\CMS\User\CurrentUserInterface;
+use Joomla\CMS\User\CurrentUserTrait;
+use Joomla\CMS\Versioning\VersionableTableInterface;
+use Joomla\CMS\Application\ApplicationHelper;
+use Joomla\Database\DatabaseInterface;
+use Joomla\Registry\Registry;
+use Joomla\Database\DatabaseDriver;
+use Joomla\Event\DispatcherInterface;
+use Joomla\String\StringHelper;
+use Joomla\Utilities\ArrayHelper;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repositories Table class
+ *
+ * @since 1.6
+ */
+class RepositoryTable extends Table implements VersionableTableInterface, TaggableTableInterface, CurrentUserInterface
+{
+ use TaggableTableTrait;
+ use CurrentUserTrait;
+
+ /**
+ * Constructor
+ *
+ * @param DatabaseDriver $db Database connector object
+ * @param ?DispatcherInterface $dispatcher Event dispatcher for this table
+ *
+ * @param object Database connector object
+ * @since 4.0
+ */
+ function __construct(DatabaseDriver $db, ?DispatcherInterface $dispatcher = null)
+ {
+ // The type alias generally is the internal component name with the
+ // content type. Ex.: com_content.article
+ $this->typeAlias = 'com_componentbuilder.repository';
+
+ // Ensure the params and metadata in json encoded in the bind method
+ $this->_jsonEncode = ['params', 'metadata'];
+
+ // Indicates that columns fully support the NULL value in the database
+ // $this->_supportNullValue = true; // hmmm will keep an eye on this ;)
+
+ parent::__construct('#__componentbuilder_repository', 'id', $db, $dispatcher);
+ }
+
+ /**
+ * Method to bind an associative array or object to the Table instance.This
+ * method only binds properties that are publicly accessible and optionally
+ * takes an array of properties to ignore when binding.
+ *
+ * @param array|object $src An associative array or object to bind to the Table instance.
+ * @param array|string $ignore An optional array or space separated list of properties to ignore while binding.
+ *
+ * @return boolean True on success.
+ *
+ * @since 1.7.0
+ * @throws \InvalidArgumentException
+ */
+ public function bind($array, $ignore = '')
+ {
+ // Bind the rules.
+ if (isset($array['rules']) && is_array($array['rules']))
+ {
+ $rules = new AccessRules($array['rules']);
+ $this->setRules($rules);
+ }
+
+ return parent::bind($array, $ignore);
+ }
+
+ /**
+ * Overload the store method for the Repository table.
+ *
+ * @param boolean Toggle whether null values should be updated.
+ *
+ * @return boolean True on success, false on failure.
+ * @since 1.6
+ */
+ public function store($updateNulls = false)
+ {
+ $date = Factory::getDate()->toSql();
+ $userId = $this->getCurrentUser()->id;
+
+ if ($this->id)
+ {
+ // Existing item
+ $this->modified = $date;
+ $this->modified_by = $userId;
+ }
+ else
+ {
+ // New repository. A repository created and created_by field can be set by the user,
+ // so we don't touch either of these if they are set.
+ if (!(int) $this->created)
+ {
+ $this->created = $date;
+ }
+ if (empty($this->created_by))
+ {
+ $this->created_by = $userId;
+ }
+ }
+
+ if (isset($this->alias))
+ {
+ // Verify that the alias is unique
+ $table = new self($this->getDbo(), $this->getDispatcher());
+
+ if ($table->load(['alias' => $this->alias]) && ($table->id != $this->id || $this->id == 0))
+ {
+ $this->setError(Text::_('COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS'));
+
+ if ($table->published === -2)
+ {
+ $this->setError(Text::_('COM_COMPONENTBUILDER_REPOSITORY_ERROR_UNIQUE_ALIAS_TRASHED'));
+ }
+
+ return false;
+ }
+ }
+
+ if (isset($this->url))
+ {
+ // Convert IDN urls to punycode
+ $this->url = PunycodeHelper::urlToPunycode($this->url);
+ }
+
+ if (isset($this->website))
+ {
+ // Convert IDN urls to punycode
+ $this->website = PunycodeHelper::urlToPunycode($this->website);
+ }
+
+ return parent::store($updateNulls);
+ }
+
+ /**
+ * Overloaded check method to ensure data integrity.
+ *
+ * @return boolean True on success.
+ *
+ * @see \Joomla\CMS\Table\Table::check
+ * @since 1.5
+ */
+ public function check()
+ {
+ try {
+ parent::check();
+ } catch (\Exception $e) {
+ $this->setError($e->getMessage());
+ return false;
+ }
+
+ if (isset($this->alias))
+ {
+ // Generate a valid alias
+ $this->generateAlias();
+
+ $table = new self($this->getDbo(), $this->getDispatcher());
+
+ while ($table->load(['alias' => $this->alias]) && ($table->id != $this->id || $this->id == 0))
+ {
+ $this->alias = StringHelper::increment($this->alias, 'dash');
+ }
+ }
+
+ /*
+ * Clean up keywords -- eliminate extra spaces between phrases
+ * and cr (\r) and lf (\n) characters from string.
+ * Only process if not empty.
+ */
+ if (!empty($this->metakey))
+ {
+ // Array of characters to remove.
+ $bad_characters = array("\n", "\r", "\"", "<", ">");
+
+ // Remove bad characters.
+ $after_clean = StringHelper::str_ireplace($bad_characters, "", $this->metakey);
+
+ // Create array using commas as delimiter.
+ $keys = explode(',', $after_clean);
+ $clean_keys = [];
+
+ foreach ($keys as $key)
+ {
+ // Ignore blank keywords.
+ if (trim($key))
+ {
+ $clean_keys[] = trim($key);
+ }
+ }
+
+ // Put array back together delimited by ", "
+ $this->metakey = implode(", ", $clean_keys);
+ }
+
+ // Clean up description -- eliminate quotes and <> brackets
+ if (!empty($this->metadesc))
+ {
+ // Only process if not empty
+ $bad_characters = array("\"", "<", ">");
+ $this->metadesc = StringHelper::str_ireplace($bad_characters, "", $this->metadesc);
+ }
+
+ // If we don't have any access rules set at this point just use an empty AccessRules class
+ if (!$this->getRules())
+ {
+ $rules = $this->getDefaultAssetValues('com_componentbuilder.repository.'.$this->id);
+ $this->setRules($rules);
+ }
+
+ // Set ordering
+ if ($this->published < 0)
+ {
+ // Set ordering to 0 if state is archived or trashed
+ $this->ordering = 0;
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets the default asset values for a component.
+ *
+ * @param $string $component The component asset name to search for
+ *
+ * @return AccessRules The AccessRules object for the asset
+ */
+ protected function getDefaultAssetValues($component, $try = true)
+ {
+ // Need to find the asset id by the name of the component.
+ $db = Factory::getContainer()->get(DatabaseInterface::class);
+ $query = $db->getQuery(true)
+ ->select($db->quoteName('id'))
+ ->from($db->quoteName('#__assets'))
+ ->where($db->quoteName('name') . ' = ' . $db->quote($component));
+ $db->setQuery($query);
+ $db->execute();
+ if ($db->loadRowList())
+ {
+ // asset already set so use saved rules
+ $assetId = (int) $db->loadResult();
+ return AccessRules::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
+ }
+ // try again
+ elseif ($try)
+ {
+ $try = explode('.',$component);
+ $result = $this->getDefaultAssetValues($try[0], false);
+ if ($result instanceof AccessRules)
+ {
+ if (isset($try[1]))
+ {
+ $_result = (string) $result;
+ $_result = json_decode($_result);
+ foreach ($_result as $name => &$rule)
+ {
+ $v = explode('.', $name);
+ if ($try[1] !== $v[0])
+ {
+ // remove since it is not part of this view
+ unset($_result->$name);
+ }
+ else
+ {
+ // clear the value since we inherit
+ $rule = [];
+ }
+ }
+ // check if there are any view values remaining
+ if (count( (array) $_result))
+ {
+ $_result = json_encode($_result);
+ $_result = array($_result);
+ // Instantiate and return the AccessRules object for the asset rules.
+ $rules = new AccessRules;
+ $rules->mergeCollection($_result);
+
+ return $rules;
+ }
+ }
+ return $result;
+ }
+ }
+ return AccessRules::getAssetRules(0);
+ }
+
+ /**
+ * Get the type alias for the history table
+ *
+ * The type alias generally is the internal component name with the
+ * content type. Ex.: com_content.article
+ *
+ * @return string The alias as described above
+ *
+ * @since 3.10.0
+ */
+ public function getTypeAlias()
+ {
+ return $this->typeAlias;
+ }
+
+ /**
+ * Method to compute the default name of the asset.
+ * The default name is in the form table_name.id
+ * where id is the value of the primary key of the table.
+ *
+ * @return string
+ *
+ * @since 1.7.0
+ */
+ protected function _getAssetName()
+ {
+ $k = $this->_tbl_key;
+
+ return $this->getTypeAlias() . '.' . (int) $this->$k;
+ }
+
+ /**
+ * Method to get the parent asset under which to register this one.
+ *
+ * By default, all assets are registered to the ROOT node with ID, which will default to 1 if none exists.
+ * An extended class can define a table and ID to lookup. If the asset does not exist it will be created.
+ *
+ * @param Table $table A Table object for the asset parent.
+ * @param integer $id Id to look up
+ *
+ * @return integer
+ *
+ * @since 1.7.0
+ */
+ protected function _getAssetParentId(Table $table = null, $id = null)
+ {
+ /** @var Asset $assets */
+ $assets = self::getInstance('Asset', 'JTable', ['dbo' => $this->getDbo()]);
+ $rootId = $assets->getRootId();
+
+ // load the componentbuilder asset
+ $assets->loadByName('com_componentbuilder');
+
+ return $assets->id ?? $rootId ?? 1;
+ }
+
+ /**
+ * This view does not actually have an alias
+ *
+ * @return bool
+ */
+ public function generateAlias()
+ {
+ return false;
+ }
+}
diff --git a/admin/src/View/Power/HtmlView.php b/admin/src/View/Power/HtmlView.php
index efee23dbb..9cc29ec68 100644
--- a/admin/src/View/Power/HtmlView.php
+++ b/admin/src/View/Power/HtmlView.php
@@ -253,7 +253,7 @@ class HtmlView extends BaseHtmlView
// add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here
- $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
+ $this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
// set some lang
Text::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER');
Text::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS');
diff --git a/admin/src/View/Repositories/HtmlView.php b/admin/src/View/Repositories/HtmlView.php
new file mode 100644
index 000000000..ccdfc8b76
--- /dev/null
+++ b/admin/src/View/Repositories/HtmlView.php
@@ -0,0 +1,221 @@
+
+ * @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\Component\Componentbuilder\Administrator\View\Repositories;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Toolbar\Toolbar;
+use Joomla\CMS\Form\FormHelper;
+use Joomla\CMS\Session\Session;
+use Joomla\CMS\Uri\Uri;
+use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Layout\FileLayout;
+use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Toolbar\ToolbarHelper;
+use Joomla\CMS\Document\Document;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Utilities\StringHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Componentbuilder Html View class for the Repositories
+ *
+ * @since 1.6
+ */
+class HtmlView extends BaseHtmlView
+{
+ /**
+ * Repositories view display method
+ *
+ * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
+ *
+ * @return void
+ * @since 1.6
+ */
+ public function display($tpl = null)
+ {
+ // Assign data to the view
+ $this->items = $this->get('Items');
+ $this->pagination = $this->get('Pagination');
+ $this->state = $this->get('State');
+ $this->styles = $this->get('Styles');
+ $this->scripts = $this->get('Scripts');
+ $this->user ??= Factory::getApplication()->getIdentity();
+ // Load the filter form from xml.
+ $this->filterForm = $this->get('FilterForm');
+ // Load the active filters.
+ $this->activeFilters = $this->get('ActiveFilters');
+ // Add the list ordering clause.
+ $this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id'));
+ $this->listDirn = $this->escape($this->state->get('list.direction', 'DESC'));
+ $this->saveOrder = $this->listOrder == 'a.ordering';
+ // set the return here value
+ $this->return_here = urlencode(base64_encode((string) Uri::getInstance()));
+ // get global action permissions
+ $this->canDo = ComponentbuilderHelper::getActions('repository');
+ $this->canEdit = $this->canDo->get('repository.edit');
+ $this->canState = $this->canDo->get('repository.edit.state');
+ $this->canCreate = $this->canDo->get('repository.create');
+ $this->canDelete = $this->canDo->get('repository.delete');
+ $this->canBatch = ($this->canDo->get('repository.batch') && $this->canDo->get('core.batch'));
+
+ // If we don't have items we load the empty state
+ if (is_array($this->items) && !count((array) $this->items) && $this->isEmptyState = $this->get('IsEmptyState'))
+ {
+ $this->setLayout('emptystate');
+ }
+
+ // We don't need toolbar in the modal window.
+ if ($this->getLayout() !== 'modal')
+ {
+ $this->addToolbar();
+ }
+
+ // Check for errors.
+ if (count($errors = $this->get('Errors')))
+ {
+ throw new \Exception(implode("\n", $errors), 500);
+ }
+
+ // Set the html view document stuff
+ $this->_prepareDocument();
+
+ // Display the template
+ parent::display($tpl);
+ }
+
+ /**
+ * Add the page title and toolbar.
+ *
+ * @return void
+ * @since 1.6
+ */
+ protected function addToolbar(): void
+ {
+ ToolbarHelper::title(Text::_('COM_COMPONENTBUILDER_REPOSITORIES'), 'share');
+
+ if ($this->canCreate)
+ {
+ ToolbarHelper::addNew('repository.add');
+ }
+
+ // Only load if there are items
+ if (ArrayHelper::check($this->items))
+ {
+ if ($this->canEdit)
+ {
+ ToolbarHelper::editList('repository.edit');
+ }
+
+ if ($this->canState)
+ {
+ ToolbarHelper::publishList('repositories.publish');
+ ToolbarHelper::unpublishList('repositories.unpublish');
+ ToolbarHelper::archiveList('repositories.archive');
+
+ if ($this->canDo->get('core.admin'))
+ {
+ ToolbarHelper::checkin('repositories.checkin');
+ }
+ }
+
+ if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
+ {
+ ToolbarHelper::deleteList('', 'repositories.delete', 'JTOOLBAR_EMPTY_TRASH');
+ }
+ elseif ($this->canState && $this->canDelete)
+ {
+ ToolbarHelper::trash('repositories.trash');
+ }
+ }
+
+ // set help url for this view if found
+ $this->help_url = ComponentbuilderHelper::getHelpUrl('repositories');
+ if (StringHelper::check($this->help_url))
+ {
+ ToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
+ }
+
+ // add the options comp button
+ if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
+ {
+ ToolbarHelper::preferences('com_componentbuilder');
+ }
+ }
+
+ /**
+ * Prepare some document related stuff.
+ *
+ * @return void
+ * @since 1.6
+ */
+ protected function _prepareDocument(): void
+ {
+ // Load jQuery
+ Html::_('jquery.framework');
+ $this->getDocument()->setTitle(Text::_('COM_COMPONENTBUILDER_REPOSITORIES'));
+ // add styles
+ foreach ($this->styles as $style)
+ {
+ Html::_('stylesheet', $style, ['version' => 'auto']);
+ }
+ // add scripts
+ foreach ($this->scripts as $script)
+ {
+ Html::_('script', $script, ['version' => 'auto']);
+ }
+ }
+
+ /**
+ * Escapes a value for output in a view script.
+ *
+ * @param mixed $var The output to escape.
+ * @param bool $shorten The switch to shorten.
+ * @param int $length The shorting length.
+ *
+ * @return mixed The escaped value.
+ * @since 1.6
+ */
+ public function escape($var, bool $shorten = true, int $length = 50)
+ {
+ if (!is_string($var))
+ {
+ return $var;
+ }
+
+ return StringHelper::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
+ }
+
+ /**
+ * Returns an array of fields the table can be sorted by
+ *
+ * @return array containing the field name to sort by as the key and display text as value
+ * @since 1.6
+ */
+ protected function getSortFields()
+ {
+ return array(
+ 'a.ordering' => Text::_('JGRID_HEADING_ORDERING'),
+ 'a.published' => Text::_('JSTATUS'),
+ 'a.organisation' => Text::_('COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_LABEL'),
+ 'a.repository' => Text::_('COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_LABEL'),
+ 'a.target' => Text::_('COM_COMPONENTBUILDER_REPOSITORY_TARGET_LABEL'),
+ 'a.type' => Text::_('COM_COMPONENTBUILDER_REPOSITORY_TYPE_LABEL'),
+ 'a.base' => Text::_('COM_COMPONENTBUILDER_REPOSITORY_BASE_LABEL'),
+ 'a.id' => Text::_('JGRID_HEADING_ID')
+ );
+ }
+}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/index.html b/admin/src/View/Repositories/index.html
similarity index 100%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/index.html
rename to admin/src/View/Repositories/index.html
diff --git a/admin/src/View/Repository/HtmlView.php b/admin/src/View/Repository/HtmlView.php
new file mode 100644
index 000000000..cf20a111a
--- /dev/null
+++ b/admin/src/View/Repository/HtmlView.php
@@ -0,0 +1,231 @@
+
+ * @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\Component\Componentbuilder\Administrator\View\Repository;
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Toolbar\Toolbar;
+use Joomla\CMS\Form\FormHelper;
+use Joomla\CMS\Session\Session;
+use Joomla\CMS\Uri\Uri;
+use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Layout\FileLayout;
+use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Toolbar\ToolbarHelper;
+use Joomla\CMS\Document\Document;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+use VDM\Joomla\Utilities\StringHelper;
+
+// No direct access to this file
+\defined('_JEXEC') or die;
+
+/**
+ * Repository Html View class
+ *
+ * @since 1.6
+ */
+class HtmlView extends BaseHtmlView
+{
+ /**
+ * Repository view display method
+ *
+ * @param string $tpl The name of the template file to parse; automatically searches through the template paths.
+ *
+ * @return void
+ * @since 1.6
+ */
+ public function display($tpl = null)
+ {
+ // set params
+ $this->params = ComponentHelper::getParams('com_componentbuilder');
+ $this->useCoreUI = true;
+ // Assign the variables
+ $this->form = $this->get('Form');
+ $this->item = $this->get('Item');
+ $this->styles = $this->get('Styles');
+ $this->scripts = $this->get('Scripts');
+ $this->state = $this->get('State');
+ // get action permissions
+ $this->canDo = ComponentbuilderHelper::getActions('repository', $this->item);
+ // get input
+ $jinput = Factory::getApplication()->input;
+ $this->ref = $jinput->get('ref', 0, 'word');
+ $this->refid = $jinput->get('refid', 0, 'int');
+ $return = $jinput->get('return', null, 'base64');
+ // set the referral string
+ $this->referral = '';
+ if ($this->refid && $this->ref)
+ {
+ // return to the item that referred to this item
+ $this->referral = '&ref=' . (string) $this->ref . '&refid=' . (int) $this->refid;
+ }
+ elseif($this->ref)
+ {
+ // return to the list view that referred to this item
+ $this->referral = '&ref=' . (string) $this->ref;
+ }
+ // check return value
+ if (!is_null($return))
+ {
+ // add the return value
+ $this->referral .= '&return=' . (string) $return;
+ }
+
+ // Set the toolbar
+ $this->addToolBar();
+
+ // Check for errors.
+ if (count($errors = $this->get('Errors')))
+ {
+ throw new \Exception(implode("\n", $errors), 500);
+ }
+
+ // Set the html view document stuff
+ $this->_prepareDocument();
+
+ // Display the template
+ parent::display($tpl);
+ }
+
+
+ /**
+ * Add the page title and toolbar.
+ *
+ * @return void
+ * @since 1.6
+ */
+ protected function addToolbar(): void
+ {
+ Factory::getApplication()->input->set('hidemainmenu', true);
+ $user = Factory::getApplication()->getIdentity();
+ $userId = $user->id;
+ $isNew = $this->item->id == 0;
+
+ ToolbarHelper::title( Text::_($isNew ? 'COM_COMPONENTBUILDER_REPOSITORY_NEW' : 'COM_COMPONENTBUILDER_REPOSITORY_EDIT'), 'pencil-2 article-add');
+ // Built the actions for new and existing records.
+ if (StringHelper::check($this->referral))
+ {
+ if ($this->canDo->get('repository.create') && $isNew)
+ {
+ // We can create the record.
+ ToolbarHelper::save('repository.save', 'JTOOLBAR_SAVE');
+ }
+ elseif ($this->canDo->get('repository.edit'))
+ {
+ // We can save the record.
+ ToolbarHelper::save('repository.save', 'JTOOLBAR_SAVE');
+ }
+ if ($isNew)
+ {
+ // Do not creat but cancel.
+ ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CANCEL');
+ }
+ else
+ {
+ // We can close it.
+ ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CLOSE');
+ }
+ }
+ else
+ {
+ if ($isNew)
+ {
+ // For new records, check the create permission.
+ if ($this->canDo->get('repository.create'))
+ {
+ ToolbarHelper::apply('repository.apply', 'JTOOLBAR_APPLY');
+ ToolbarHelper::save('repository.save', 'JTOOLBAR_SAVE');
+ ToolbarHelper::custom('repository.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
+ };
+ ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CANCEL');
+ }
+ else
+ {
+ if ($this->canDo->get('repository.edit'))
+ {
+ // We can save the new record
+ ToolbarHelper::apply('repository.apply', 'JTOOLBAR_APPLY');
+ ToolbarHelper::save('repository.save', 'JTOOLBAR_SAVE');
+ // We can save this record, but check the create permission to see
+ // if we can return to make a new one.
+ if ($this->canDo->get('repository.create'))
+ {
+ ToolbarHelper::custom('repository.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
+ }
+ }
+ $canVersion = ($this->canDo->get('core.version') && $this->canDo->get('repository.version'));
+ if ($this->state->params->get('save_history', 1) && $this->canDo->get('repository.edit') && $canVersion)
+ {
+ ToolbarHelper::versions('com_componentbuilder.repository', $this->item->id);
+ }
+ if ($this->canDo->get('repository.create'))
+ {
+ ToolbarHelper::custom('repository.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
+ }
+ ToolbarHelper::cancel('repository.cancel', 'JTOOLBAR_CLOSE');
+ }
+ }
+ ToolbarHelper::divider();
+ ToolbarHelper::inlinehelp();
+ // set help url for this view if found
+ $this->help_url = ComponentbuilderHelper::getHelpUrl('repository');
+ if (StringHelper::check($this->help_url))
+ {
+ ToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $this->help_url);
+ }
+ }
+
+ /**
+ * Escapes a value for output in a view script.
+ *
+ * @param mixed $var The output to escape.
+ * @param bool $shorten The switch to shorten.
+ * @param int $length The shorting length.
+ *
+ * @return mixed The escaped value.
+ * @since 1.6
+ */
+ public function escape($var, bool $shorten = true, int $length = 30)
+ {
+ if (!is_string($var))
+ {
+ return $var;
+ }
+
+ return StringHelper::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
+ }
+
+ /**
+ * Prepare some document related stuff.
+ *
+ * @return void
+ * @since 1.6
+ */
+ protected function _prepareDocument(): void
+ {
+ // Load jQuery
+ Html::_('jquery.framework');
+ $isNew = ($this->item->id < 1);
+ $this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_REPOSITORY_NEW' : 'COM_COMPONENTBUILDER_REPOSITORY_EDIT'));
+ // add styles
+ foreach ($this->styles as $style)
+ {
+ Html::_('stylesheet', $style, ['version' => 'auto']);
+ }
+ // add scripts
+ foreach ($this->scripts as $script)
+ {
+ Html::_('script', $script, ['version' => 'auto']);
+ }
+ }
+}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/index.html b/admin/src/View/Repository/index.html
similarity index 100%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/index.html
rename to admin/src/View/Repository/index.html
diff --git a/admin/tmpl/field/default.php b/admin/tmpl/field/default.php
index c378063ac..16cea6ecd 100644
--- a/admin/tmpl/field/default.php
+++ b/admin/tmpl/field/default.php
@@ -206,40 +206,6 @@ jQuery('#adminForm').on('change', '#jform_datatype',function (e)
});
-// #jform_store listeners for store_vvvvwbj function
-jQuery('#jform_store').on('keyup',function()
-{
- var store_vvvvwbj = jQuery("#jform_store").val();
- var datatype_vvvvwbj = jQuery("#jform_datatype").val();
- vvvvwbj(store_vvvvwbj,datatype_vvvvwbj);
-
-});
-jQuery('#adminForm').on('change', '#jform_store',function (e)
-{
- e.preventDefault();
- var store_vvvvwbj = jQuery("#jform_store").val();
- var datatype_vvvvwbj = jQuery("#jform_datatype").val();
- vvvvwbj(store_vvvvwbj,datatype_vvvvwbj);
-
-});
-
-// #jform_datatype listeners for datatype_vvvvwbj function
-jQuery('#jform_datatype').on('keyup',function()
-{
- var store_vvvvwbj = jQuery("#jform_store").val();
- var datatype_vvvvwbj = jQuery("#jform_datatype").val();
- vvvvwbj(store_vvvvwbj,datatype_vvvvwbj);
-
-});
-jQuery('#adminForm').on('change', '#jform_datatype',function (e)
-{
- e.preventDefault();
- var store_vvvvwbj = jQuery("#jform_store").val();
- var datatype_vvvvwbj = jQuery("#jform_datatype").val();
- vvvvwbj(store_vvvvwbj,datatype_vvvvwbj);
-
-});
-
// #jform_store listeners for store_vvvvwbl function
jQuery('#jform_store').on('keyup',function()
{
diff --git a/admin/tmpl/repositories/default.php b/admin/tmpl/repositories/default.php
new file mode 100644
index 000000000..ecb9de11f
--- /dev/null
+++ b/admin/tmpl/repositories/default.php
@@ -0,0 +1,51 @@
+
+ * @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
+ */
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Layout\LayoutHelper;
+use Joomla\CMS\Router\Route;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+if ($this->saveOrder)
+{
+ $saveOrderingUrl = 'index.php?option=com_componentbuilder&task=repositories.saveOrderAjax&tmpl=component';
+ Html::_('sortablelist.sortable', 'repositoryList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
+}
+?>
+
diff --git a/admin/tmpl/repositories/default_body.php b/admin/tmpl/repositories/default_body.php
new file mode 100644
index 000000000..051362d80
--- /dev/null
+++ b/admin/tmpl/repositories/default_body.php
@@ -0,0 +1,113 @@
+
+ * @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
+ */
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+$edit = "index.php?option=com_componentbuilder&view=repositories&task=repository.edit";
+
+?>
+items as $i => $item): ?>
+ 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);
+ $canDo = ComponentbuilderHelper::getActions('repository',$item,'repositories');
+ ?>
+
+
+ get('repository.edit.state')): ?>
+ saveOrder)
+ {
+ $iconClass = ' inactive tip-top" hasTooltip" title="' . Html::tooltipText('JORDERINGDISABLED');
+ }
+ ?>
+
+
+
+ saveOrder) : ?>
+
+
+
+ ⋮
+
+
+
+ get('repository.edit')): ?>
+ checked_out) : ?>
+
+ id); ?>
+
+ □
+
+
+ id); ?>
+
+
+ □
+
+
+
+
+ get('repository.edit')): ?>
+
escape($item->system_name); ?>
+ checked_out): ?>
+ name, $item->checked_out_time, 'repositories.', $canCheckin); ?>
+
+
+ escape($item->system_name); ?>
+
+
+
+
+ escape($item->organisation); ?>
+
+
+ escape($item->repository); ?>
+
+
+ target); ?>
+
+
+ type); ?>
+
+
+ escape($item->base); ?>
+
+
+ get('repository.edit.state')) : ?>
+ checked_out) : ?>
+
+ published, $i, 'repositories.', true, 'cb'); ?>
+
+ published, $i, 'repositories.', false, 'cb'); ?>
+
+
+ published, $i, 'repositories.', true, 'cb'); ?>
+
+
+ published, $i, 'repositories.', false, 'cb'); ?>
+
+
+
+ id; ?>
+
+
+
\ No newline at end of file
diff --git a/admin/tmpl/repositories/default_foot.php b/admin/tmpl/repositories/default_foot.php
new file mode 100644
index 000000000..57816d9c2
--- /dev/null
+++ b/admin/tmpl/repositories/default_foot.php
@@ -0,0 +1,18 @@
+
+ * @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
+ */
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+?>
+
+ pagination->getListFooter(); ?>
+
\ No newline at end of file
diff --git a/admin/tmpl/repositories/default_head.php b/admin/tmpl/repositories/default_head.php
new file mode 100644
index 000000000..936cd7670
--- /dev/null
+++ b/admin/tmpl/repositories/default_head.php
@@ -0,0 +1,65 @@
+
+ * @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
+ */
+
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+?>
+
+ canEdit&& $this->canState): ?>
+
+ listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
+
+
+
+
+
+
+ ▾
+
+
+ ■
+
+
+
+
+
+
+ listDirn, $this->listOrder); ?>
+
+
+ listDirn, $this->listOrder); ?>
+
+
+ listDirn, $this->listOrder); ?>
+
+
+ listDirn, $this->listOrder); ?>
+
+
+ listDirn, $this->listOrder); ?>
+
+ canState): ?>
+
+ listDirn, $this->listOrder); ?>
+
+
+
+
+
+
+
+ listDirn, $this->listOrder); ?>
+
+
\ No newline at end of file
diff --git a/admin/tmpl/repositories/default_toolbar.php b/admin/tmpl/repositories/default_toolbar.php
new file mode 100644
index 000000000..7ae6f5a0c
--- /dev/null
+++ b/admin/tmpl/repositories/default_toolbar.php
@@ -0,0 +1,48 @@
+
+ * @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
+ */
+
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+?>
+
+
\ No newline at end of file
diff --git a/admin/tmpl/repositories/emptystate.php b/admin/tmpl/repositories/emptystate.php
new file mode 100644
index 000000000..22a85c34e
--- /dev/null
+++ b/admin/tmpl/repositories/emptystate.php
@@ -0,0 +1,28 @@
+
+ * @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
+ */
+
+use Joomla\CMS\Layout\LayoutHelper;
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+$displayData = [
+ 'textPrefix' => 'COM_COMPONENTBUILDER_REPOSITORIES',
+ 'formURL' => 'index.php?option=com_componentbuilder&view=repositories',
+ 'icon' => 'icon-share',
+];
+
+if ($this->user->authorise('repository.create', 'com_componentbuilder'))
+{
+ $displayData['createURL'] = 'index.php?option=com_componentbuilder&task=repository.add';
+}
+
+echo LayoutHelper::render('joomla.content.emptystate', $displayData);
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/index.html b/admin/tmpl/repositories/index.html
similarity index 100%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/index.html
rename to admin/tmpl/repositories/index.html
diff --git a/admin/tmpl/repository/default.php b/admin/tmpl/repository/default.php
new file mode 100644
index 000000000..9df8c9127
--- /dev/null
+++ b/admin/tmpl/repository/default.php
@@ -0,0 +1,106 @@
+
+ * @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
+ */
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\HTML\HTMLHelper as Html;
+use Joomla\CMS\Layout\LayoutHelper;
+use Joomla\CMS\Router\Route;
+use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
+
+/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
+$wa = $this->getDocument()->getWebAssetManager();
+$wa->useScript('keepalive')->useScript('form.validate');
+Html::_('bootstrap.tooltip');
+
+// No direct access to this file
+defined('_JEXEC') or die;
+
+?>
+
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/index.html b/admin/tmpl/repository/index.html
similarity index 100%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/index.html
rename to admin/tmpl/repository/index.html
diff --git a/componentbuilder.xml b/componentbuilder.xml
index f9073c44b..fffdccfc2 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,15 +1,15 @@
COM_COMPONENTBUILDER
- 7th June, 2024
+ 21st June, 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.1-alpha4
+ 5.0.1-alpha5
Component Builder (v.5.0.1-alpha4)
+ Component Builder (v.5.0.1-alpha5)
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.
@@ -84,6 +84,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo
COM_COMPONENTBUILDER_MENU_LANGUAGE_TRANSLATIONS
COM_COMPONENTBUILDER_MENU_LANGUAGES
COM_COMPONENTBUILDER_MENU_SERVERS
+ COM_COMPONENTBUILDER_MENU_REPOSITORIES
COM_COMPONENTBUILDER_MENU_HELP_DOCUMENTS
diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml
index ab56ff299..d1163e0de 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -62,7 +62,7 @@
5.0.1-alpha
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.1-alpha4.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.1-alpha5.zip
alpha
@@ -77,10 +77,10 @@
pkg_component_builder
package
site
- 5.0.1-alpha4
+ 5.0.1-alpha5
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.1-alpha4.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.1-alpha5.zip
alpha
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php
index e51e873eb..f4c306f41 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php
@@ -189,16 +189,22 @@ abstract class Grep implements GrepInterface
{
foreach ($this->paths as $n => &$path)
{
- if (isset($path->owner) && strlen($path->owner) > 1 &&
- isset($path->repo) && strlen($path->repo) > 1)
+ if (isset($path->organisation) && strlen($path->organisation) > 1 &&
+ isset($path->repository) && strlen($path->repository) > 1)
{
// build the path
- $path->path = trim($path->owner) . '/' . trim($path->repo);
+ $path->path = trim($path->organisation) . '/' . trim($path->repository);
// update the branch
- if ($path->branch === 'default' || empty($path->branch))
+ if ($path->read_branch === 'default' || empty($path->read_branch))
{
- $path->branch = null;
+ $path->read_branch = null;
+ }
+
+ // only update the write branch if set
+ if (isset($path->write_branch) && ($path->write_branch === 'default' || empty($path->write_branch)))
+ {
+ $path->write_branch = null;
}
// set local path
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Model.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Model.php
index 9321eef87..f74eba0f3 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Model.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Model.php
@@ -15,6 +15,7 @@ namespace VDM\Joomla\Abstraction;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Interfaces\Tableinterface as Table;
+use VDM\Joomla\Interfaces\ModelInterface;
/**
@@ -22,7 +23,7 @@ use VDM\Joomla\Interfaces\Tableinterface as Table;
*
* @since 3.2.0
*/
-abstract class Model
+abstract class Model implements ModelInterface
{
/**
* Last ID
@@ -40,16 +41,57 @@ abstract class Model
*/
protected Table $table;
+ /**
+ * Table Name
+ *
+ * @var string
+ * @since 3.2.0
+ */
+ protected string $tableName;
+
+ /**
+ * The switch to control the behaviour of empty values
+ *
+ * @var bool
+ * @since 3.2.2
+ */
+ protected bool $allowEmpty = true;
+
/**
* Constructor
*
- * @param Table $table The search table object.
+ * @param Table $table The search table object.
+ * @param string|null $tableName The table
+ * @param bool|null $allowEmpty The switch to control the behaviour of empty values (default true)
*
* @since 3.2.0
*/
- public function __construct(Table $table)
+ public function __construct(Table $table, ?string $tableName = null, bool $allowEmpty = null)
{
$this->table = $table;
+ if ($tableName !== null)
+ {
+ $this->setTable($tableName);
+ }
+ if ($allowEmpty !== null)
+ {
+ $this->setAllowEmpty($allowEmpty);
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self
+ {
+ $this->setTable($table);
+
+ return $this;
}
/**
@@ -309,6 +351,54 @@ abstract class Model
return null;
}
+ /**
+ * Set the current active table
+ *
+ * @param string $tableName The table name
+ *
+ * @return void
+ * @since 3.2.2
+ */
+ public function setTable(string $tableName): void
+ {
+ $this->tableName = $tableName;
+ }
+
+ /**
+ * Set the switch to control the behaviour of empty values
+ *
+ * @param bool $allowEmpty The switch
+ *
+ * @return void
+ * @since 3.2.2
+ */
+ public function setAllowEmpty(bool $allowEmpty): void
+ {
+ $this->allowEmpty = $allowEmpty;
+ }
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.0
+ */
+ protected function getTable(): string
+ {
+ return $this->tableName;
+ }
+
+ /**
+ * Get the switch to control the behaviour of empty values
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ protected function getAllowEmpty(): bool
+ {
+ return $this->allowEmpty;
+ }
+
/**
* Get the current active table's fields (including defaults)
*
@@ -345,14 +435,6 @@ abstract class Model
* @return bool
* @since 3.2.0
*/
- abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool;
-
- /**
- * Get the current active table
- *
- * @return string
- * @since 3.2.0
- */
- abstract protected function getTable(): string;
+ abstract protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool;
}
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 ad8a18fce..09f6b8907 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
@@ -13,9 +13,11 @@ namespace VDM\Joomla\Componentbuilder\Compiler;
use Joomla\Registry\Registry as JoomlaRegistry;
-use Joomla\CMS\Factory as JoomlaFactory;
+use Joomla\CMS\Factory as JoomlaFactory;
+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;
@@ -43,9 +45,9 @@ class Config extends BaseConfig
/**
* Constructor
*
- * @param Input|null $input Input
- * @param Registry|null $params The component parameters
- * @param Registry|null $config The Joomla configuration
+ * @param Input|null $input Input
+ * @param JoomlaRegistry|null $params The component parameters
+ * @param JoomlaRegistry|null $config The Joomla configuration
*
* @throws \Exception
* @since 3.2.0
@@ -65,7 +67,7 @@ class Config extends BaseConfig
*/
protected function getGiteausername(): ?string
{
- return $this->custom_gitea_username ?? $this->params->get('gitea_username');
+ return $this->params->get('gitea_username');
}
/**
@@ -76,66 +78,7 @@ class Config extends BaseConfig
*/
protected function getGiteatoken(): ?string
{
- return $this->custom_gitea_token ?? $this->params->get('gitea_token');
- }
-
- /**
- * get Add Custom Gitea URL
- *
- * @return int the add switch
- * @since 3.2.0
- */
- protected function getAddcustomgiteaurl(): int
- {
- return $this->params->get('add_custom_gitea_url', 1);
- }
-
- /**
- * get Custom Gitea URL
- *
- * @return string the custom gitea url
- * @since 3.2.0
- */
- protected function getCustomgiteaurl(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_url');
- }
-
- return null;
- }
-
- /**
- * get Custom Gitea Username
- *
- * @return string the custom access token
- * @since 3.2.0
- */
- protected function getCustomgiteausername(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_username');
- }
-
- return null;
- }
-
- /**
- * get Custom Gitea Access Token
- *
- * @return string the custom access token
- * @since 3.2.0
- */
- protected function getCustomgiteatoken(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_token');
- }
-
- return null;
+ return $this->params->get('gitea_token');
}
/**
@@ -149,11 +92,6 @@ class Config extends BaseConfig
// the VDM default organisation is [joomla]
$organisation = 'joomla';
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('super_powers_core_organisation', $organisation);
- }
-
return $organisation;
}
@@ -168,45 +106,66 @@ class Config extends BaseConfig
// some defaults repos we need by JCB
$repos = [];
- // only add custom init with custom gitea
- $paths = null;
- if ($this->add_custom_gitea_url == 2)
- {
- $paths = $this->params->get('super_powers_core_repos');
- }
-
// get the users own power repo (can overwrite all)
- if (!empty($this->gitea_username))
+ if ($this->gitea_username !== null)
{
- $repos[$this->gitea_username . '.super-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
+ $repos[$this->gitea_username . '.super-powers'] = (object) [
+ 'organisation' => $this->gitea_username,
+ 'repository' => 'super-powers',
+ 'read_branch' => 'master'
+ ];
}
- if (!empty($paths) && is_array($paths))
- {
- foreach ($paths as $path)
- {
- $owner = $path->owner ?? null;
- $repo = $path->repo ?? null;
- if ($owner !== null && $repo !== null)
- {
- // we make sure to get only the objects
- $repos = ["{$owner}.{$repo}" => $path] + $repos;
- }
- }
- }
- else
- {
- $repos[$this->super_powers_core_organisation . '.super-powers'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'super-powers', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.jcb-compiler'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'jcb-compiler', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.jcb-packager'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'jcb-packager', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.phpseclib'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'phpseclib', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.search'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'search', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.gitea'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'gitea', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.openai'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'openai', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.minify'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'minify', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.psr'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'psr', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.fof'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'fof', 'branch' => 'master'];
- }
+ $repos[$this->super_powers_core_organisation . '.super-powers'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'super-powers',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.jcb-compiler'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'jcb-compiler',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.jcb-packager'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'jcb-packager',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.phpseclib'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'phpseclib',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.search'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'search',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.gitea'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'gitea',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.openai'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'openai',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.minify'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'minify',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.psr'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'psr',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.fof'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'fof',
+ 'read_branch' => 'master'
+ ];
return $repos;
}
@@ -830,19 +789,14 @@ class Config extends BaseConfig
// some defaults repos we need by JCB
$approved = $this->super_powers_core_repos;
- if (!$this->add_own_powers)
- {
- return array_values($approved);
- }
+ $paths = RepoHelper::get(1); // super powers = 1
- $paths = $this->params->get('approved_paths');
-
- if (!empty($paths))
+ if ($paths !== null)
{
foreach ($paths as $path)
{
- $owner = $path->owner ?? null;
- $repo = $path->repo ?? null;
+ $owner = $path->organisation ?? null;
+ $repo = $path->repository ?? null;
if ($owner !== null && $repo !== null)
{
// we make sure to get only the objects
@@ -879,11 +833,19 @@ class Config extends BaseConfig
// some defaults repos we need by JCB
$repos = [];
// get the users own power repo (can overwrite all)
- if (!empty($this->gitea_username))
+ if ($this->gitea_username !== null)
{
- $repos[$this->gitea_username . '.joomla-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ $repos[$this->gitea_username . '.joomla-powers'] = (object) [
+ 'organisation' => $this->gitea_username,
+ 'repository' => 'joomla-powers',
+ 'read_branch' => 'master'
+ ];
}
- $repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) ['owner' => $this->joomla_powers_core_organisation, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ $repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) [
+ 'organisation' => $this->joomla_powers_core_organisation,
+ 'repository' => 'joomla-powers',
+ 'read_branch' => 'master'
+ ];
return $repos;
}
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 9e7435507..a01ff5670 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Factory.php
@@ -15,7 +15,9 @@ 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\Database;
+use VDM\Joomla\Service\Database;
+use VDM\Joomla\Service\Model as BaseModel;
+use VDM\Joomla\Service\Data;
use VDM\Joomla\Componentbuilder\Compiler\Service\Model;
use VDM\Joomla\Componentbuilder\Compiler\Service\Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Service\Event;
@@ -149,6 +151,8 @@ abstract class Factory implements FactoryInterface
->registerServiceProvider(new Crypt())
->registerServiceProvider(new Server())
->registerServiceProvider(new Database())
+ ->registerServiceProvider(new BaseModel())
+ ->registerServiceProvider(new Data())
->registerServiceProvider(new Model())
->registerServiceProvider(new Compiler())
->registerServiceProvider(new Event())
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
index 55f811e7d..dbb88e0dd 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
@@ -21,7 +21,6 @@ use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
use VDM\Joomla\Utilities\String\NamespaceHelper;
-use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
use VDM\Joomla\Componentbuilder\Compiler\Config;
use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
use VDM\Joomla\Componentbuilder\Compiler\Customcode;
@@ -102,43 +101,43 @@ class Power implements PowerInterface
protected array $retry = [];
/**
- * Compiler Config
+ * The Config Class.
*
- * @var Config
+ * @var Config
* @since 3.2.0
- **/
+ */
protected Config $config;
/**
- * Compiler Placeholder
+ * The Placeholder Class.
*
- * @var Placeholder
+ * @var Placeholder
* @since 3.2.0
- **/
+ */
protected Placeholder $placeholder;
/**
- * Compiler Customcode
+ * The Customcode Class.
*
- * @var Customcode
+ * @var Customcode
* @since 3.2.0
- **/
+ */
protected Customcode $customcode;
/**
- * Compiler Customcode in Gui
+ * The Gui Class.
*
- * @var Gui
+ * @var Gui
* @since 3.2.0
- **/
+ */
protected Gui $gui;
/**
- * The JCB Superpower class
+ * The Super Class.
*
- * @var Superpower
+ * @var Superpower
* @since 3.2.0
- **/
+ */
protected Superpower $superpower;
/**
@@ -158,23 +157,22 @@ class Power implements PowerInterface
/**
* Constructor.
*
- * @param Config|null $config The compiler config object.
- * @param Placeholder|null $placeholder The compiler placeholder object.
- * @param Customcode|null $customcode The compiler customcode object.
- * @param Gui|null $gui The compiler customcode gui object.
- * @param Superpower|null $superpower The JCB superpower object.
+ * @param Config $config The Config Class.
+ * @param Placeholder $placeholder The Placeholder Class.
+ * @param Customcode $customcode The Customcode Class.
+ * @param Gui $gui The Gui Class.
+ * @param Superpower $superpower The Super Class.
*
- * @throws \Exception
* @since 3.2.0
*/
- public function __construct(?Config $config = null, ?Placeholder $placeholder = null,
- ?Customcode $customcode = null, ?Gui $gui = null, ?Superpower $superpower = null)
+ public function __construct(Config $config, Placeholder $placeholder,
+ Customcode $customcode, Gui $gui, Superpower $superpower)
{
- $this->config = $config ?: Compiler::_('Config');
- $this->placeholder = $placeholder ?: Compiler::_('Placeholder');
- $this->customcode = $customcode ?: Compiler::_('Customcode');
- $this->gui = $gui ?: Compiler::_('Customcode.Gui');
- $this->superpower = $superpower ?: Compiler::_('Superpower');
+ $this->config = $config;
+ $this->placeholder = $placeholder;
+ $this->customcode = $customcode;
+ $this->gui = $gui;
+ $this->superpower = $superpower;
$this->db = Factory::getDbo();
$this->app = Factory::getApplication();
}
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 42aa0a117..6bb99d469 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
@@ -19,9 +19,6 @@ use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
use VDM\Joomla\Componentbuilder\JoomlaPower\Super as Superpower;
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Extractor;
use VDM\Joomla\Componentbuilder\Compiler\JoomlaPower\Injector;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Model\Upsert;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Database\Insert;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Database\Update;
/**
@@ -55,15 +52,6 @@ class JoomlaPower implements ServiceProviderInterface
$container->alias(Injector::class, 'Joomla.Power.Injector')
->share('Joomla.Power.Injector', [$this, 'getInjector'], true);
-
- $container->alias(Upsert::class, 'Joomla.Power.Model.Upsert')
- ->share('Joomla.Power.Model.Upsert', [$this, 'getModelUpsert'], true);
-
- $container->alias(Insert::class, 'Joomla.Power.Insert')
- ->share('Joomla.Power.Insert', [$this, 'getInsert'], true);
-
- $container->alias(Update::class, 'Joomla.Power.Update')
- ->share('Joomla.Power.Update', [$this, 'getUpdate'], true);
}
/**
@@ -97,8 +85,7 @@ class JoomlaPower implements ServiceProviderInterface
{
return new Superpower(
$container->get('Joomla.Power.Grep'),
- $container->get('Joomla.Power.Insert'),
- $container->get('Joomla.Power.Update')
+ $container->get('Data.Item')
);
}
@@ -149,53 +136,6 @@ class JoomlaPower implements ServiceProviderInterface
$container->get('Power.Parser'),
$container->get('Placeholder')
);
- }
-
- /**
- * Get the Power Model Upsert
- *
- * @param Container $container The DI container.
- *
- * @return Upsert
- * @since 3.2.0
- */
- public function getModelUpsert(Container $container): Upsert
- {
- return new Upsert(
- $container->get('Table')
- );
- }
-
- /**
- * Get the Power Insert
- *
- * @param Container $container The DI container.
- *
- * @return Insert
- * @since 3.2.0
- */
- public function getInsert(Container $container): Insert
- {
- return new Insert(
- $container->get('Joomla.Power.Model.Upsert'),
- $container->get('Insert')
- );
- }
-
- /**
- * Get the Power Update
- *
- * @param Container $container The DI container.
- *
- * @return Update
- * @since 3.2.0
- */
- public function getUpdate(Container $container): Update
- {
- return new Update(
- $container->get('Joomla.Power.Model.Upsert'),
- $container->get('Update')
- );
}
}
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 43997f63e..958e6c27b 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
@@ -15,10 +15,10 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Service;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use VDM\Joomla\Componentbuilder\Compiler\Power as Powers;
-use VDM\Joomla\Componentbuilder\Power\Grep;
use VDM\Joomla\Componentbuilder\Power\Super as Superpower;
-use VDM\Joomla\Componentbuilder\Compiler\Power\Infusion;
+use VDM\Joomla\Componentbuilder\Power\Grep;
use VDM\Joomla\Componentbuilder\Compiler\Power\Autoloader;
+use VDM\Joomla\Componentbuilder\Compiler\Power\Infusion;
use VDM\Joomla\Componentbuilder\Compiler\Power\Structure;
use VDM\Joomla\Componentbuilder\Compiler\Power\Parser;
use VDM\Joomla\Componentbuilder\Compiler\Power\Plantuml;
@@ -26,9 +26,6 @@ use VDM\Joomla\Componentbuilder\Compiler\Power\Repo\Readme as RepoReadme;
use VDM\Joomla\Componentbuilder\Compiler\Power\Repos\Readme as ReposReadme;
use VDM\Joomla\Componentbuilder\Compiler\Power\Extractor;
use VDM\Joomla\Componentbuilder\Compiler\Power\Injector;
-use VDM\Joomla\Componentbuilder\Power\Model\Upsert;
-use VDM\Joomla\Componentbuilder\Power\Database\Insert;
-use VDM\Joomla\Componentbuilder\Power\Database\Update;
/**
@@ -83,19 +80,10 @@ class Power implements ServiceProviderInterface
$container->alias(Injector::class, 'Power.Injector')
->share('Power.Injector', [$this, 'getInjector'], true);
-
- $container->alias(Upsert::class, 'Power.Model.Upsert')
- ->share('Power.Model.Upsert', [$this, 'getModelUpsert'], true);
-
- $container->alias(Insert::class, 'Power.Insert')
- ->share('Power.Insert', [$this, 'getInsert'], true);
-
- $container->alias(Update::class, 'Power.Update')
- ->share('Power.Update', [$this, 'getUpdate'], true);
}
/**
- * Get the Powers
+ * Get The Power Class.
*
* @param Container $container The DI container.
*
@@ -108,12 +96,13 @@ class Power implements ServiceProviderInterface
$container->get('Config'),
$container->get('Placeholder'),
$container->get('Customcode'),
- $container->get('Customcode.Gui')
+ $container->get('Customcode.Gui'),
+ $container->get('Superpower')
);
}
/**
- * Get the Superpower
+ * Get The Super Class.
*
* @param Container $container The DI container.
*
@@ -124,13 +113,12 @@ class Power implements ServiceProviderInterface
{
return new Superpower(
$container->get('Power.Grep'),
- $container->get('Power.Insert'),
- $container->get('Power.Update')
+ $container->get('Data.Item')
);
}
/**
- * Get the Grep
+ * Get The Grep Class.
*
* @param Container $container The DI container.
*
@@ -147,7 +135,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Autoloader
+ * Get The Autoloader Class.
*
* @param Container $container The DI container.
*
@@ -164,7 +152,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Infusion
+ * Get The Infusion Class.
*
* @param Container $container The DI container.
*
@@ -187,7 +175,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Structure Builder
+ * Get The Structure Class.
*
* @param Container $container The DI container.
*
@@ -210,11 +198,11 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Parser
+ * Get The Parser Class.
*
* @param Container $container The DI container.
*
- * @return Structure
+ * @return Parser
* @since 3.2.0
*/
public function getParser(Container $container): Parser
@@ -223,7 +211,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Plantuml Builder
+ * Get The Plantuml Class.
*
* @param Container $container The DI container.
*
@@ -236,7 +224,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Repo Readme Builder
+ * Get The Readme Class.
*
* @param Container $container The DI container.
*
@@ -252,7 +240,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Repos Readme Builder
+ * Get The Readme Class.
*
* @param Container $container The DI container.
*
@@ -268,7 +256,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Extractor
+ * Get The Extractor Class.
*
* @param Container $container The DI container.
*
@@ -281,7 +269,7 @@ class Power implements ServiceProviderInterface
}
/**
- * Get the Compiler Power Injector
+ * Get The Injector Class.
*
* @param Container $container The DI container.
*
@@ -296,53 +284,6 @@ class Power implements ServiceProviderInterface
$container->get('Power.Parser'),
$container->get('Placeholder')
);
- }
-
- /**
- * Get the Power Model Upsert
- *
- * @param Container $container The DI container.
- *
- * @return Upsert
- * @since 3.2.0
- */
- public function getModelUpsert(Container $container): Upsert
- {
- return new Upsert(
- $container->get('Table')
- );
- }
-
- /**
- * Get the Power Insert
- *
- * @param Container $container The DI container.
- *
- * @return Insert
- * @since 3.2.0
- */
- public function getInsert(Container $container): Insert
- {
- return new Insert(
- $container->get('Power.Model.Upsert'),
- $container->get('Insert')
- );
- }
-
- /**
- * Get the Power Update
- *
- * @param Container $container The DI container.
- *
- * @return Update
- * @since 3.2.0
- */
- public function getUpdate(Container $container): Update
- {
- return new Update(
- $container->get('Power.Model.Upsert'),
- $container->get('Update')
- );
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/SuperInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/SuperInterface.php
deleted file mode 100644
index 21b6a39c5..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/SuperInterface.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- * @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\Interfaces;
-
-
-/**
- * Superpower of JCB
- *
- * @since 3.2.0
- */
-interface SuperInterface
-{
- /**
- * Init all power not found in database
- *
- * @return bool
- * @since 3.2.0
- */
- public function init(): bool;
-
- /**
- * Reset the powers
- *
- * @param array $powers The global unique ids of the powers
- *
- * @return bool
- * @since 3.2.0
- */
- public function reset(array $powers): bool;
-
- /**
- * Load a superpower
- *
- * @param string $guid The global unique id of the power
- * @param array $order The search order
- * @param string|null $action The action to load power
- *
- * @return bool
- * @since 3.2.0
- */
- public function load(string $guid, array $order = ['remote', 'local'], ?string $action = null): bool;
-}
-
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 84dd2bdd4..8aabf5757 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php
@@ -65,7 +65,7 @@ class Config extends BaseConfig
*/
protected function getGiteausername(): ?string
{
- return $this->custom_gitea_username ?? $this->params->get('gitea_username');
+ return $this->params->get('gitea_username');
}
/**
@@ -76,66 +76,7 @@ class Config extends BaseConfig
*/
protected function getGiteatoken(): ?string
{
- return $this->custom_gitea_token ?? $this->params->get('gitea_token');
- }
-
- /**
- * get Add Custom Gitea URL
- *
- * @return int the add switch
- * @since 3.2.0
- */
- protected function getAddcustomgiteaurl(): int
- {
- return $this->params->get('add_custom_gitea_url', 1);
- }
-
- /**
- * get Custom Gitea URL
- *
- * @return string the custom gitea url
- * @since 3.2.0
- */
- protected function getCustomgiteaurl(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_url');
- }
-
- return null;
- }
-
- /**
- * get Custom Gitea Username
- *
- * @return string the custom access token
- * @since 3.2.0
- */
- protected function getCustomgiteausername(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_username');
- }
-
- return null;
- }
-
- /**
- * get Custom Gitea Access Token
- *
- * @return string the custom access token
- * @since 3.2.0
- */
- protected function getCustomgiteatoken(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_token');
- }
-
- return null;
+ return $this->params->get('gitea_token');
}
/**
@@ -165,9 +106,9 @@ class Config extends BaseConfig
// get the users own power repo (can overwrite all)
if (!empty($this->gitea_username))
{
- $repos[$this->gitea_username . '.joomla-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ $repos[$this->gitea_username . '.joomla-powers'] = (object) ['organisation' => $this->gitea_username, 'repository' => 'joomla-powers', 'read_branch' => 'master'];
}
- $repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) ['owner' => $this->joomla_powers_core_organisation, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ $repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) ['organisation' => $this->joomla_powers_core_organisation, 'repository' => 'joomla-powers', 'read_branch' => 'master'];
return $repos;
}
@@ -183,7 +124,7 @@ class Config extends BaseConfig
// some defaults repos we need by JCB
if (!empty($this->gitea_username))
{
- return (object) ['owner' => $this->gitea_username, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ return (object) ['organisation' => $this->gitea_username, 'repository' => 'joomla-powers', 'read_branch' => 'master'];
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Insert.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Insert.php
deleted file mode 100644
index 87270fc34..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Insert.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- * @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\JoomlaPower\Database;
-
-
-use VDM\Joomla\Componentbuilder\Interfaces\Database\InsertInterface;
-use VDM\Joomla\Componentbuilder\Power\Database\Insert as ExtendingInsert;
-
-
-/**
- * Joomla Power Database Insert
- *
- * @since 3.2.1
- */
-final class Insert extends ExtendingInsert implements InsertInterface
-{
- /**
- * Table Name
- *
- * @var string
- * @since 3.2.1
- */
- protected string $table = 'power';
-}
-
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Load.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Load.php
deleted file mode 100644
index c7cac78bc..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Load.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- * @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\JoomlaPower\Database;
-
-
-use VDM\Joomla\Componentbuilder\Power\Database\LoadInterface;
-use VDM\Joomla\Componentbuilder\Power\Database\Load as ExtendingLoad;
-
-
-/**
- * Power Database Load
- *
- * @since 2.0.1
- */
-final class Load extends ExtendingLoad implements LoadInterface
-{
- /**
- * Table Name
- *
- * @var string
- * @since 3.2.1
- */
- protected string $table = 'joomla_power';
-}
-
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Update.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Update.php
deleted file mode 100644
index 65dd0f3a3..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Database/Update.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
- * @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\JoomlaPower\Database;
-
-
-use VDM\Joomla\Componentbuilder\Interfaces\Database\UpdateInterface;
-use VDM\Joomla\Componentbuilder\Power\Database\Update as ExtendingUpdate;
-
-
-/**
- * Joomla Power Database Update
- *
- * @since 3.2.0
- */
-final class Update extends ExtendingUpdate implements UpdateInterface
-{
- /**
- * Table Name
- *
- * @var string
- * @since 3.2.1
- */
- protected string $table = 'joomla_power';
-}
-
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 e598c4826..6215236c9 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Factory.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Factory.php
@@ -14,8 +14,9 @@ namespace VDM\Joomla\Componentbuilder\JoomlaPower;
use Joomla\DI\Container;
use VDM\Joomla\Componentbuilder\JoomlaPower\Service\JoomlaPower as Power;
-use VDM\Joomla\Componentbuilder\Service\Database;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Service\Database as PowerDatabase;
+use VDM\Joomla\Service\Database;
+use VDM\Joomla\Service\Model;
+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;
@@ -77,7 +78,8 @@ abstract class Factory implements FactoryInterface
return (new Container())
->registerServiceProvider(new Power())
->registerServiceProvider(new Database())
- ->registerServiceProvider(new PowerDatabase())
+ ->registerServiceProvider(new Model())
+ ->registerServiceProvider(new Data())
->registerServiceProvider(new Gitea())
->registerServiceProvider(new GiteaPower())
->registerServiceProvider(new GiteaUtilities());
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 8c4f5b254..2803490a5 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php
@@ -56,7 +56,9 @@ final class Grep extends ExtendingGrep implements GrepInterface
try
{
- $path->index = $this->contents->get($path->owner, $path->repo, 'joomla-powers.json', $path->branch);
+ $this->contents->load_($path->base ?? null, $path->token ?? null);
+ $path->index = $this->contents->get($path->organisation, $path->repository, 'joomla-powers.json', $path->read_branch);
+ $this->contents->reset_();
}
catch (\Exception $e)
{
@@ -108,46 +110,43 @@ final class Grep extends ExtendingGrep implements GrepInterface
*/
protected function getRemote(object $path, string $guid): ?object
{
+ $power = null;
if (empty($path->index->{$guid}->settings))
{
- return null;
+ return $power;
}
// get the settings
- if (($power = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->settings, $path->branch)) !== null &&
+ $this->contents->load_($path->base ?? null, $path->token ?? null);
+ if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->settings, $path->read_branch)) !== null &&
isset($power->guid))
{
// set the git details in params
$power->params = (object) [
- 'git' => [
- 'owner' => $path->owner,
- 'repo' => $path->repo,
- 'branch' => $path->branch
- ]
+ 'source' => ['guid' => $path->guid ?? null]
];
-
- return $power;
}
+ $this->contents->reset_();
- return null;
+ return $power;
}
/**
* Load the remote file
*
- * @param string $owner The repository owner
- * @param string $repo The repository name
- * @param string $path The repository path to file
- * @param string|null $branch The repository branch name
+ * @param string $organisation The repository organisation
+ * @param string $repository The repository name
+ * @param string $path The repository path to file
+ * @param string|null $branch The repository branch name
*
* @return mixed
* @since 3.2.0
*/
- protected function loadRemoteFile(string $owner, string $repo, string $path, ?string $branch)
+ protected function loadRemoteFile(string $organisation, string $repository, string $path, ?string $branch)
{
try
{
- $data = $this->contents->get($owner, $repo, $path, $branch);
+ $data = $this->contents->get($organisation, $repository, $path, $branch);
}
catch (\Exception $e)
{
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/Load.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/Load.php
deleted file mode 100644
index 345418dab..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/Load.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
- * @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\JoomlaPower\Model;
-
-
-use VDM\Joomla\Interfaces\ModelInterface;
-use VDM\Joomla\Componentbuilder\Power\Model\Load as ExtendingLoad;
-
-
-/**
- * Joomla Power Model Load
- *
- * @since 3.2.0
- */
-final class Load extends ExtendingLoad implements ModelInterface
-{
- /**
- * Get the current active table
- *
- * @return string
- * @since 3.2.0
- */
- protected function getTable(): string
- {
- return 'joomla_power';
- }
-}
-
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/Upsert.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/Upsert.php
deleted file mode 100644
index e22bb3f5a..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Model/Upsert.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
- * @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\JoomlaPower\Model;
-
-
-use VDM\Joomla\Interfaces\ModelInterface;
-use VDM\Joomla\Componentbuilder\Power\Model\Upsert as ExtendingUpsert;
-
-
-/**
- * Joomla Power Model Update or Insert
- *
- * @since 3.2.0
- */
-final class Upsert extends ExtendingUpsert implements ModelInterface
-{
- /**
- * Get the current active table
- *
- * @return string
- * @since 3.2.0
- */
- protected function getTable(): string
- {
- return 'joomla_power';
- }
-
-}
-
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/Database.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/Database.php
deleted file mode 100644
index 06524adc2..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/Database.php
+++ /dev/null
@@ -1,135 +0,0 @@
-
- * @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\JoomlaPower\Service;
-
-
-use Joomla\DI\Container;
-use Joomla\DI\ServiceProviderInterface;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Model\Load as ModelLoad;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Model\Upsert as ModelUpsert;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Database\Load as LoadDatabase;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Database\Insert as InsertDatabase;
-use VDM\Joomla\Componentbuilder\JoomlaPower\Database\Update as UpdateDatabase;
-
-
-/**
- * Database Service Provider
- *
- * @since 3.2.0
- */
-class Database implements ServiceProviderInterface
-{
- /**
- * Registers the service provider with a DI container.
- *
- * @param Container $container The DI container.
- *
- * @return void
- * @since 3.2.0
- */
- public function register(Container $container)
- {
- $container->alias(ModelLoad::class, 'Joomla.Power.Model.Load')
- ->share('Joomla.Power.Model.Load', [$this, 'getModelLoad'], true);
-
- $container->alias(ModelUpsert::class, 'Joomla.Power.Model.Upsert')
- ->share('Joomla.Power.Model.Upsert', [$this, 'getModelUpsert'], true);
-
- $container->alias(LoadDatabase::class, 'Joomla.Power.Database.Load')
- ->share('Joomla.Power.Database.Load', [$this, 'getLoadDatabase'], true);
-
- $container->alias(InsertDatabase::class, 'Joomla.Power.Database.Insert')
- ->share('Joomla.Power.Database.Insert', [$this, 'getInsertDatabase'], true);
-
- $container->alias(UpdateDatabase::class, 'Joomla.Power.Database.Update')
- ->share('Joomla.Power.Database.Update', [$this, 'getUpdateDatabase'], true);
- }
-
- /**
- * Get the Power Model Load
- *
- * @param Container $container The DI container.
- *
- * @return ModelLoad
- * @since 3.2.0
- */
- public function getModelLoad(Container $container): ModelLoad
- {
- return new ModelLoad(
- $container->get('Table')
- );
- }
-
- /**
- * Get the Power Model Update or Insert
- *
- * @param Container $container The DI container.
- *
- * @return ModelUpsert
- * @since 3.2.0
- */
- public function getModelUpsert(Container $container): ModelUpsert
- {
- return new ModelUpsert(
- $container->get('Table')
- );
- }
-
- /**
- * Get the Load Database
- *
- * @param Container $container The DI container.
- *
- * @return LoadDatabase
- * @since 3.2.0
- */
- public function getLoadDatabase(Container $container): LoadDatabase
- {
- return new LoadDatabase(
- $container->get('Joomla.Power.Model.Load'),
- $container->get('Load')
- );
- }
-
- /**
- * Get the Insert Database
- *
- * @param Container $container The DI container.
- *
- * @return InsertDatabase
- * @since 3.2.0
- */
- public function getInsertDatabase(Container $container): InsertDatabase
- {
- return new InsertDatabase(
- $container->get('Joomla.Power.Model.Upsert'),
- $container->get('Insert')
- );
- }
-
- /**
- * Get the Update Database
- *
- * @param Container $container The DI container.
- *
- * @return UpdateDatabase
- * @since 3.2.0
- */
- public function getUpdateDatabase(Container $container): UpdateDatabase
- {
- return new UpdateDatabase(
- $container->get('Joomla.Power.Model.Upsert'),
- $container->get('Update')
- );
- }
-}
-
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 941fb5789..9e7a2f8fc 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
@@ -108,8 +108,7 @@ class JoomlaPower implements ServiceProviderInterface
{
return new Superpower(
$container->get('Joomla.Power.Grep'),
- $container->get('Joomla.Power.Database.Insert'),
- $container->get('Joomla.Power.Database.Update')
+ $container->get('Data.Item')
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Super.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Super.php
index 1a5684884..5ea95f281 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Super.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Super.php
@@ -12,8 +12,8 @@
namespace VDM\Joomla\Componentbuilder\JoomlaPower;
-use VDM\Joomla\Componentbuilder\Interfaces\SuperInterface;
-use VDM\Joomla\Componentbuilder\Power\Super as ExtendingSuper;
+use VDM\Joomla\Interfaces\Data\RemoteInterface;
+use VDM\Joomla\Data\Remote;
/**
@@ -21,7 +21,7 @@ use VDM\Joomla\Componentbuilder\Power\Super as ExtendingSuper;
*
* @since 3.2.0
*/
-final class Super extends ExtendingSuper implements SuperInterface
+final class Super extends Remote implements RemoteInterface
{
/**
* Table Name
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 b5167fdb0..633215b60 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php
@@ -13,9 +13,11 @@ namespace VDM\Joomla\Componentbuilder\Power;
use Joomla\Registry\Registry as JoomlaRegistry;
-use Joomla\CMS\Factory as JoomlaFactory;
+use Joomla\CMS\Factory as JoomlaFactory;
+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;
@@ -43,9 +45,9 @@ class Config extends BaseConfig
/**
* Constructor
*
- * @param Input|null $input Input
- * @param Registry|null $params The component parameters
- * @param Registry|null $config The Joomla configuration
+ * @param Input|null $input Input
+ * @param JoomlaRegistry|null $params The component parameters
+ * @param JoomlaRegistry|null $config The Joomla configuration
*
* @throws \Exception
* @since 3.2.0
@@ -65,7 +67,7 @@ class Config extends BaseConfig
*/
protected function getGiteausername(): ?string
{
- return $this->custom_gitea_username ?? $this->params->get('gitea_username');
+ return $this->params->get('gitea_username');
}
/**
@@ -76,66 +78,7 @@ class Config extends BaseConfig
*/
protected function getGiteatoken(): ?string
{
- return $this->custom_gitea_token ?? $this->params->get('gitea_token');
- }
-
- /**
- * get Add Custom Gitea URL
- *
- * @return int the add switch
- * @since 3.2.0
- */
- protected function getAddcustomgiteaurl(): int
- {
- return $this->params->get('add_custom_gitea_url', 1);
- }
-
- /**
- * get Custom Gitea URL
- *
- * @return string the custom gitea url
- * @since 3.2.0
- */
- protected function getCustomgiteaurl(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_url');
- }
-
- return null;
- }
-
- /**
- * get Custom Gitea Username
- *
- * @return string the custom access token
- * @since 3.2.0
- */
- protected function getCustomgiteausername(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_username');
- }
-
- return null;
- }
-
- /**
- * get Custom Gitea Access Token
- *
- * @return string the custom access token
- * @since 3.2.0
- */
- protected function getCustomgiteatoken(): ?string
- {
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('custom_gitea_token');
- }
-
- return null;
+ return $this->params->get('gitea_token');
}
/**
@@ -149,11 +92,6 @@ class Config extends BaseConfig
// the VDM default organisation is [joomla]
$organisation = 'joomla';
- if ($this->add_custom_gitea_url == 2)
- {
- return $this->params->get('super_powers_core_organisation', $organisation);
- }
-
return $organisation;
}
@@ -168,38 +106,31 @@ class Config extends BaseConfig
// some defaults repos we need by JCB
$repos = [];
- // only add custom init with custom gitea
- $paths = null;
- if ($this->add_custom_gitea_url == 2)
- {
- $paths = $this->params->get('super_powers_init_repos');
- }
-
// get the users own power repo (can overwrite all)
- if (!empty($this->gitea_username))
+ if ($this->gitea_username !== null)
{
- $repos[$this->gitea_username . '.super-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
+ $repos[$this->gitea_username . '.super-powers'] = (object) [
+ 'organisation' => $this->gitea_username,
+ 'repository' => 'super-powers',
+ 'read_branch' => 'master'
+ ];
}
- if (!empty($paths) && is_array($paths))
- {
- foreach ($paths as $path)
- {
- $owner = $path->owner ?? null;
- $repo = $path->repo ?? null;
- if ($owner !== null && $repo !== null)
- {
- // we make sure to get only the objects
- $repos = ["{$owner}.{$repo}" => $path] + $repos;
- }
- }
- }
- else
- {
- $repos[$this->super_powers_core_organisation . '.super-powers'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'super-powers', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.gitea'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'gitea', 'branch' => 'master'];
- $repos[$this->super_powers_core_organisation . '.openai'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'openai', 'branch' => 'master'];
- }
+ $repos[$this->super_powers_core_organisation . '.super-powers'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'super-powers',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.gitea'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'gitea',
+ 'read_branch' => 'master'
+ ];
+ $repos[$this->super_powers_core_organisation . '.openai'] = (object) [
+ 'organisation' => $this->super_powers_core_organisation,
+ 'repository' => 'openai',
+ 'read_branch' => 'master'
+ ];
return $repos;
}
@@ -212,9 +143,13 @@ class Config extends BaseConfig
*/
protected function getSuperpowerspushrepo(): ?object
{
- if (!empty($this->gitea_username))
+ if ($this->gitea_username !== null)
{
- return (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
+ return (object) [
+ 'organisation' => $this->gitea_username,
+ 'repository' => 'super-powers',
+ 'read_branch' => 'master'
+ ];
}
return null;
@@ -288,19 +223,14 @@ class Config extends BaseConfig
// some defaults repos we need by JCB
$approved = $this->super_powers_init_repos;
- if (!$this->add_own_powers)
- {
- return array_values($approved);
- }
+ $paths = RepoHelper::get(1); // super powers = 1
- $paths = $this->params->get('approved_paths');
-
- if (!empty($paths))
+ if ($paths !== null)
{
foreach ($paths as $path)
{
- $owner = $path->owner ?? null;
- $repo = $path->repo ?? null;
+ $owner = $path->organisation ?? null;
+ $repo = $path->repository ?? null;
if ($owner !== null && $repo !== null)
{
// we make sure to get only the objects
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 c3ef0491c..3803bf75d 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Factory.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Factory.php
@@ -14,8 +14,9 @@ namespace VDM\Joomla\Componentbuilder\Power;
use Joomla\DI\Container;
use VDM\Joomla\Componentbuilder\Power\Service\Power;
-use VDM\Joomla\Componentbuilder\Service\Database;
-use VDM\Joomla\Componentbuilder\Power\Service\Database as PowerDatabase;
+use VDM\Joomla\Service\Database;
+use VDM\Joomla\Service\Model;
+use VDM\Joomla\Service\Data;
use VDM\Joomla\Componentbuilder\Power\Service\Generator;
use VDM\Joomla\Componentbuilder\Service\Gitea;
use VDM\Joomla\Componentbuilder\Power\Service\Gitea as GiteaPower;
@@ -78,7 +79,8 @@ abstract class Factory implements FactoryInterface
return (new Container())
->registerServiceProvider(new Power())
->registerServiceProvider(new Database())
- ->registerServiceProvider(new PowerDatabase())
+ ->registerServiceProvider(new Model())
+ ->registerServiceProvider(new Data())
->registerServiceProvider(new Generator())
->registerServiceProvider(new Gitea())
->registerServiceProvider(new GiteaPower())
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Generator/Search.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Generator/Search.php
index 25cb6c8e2..ea38aec7b 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Generator/Search.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Generator/Search.php
@@ -12,7 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Power\Generator;
-use VDM\Joomla\Componentbuilder\Power\Database\Load as Database;
+use VDM\Joomla\Data\Action\Load as Database;
use VDM\Joomla\Componentbuilder\Compiler\Power\Parser;
use VDM\Joomla\Componentbuilder\Power\Generator\Bucket;
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
@@ -77,7 +77,7 @@ final class Search
{
if (($power = $this->bucket->get("power.{$guid}")) === null)
{
- if (($power = $this->database->item(['guid' => $guid])) === null)
+ if (($power = $this->database->table('power')->item(['guid' => $guid])) === null)
{
return null;
}
@@ -255,7 +255,7 @@ final class Search
{
if (($service_providers = $this->bucket->get("service_providers.{$guid}")) === null)
{
- if (($powers = $this->database->items([
+ if (($powers = $this->database->table('power')->items([
'use_selection' => [
'operator' => 'LIKE',
'value' => "'%{$guid}%'",
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 590fce1d6..bbcb7733a 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php
@@ -48,14 +48,28 @@ final class Grep extends ExtendingGrep implements GrepInterface
try
{
- $path->index = $this->contents->get($path->owner, $path->repo, 'super-powers.json', $path->branch);
+ $this->contents->load_($path->base ?? null, $path->token ?? null);
+ $path->index = $this->contents->get($path->organisation, $path->repository, 'super-powers.json', $path->read_branch);
+ $this->contents->reset_();
}
catch (\Exception $e)
{
- $this->app->enqueueMessage(
- Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
- 'Error'
- );
+ if ('super-powers' === $path->repository && 'joomla' !== $path->organisation && (empty($path->base) || $path->base === 'https://git.vdm.dev'))
+ {
+ // give heads-up about the overriding feature
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BHTTPSGITVDMDEVSB_CAN_BE_USED_TO_OVERRIDE_ANY_POWERBR_BUT_HAS_NOT_YET_BEEN_SET_IN_YOUR_ACCOUNT_AT_HTTPSGITVDMDEVSBR_SMALLTHIS_IS_AND_OPTIONAL_FEATURESMALL', $path->path, $path->organisation),
+ 'Message'
+ );
+ }
+ else
+ {
+ // give error
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
+ 'Error'
+ );
+ }
$path->index = null;
}
@@ -161,50 +175,48 @@ final class Grep extends ExtendingGrep implements GrepInterface
*/
protected function getRemote(object $path, string $guid): ?object
{
+ $power = null;
if (empty($path->index->{$guid}->settings) || empty($path->index->{$guid}->code))
{
- return null;
+ return $power;
}
// get the settings
- if (($power = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->settings, $path->branch)) !== null &&
+ $this->contents->load_($path->base ?? null, $path->token ?? null);
+ if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->settings, $path->read_branch)) !== null &&
isset($power->guid))
{
// get the code
- if (($code = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->power, $path->branch)) !== null)
+ if (($code = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->power, $path->read_branch)) !== null)
{
// set the git details in params
$power->params = (object) [
- 'git' => [
- 'owner' => $path->owner,
- 'repo' => $path->repo,
- 'branch' => $path->branch
- ]
+ 'source' => ['guid' => $path->guid ?? null]
];
$power->main_class_code = $code;
- return $power;
}
}
+ $this->contents->reset_();
- return null;
+ return $power;
}
/**
* Load the remote file
*
- * @param string $owner The repository owner
- * @param string $repo The repository name
- * @param string $path The repository path to file
- * @param string|null $branch The repository branch name
+ * @param string $organisation The repository organisation
+ * @param string $repository The repository name
+ * @param string $path The repository path to file
+ * @param string|null $branch The repository branch name
*
* @return mixed
* @since 3.2.0
*/
- protected function loadRemoteFile(string $owner, string $repo, string $path, ?string $branch)
+ protected function loadRemoteFile(string $organisation, string $repository, string $path, ?string $branch)
{
try
{
- $data = $this->contents->get($owner, $repo, $path, $branch);
+ $data = $this->contents->get($organisation, $repository, $path, $branch);
}
catch (\Exception $e)
{
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Database.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Database.php
deleted file mode 100644
index 4b1a238a4..000000000
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Database.php
+++ /dev/null
@@ -1,135 +0,0 @@
-
- * @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\Power\Service;
-
-
-use Joomla\DI\Container;
-use Joomla\DI\ServiceProviderInterface;
-use VDM\Joomla\Componentbuilder\Power\Model\Load as ModelLoad;
-use VDM\Joomla\Componentbuilder\Power\Model\Upsert as ModelUpsert;
-use VDM\Joomla\Componentbuilder\Power\Database\Load as LoadDatabase;
-use VDM\Joomla\Componentbuilder\Power\Database\Insert as InsertDatabase;
-use VDM\Joomla\Componentbuilder\Power\Database\Update as UpdateDatabase;
-
-
-/**
- * Database Service Provider
- *
- * @since 3.2.0
- */
-class Database implements ServiceProviderInterface
-{
- /**
- * Registers the service provider with a DI container.
- *
- * @param Container $container The DI container.
- *
- * @return void
- * @since 3.2.0
- */
- public function register(Container $container)
- {
- $container->alias(ModelLoad::class, 'Power.Model.Load')
- ->share('Power.Model.Load', [$this, 'getModelLoad'], true);
-
- $container->alias(ModelUpsert::class, 'Power.Model.Upsert')
- ->share('Power.Model.Upsert', [$this, 'getModelUpsert'], true);
-
- $container->alias(LoadDatabase::class, 'Power.Database.Load')
- ->share('Power.Database.Load', [$this, 'getLoadDatabase'], true);
-
- $container->alias(InsertDatabase::class, 'Power.Database.Insert')
- ->share('Power.Database.Insert', [$this, 'getInsertDatabase'], true);
-
- $container->alias(UpdateDatabase::class, 'Power.Database.Update')
- ->share('Power.Database.Update', [$this, 'getUpdateDatabase'], true);
- }
-
- /**
- * Get the Power Model Load
- *
- * @param Container $container The DI container.
- *
- * @return ModelLoad
- * @since 3.2.0
- */
- public function getModelLoad(Container $container): ModelLoad
- {
- return new ModelLoad(
- $container->get('Table')
- );
- }
-
- /**
- * Get the Power Model Update or Insert
- *
- * @param Container $container The DI container.
- *
- * @return ModelUpsert
- * @since 3.2.0
- */
- public function getModelUpsert(Container $container): ModelUpsert
- {
- return new ModelUpsert(
- $container->get('Table')
- );
- }
-
- /**
- * Get the Load Database
- *
- * @param Container $container The DI container.
- *
- * @return LoadDatabase
- * @since 3.2.0
- */
- public function getLoadDatabase(Container $container): LoadDatabase
- {
- return new LoadDatabase(
- $container->get('Power.Model.Load'),
- $container->get('Load')
- );
- }
-
- /**
- * Get the Insert Database
- *
- * @param Container $container The DI container.
- *
- * @return InsertDatabase
- * @since 3.2.0
- */
- public function getInsertDatabase(Container $container): InsertDatabase
- {
- return new InsertDatabase(
- $container->get('Power.Model.Upsert'),
- $container->get('Insert')
- );
- }
-
- /**
- * Get the Update Database
- *
- * @param Container $container The DI container.
- *
- * @return UpdateDatabase
- * @since 3.2.0
- */
- public function getUpdateDatabase(Container $container): UpdateDatabase
- {
- return new UpdateDatabase(
- $container->get('Power.Model.Upsert'),
- $container->get('Update')
- );
- }
-}
-
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Generator.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Generator.php
index 23a82cd1e..2d56299cd 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Generator.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Generator.php
@@ -121,7 +121,7 @@ class Generator implements ServiceProviderInterface
public function getSearch(Container $container): Search
{
return new Search(
- $container->get('Power.Database.Load'),
+ $container->get('Data.Load'),
$container->get('Power.Parser'),
$container->get('Power.Generator.Bucket')
);
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 e62c3a350..f96540067 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
@@ -109,8 +109,7 @@ class Power implements ServiceProviderInterface
{
return new Superpower(
$container->get('Power.Grep'),
- $container->get('Power.Database.Insert'),
- $container->get('Power.Database.Update')
+ $container->get('Data.Item')
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php
index 97b62ad40..eef7f0e1f 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php
@@ -12,11 +12,8 @@
namespace VDM\Joomla\Componentbuilder\Power;
-use VDM\Joomla\Interfaces\GrepInterface as Grep;
-use VDM\Joomla\Componentbuilder\Interfaces\Database\InsertInterface as Insert;
-use VDM\Joomla\Componentbuilder\Interfaces\Database\UpdateInterface as Update;
-use VDM\Joomla\Utilities\GuidHelper;
-use VDM\Joomla\Componentbuilder\Interfaces\SuperInterface;
+use VDM\Joomla\Interfaces\Data\RemoteInterface;
+use VDM\Joomla\Data\Remote;
/**
@@ -24,171 +21,14 @@ use VDM\Joomla\Componentbuilder\Interfaces\SuperInterface;
*
* @since 3.2.0
*/
-class Super implements SuperInterface
+final class Super extends Remote implements RemoteInterface
{
- /**
- * The Power Search Tool
- *
- * @var Grep
- * @since 3.2.0
- **/
- protected Grep $grep;
-
- /**
- * Insert Data Class
- *
- * @var Insert
- * @since 3.2.0
- **/
- protected Insert $insert;
-
- /**
- * Update Data Class
- *
- * @var Update
- * @since 3.2.0
- **/
- protected Update $update;
-
/**
* Table Name
*
* @var string
* @since 3.2.1
*/
- protected string $table = 'power';
-
- /**
- * Constructor.
- *
- * @param Grep $grep The Power Grep object.
- * @param Insert $insert The Power Database Insert object.
- * @param Update $update The Power Database Update object.
- *
- * @since 3.2.0
- */
- public function __construct(Grep $grep, Insert $insert, Update $update)
- {
- $this->grep = $grep;
- $this->insert = $insert;
- $this->update = $update;
- }
-
- /**
- * Init all power not found in database
- *
- * @return bool
- * @since 3.2.0
- */
- public function init(): bool
- {
- if (($powers = $this->grep->getRemotePowersGuid()) !== null)
- {
- foreach($powers as $guid)
- {
- if ($this->action($guid) === 'insert' && ($power = $this->grep->get($guid, ['remote'])) !== null)
- {
- $this->insert($power);
- }
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Reset the powers
- *
- * @param array $powers The global unique ids of the powers
- *
- * @return bool
- * @since 3.2.0
- */
- public function reset(array $powers): bool
- {
- if ($powers === [])
- {
- return false;
- }
-
- $success = true;
-
- foreach($powers as $guid)
- {
- if (!$this->load($guid, ['remote']))
- {
- $success = false;
- }
- }
-
- return $success;
- }
-
- /**
- * Load a superpower
- *
- * @param string $guid The global unique id of the power
- * @param array $order The search order
- * @param string|null $action The action to load power
- *
- * @return bool
- * @since 3.2.0
- */
- public function load(string $guid, array $order = ['remote', 'local'], ?string $action = null): bool
- {
- if (($power = $this->grep->get($guid, $order)) !== null &&
- ($action !== null || ($action = $this->action($power->guid)) !== null))
- {
- return method_exists($this, $action) ? $this->{$action}($power) : false;
- }
-
- return false;
- }
-
- /**
- * Insert a superpower
- *
- * @param object $power The power
- *
- * @return bool
- * @since 3.2.0
- */
- private function insert(object $power): bool
- {
- return $this->insert->item($power);
- }
-
- /**
- * Update a superpower
- *
- * @param object $power The power
- *
- * @return bool
- * @since 3.2.0
- */
- private function update(object $power): bool
- {
- return $this->update->item($power);
- }
-
- /**
- * Get loading action
- *
- * @param string $guid The global unique id of the power
- *
- * @return string
- * @since 3.2.0
- */
- private function action(string $guid): string
- {
- if (($id = GuidHelper::item($guid, $this->table)) !== null && $id > 0)
- {
- return 'update';
- }
-
- return 'insert';
- }
+ protected string $table = 'power';
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php
index 4cbee85c3..004ac74b0 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php
@@ -95,233 +95,57 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'php_site_event' => [
- 'name' => 'php_site_event',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL',
- 'type' => 'editor',
+ 'created' => [
+ 'name' => 'created',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL',
+ 'type' => 'calendar',
'title' => false,
'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Libs & Helpers',
+ 'store' => NULL,
+ 'tab_name' => 'publishing',
'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
+ 'type' => 'DATETIME',
+ 'default' => '0000-00-00 00:00:00',
'null_switch' => 'NOT NULL',
'unique_key' => false,
'key' => false,
],
],
- 'component_version' => [
- 'name' => 'component_version',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL',
+ 'crowdin_project_identifier' => [
+ 'name' => 'crowdin_project_identifier',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL',
'type' => 'text',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
- 'tab_name' => 'Details',
+ 'tab_name' => 'Dynamic Integration',
'db' => [
- 'type' => 'CHAR(64)',
+ 'type' => 'VARCHAR(255)',
'default' => '',
'null_switch' => 'NOT NULL',
'unique_key' => false,
'key' => false,
],
],
- 'php_admin_event' => [
- 'name' => 'php_admin_event',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Libs & Helpers',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'crowdin_username' => [
- 'name' => 'crowdin_username',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_LABEL',
+ 'backup_folder_path' => [
+ 'name' => 'backup_folder_path',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_FOLDER_PATH_LABEL',
'type' => 'text',
'title' => false,
'list' => 'joomla_components',
- 'store' => 'basic_encryption',
+ 'store' => NULL,
'tab_name' => 'Dynamic Integration',
'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
'null_switch' => 'NOT NULL',
'unique_key' => false,
'key' => false,
],
],
- 'php_preflight_install' => [
- 'name' => 'php_preflight_install',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Dash & Install',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'remove_line_breaks' => [
- 'name' => 'remove_line_breaks',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'description' => [
- 'name' => 'description',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL',
- 'type' => 'textarea',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'php_method_uninstall' => [
- 'name' => 'php_method_uninstall',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Dash & Install',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'debug_linenr' => [
- 'name' => 'debug_linenr',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'mvc_versiondate' => [
- 'name' => 'mvc_versiondate',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL',
- 'type' => 'list',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'css_admin' => [
- 'name' => 'css_admin',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Libs & Helpers',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'addreadme' => [
- 'name' => 'addreadme',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Readme',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'php_postflight_install' => [
- 'name' => 'php_postflight_install',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_INSTALL_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Dash & Install',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'add_placeholders' => [
- 'name' => 'add_placeholders',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'sql' => [
- 'name' => 'sql',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL',
+ 'sql_uninstall' => [
+ 'name' => 'sql_uninstall',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL',
'type' => 'textarea',
'title' => false,
'list' => 'joomla_components',
@@ -335,310 +159,6 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'author' => [
- 'name' => 'author',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL',
- 'type' => 'text',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'VARCHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'update_server_url' => [
- 'name' => 'update_server_url',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_LABEL',
- 'type' => 'url',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Dynamic Integration',
- 'db' => [
- 'type' => 'VARCHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'email' => [
- 'name' => 'email',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL',
- 'type' => 'text',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'VARCHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'add_backup_folder_path' => [
- 'name' => 'add_backup_folder_path',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_BACKUP_FOLDER_PATH_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Dynamic Integration',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'website' => [
- 'name' => 'website',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL',
- 'type' => 'url',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'CHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'translation_tool' => [
- 'name' => 'translation_tool',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION_TOOL_LABEL',
- 'type' => 'list',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Dynamic Integration',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'add_license' => [
- 'name' => 'add_license',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_LICENSE_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'buildcompsql' => [
- 'name' => 'buildcompsql',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL',
- 'type' => 'textarea',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Dynamic Build',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'license_type' => [
- 'name' => 'license_type',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_TYPE_LABEL',
- 'type' => 'list',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'php_helper_admin' => [
- 'name' => 'php_helper_admin',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Libs & Helpers',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'php_helper_site' => [
- 'name' => 'php_helper_site',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Libs & Helpers',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'whmcs_key' => [
- 'name' => 'whmcs_key',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_LABEL',
- 'type' => 'text',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'basic_encryption',
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'VARCHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'javascript' => [
- 'name' => 'javascript',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Libs & Helpers',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'whmcs_url' => [
- 'name' => 'whmcs_url',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_LABEL',
- 'type' => 'url',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'VARCHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'css_site' => [
- 'name' => 'css_site',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Libs & Helpers',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'whmcs_buy_link' => [
- 'name' => 'whmcs_buy_link',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_LABEL',
- 'type' => 'url',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'VARCHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'license' => [
- 'name' => 'license',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL',
- 'type' => 'textarea',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'VARCHAR(255)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'php_preflight_update' => [
- 'name' => 'php_preflight_update',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Dash & Install',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'bom' => [
- 'name' => 'bom',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL',
- 'type' => 'filelist',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'CHAR(64)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
'php_postflight_update' => [
'name' => 'php_postflight_update',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_UPDATE_LABEL',
@@ -655,10 +175,138 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'image' => [
- 'name' => 'image',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL',
- 'type' => 'media',
+ 'css_site' => [
+ 'name' => 'css_site',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_SITE_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'mvc_versiondate' => [
+ 'name' => 'mvc_versiondate',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MVC_VERSIONDATE_LABEL',
+ 'type' => 'list',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'remove_line_breaks' => [
+ 'name' => 'remove_line_breaks',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'add_placeholders' => [
+ 'name' => 'add_placeholders',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PLACEHOLDERS_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'php_helper_site' => [
+ 'name' => 'php_helper_site',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_SITE_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'javascript' => [
+ 'name' => 'javascript',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JAVASCRIPT_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'description' => [
+ 'name' => 'description',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DESCRIPTION_LABEL',
+ 'type' => 'textarea',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'debug_linenr' => [
+ 'name' => 'debug_linenr',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DEBUG_LINENR_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'author' => [
+ 'name' => 'author',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL',
+ 'type' => 'text',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
@@ -687,10 +335,10 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'copyright' => [
- 'name' => 'copyright',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_LABEL',
- 'type' => 'textarea',
+ 'email' => [
+ 'name' => 'email',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL',
+ 'type' => 'text',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
@@ -703,54 +351,22 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'sql_uninstall' => [
- 'name' => 'sql_uninstall',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_UNINSTALL_LABEL',
- 'type' => 'textarea',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'MySQL',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'preferred_joomla_version' => [
- 'name' => 'preferred_joomla_version',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PREFERRED_JOOMLA_VERSION_LABEL',
- 'type' => 'number',
+ 'website' => [
+ 'name' => 'website',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL',
+ 'type' => 'url',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
'tab_name' => 'Details',
'db' => [
- 'type' => 'INT(11)',
- 'default' => '3',
+ 'type' => 'CHAR(255)',
+ 'default' => '',
'null_switch' => 'NOT NULL',
'unique_key' => false,
'key' => false,
],
],
- 'add_powers' => [
- 'name' => 'add_powers',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Details',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '1',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
'add_sales_server' => [
'name' => 'add_sales_server',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SALES_SERVER_LABEL',
@@ -767,14 +383,14 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'backup_folder_path' => [
- 'name' => 'backup_folder_path',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BACKUP_FOLDER_PATH_LABEL',
- 'type' => 'text',
+ 'license' => [
+ 'name' => 'license',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_LICENSE_LABEL',
+ 'type' => 'textarea',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
- 'tab_name' => 'Dynamic Integration',
+ 'tab_name' => 'Details',
'db' => [
'type' => 'VARCHAR(255)',
'default' => '',
@@ -799,13 +415,253 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'crowdin_project_identifier' => [
- 'name' => 'crowdin_project_identifier',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_PROJECT_IDENTIFIER_LABEL',
+ 'bom' => [
+ 'name' => 'bom',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BOM_LABEL',
+ 'type' => 'filelist',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'CHAR(64)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'image' => [
+ 'name' => 'image',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL',
+ 'type' => 'media',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'php_admin_event' => [
+ 'name' => 'php_admin_event',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'copyright' => [
+ 'name' => 'copyright',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_LABEL',
+ 'type' => 'textarea',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'php_site_event' => [
+ 'name' => 'php_site_event',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_SITE_EVENT_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'css_admin' => [
+ 'name' => 'css_admin',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CSS_ADMIN_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'php_preflight_update' => [
+ 'name' => 'php_preflight_update',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_UPDATE_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Dash & Install',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'component_version' => [
+ 'name' => 'component_version',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPONENT_VERSION_LABEL',
'type' => 'text',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'CHAR(64)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'php_preflight_install' => [
+ 'name' => 'php_preflight_install',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_PREFLIGHT_INSTALL_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Dash & Install',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'preferred_joomla_version' => [
+ 'name' => 'preferred_joomla_version',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PREFERRED_JOOMLA_VERSION_LABEL',
+ 'type' => 'number',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'INT(11)',
+ 'default' => '3',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'php_postflight_install' => [
+ 'name' => 'php_postflight_install',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_POSTFLIGHT_INSTALL_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Dash & Install',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'add_powers' => [
+ 'name' => 'add_powers',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_POWERS_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '1',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'php_method_uninstall' => [
+ 'name' => 'php_method_uninstall',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_METHOD_UNINSTALL_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Dash & Install',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'sql' => [
+ 'name' => 'sql',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SQL_LABEL',
+ 'type' => 'textarea',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'MySQL',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'addreadme' => [
+ 'name' => 'addreadme',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDREADME_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Readme',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'update_server_url' => [
+ 'name' => 'update_server_url',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_URL_LABEL',
+ 'type' => 'url',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
'tab_name' => 'Dynamic Integration',
'db' => [
'type' => 'VARCHAR(255)',
@@ -815,30 +671,14 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'created' => [
- 'name' => 'created',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATED_LABEL',
- 'type' => 'calendar',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'publishing',
- 'db' => [
- 'type' => 'DATETIME',
- 'default' => '0000-00-00 00:00:00',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'add_php_helper_admin' => [
- 'name' => 'add_php_helper_admin',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_ADMIN_LABEL',
+ 'add_backup_folder_path' => [
+ 'name' => 'add_backup_folder_path',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_BACKUP_FOLDER_PATH_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
- 'tab_name' => 'Libs & Helpers',
+ 'tab_name' => 'Dynamic Integration',
'db' => [
'type' => 'TINYINT(1)',
'default' => '0',
@@ -847,17 +687,81 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'add_admin_event' => [
- 'name' => 'add_admin_event',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_ADMIN_EVENT_LABEL',
+ 'translation_tool' => [
+ 'name' => 'translation_tool',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TRANSLATION_TOOL_LABEL',
+ 'type' => 'list',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Dynamic Integration',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'crowdin_username' => [
+ 'name' => 'crowdin_username',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CROWDIN_USERNAME_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'basic_encryption',
+ 'tab_name' => 'Dynamic Integration',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'buildcompsql' => [
+ 'name' => 'buildcompsql',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_BUILDCOMPSQL_LABEL',
+ 'type' => 'textarea',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Dynamic Build',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'add_namespace_prefix' => [
+ 'name' => 'add_namespace_prefix',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_NAMESPACE_PREFIX_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
- 'tab_name' => 'Libs & Helpers',
+ 'tab_name' => 'Settings',
'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
+ 'type' => 'CHAR(1)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'namespace_prefix' => [
+ 'name' => 'namespace_prefix',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAMESPACE_PREFIX_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Settings',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
'null_switch' => 'NOT NULL',
'unique_key' => false,
'key' => true,
@@ -895,9 +799,9 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'add_namespace_prefix' => [
- 'name' => 'add_namespace_prefix',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_NAMESPACE_PREFIX_LABEL',
+ 'add_menu_prefix' => [
+ 'name' => 'add_menu_prefix',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_MENU_PREFIX_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
@@ -927,16 +831,16 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'namespace_prefix' => [
- 'name' => 'namespace_prefix',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAMESPACE_PREFIX_LABEL',
+ 'menu_prefix' => [
+ 'name' => 'menu_prefix',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_PREFIX_LABEL',
'type' => 'text',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
'tab_name' => 'Settings',
'db' => [
- 'type' => 'VARCHAR(255)',
+ 'type' => 'VARCHAR(100)',
'default' => '',
'null_switch' => 'NOT NULL',
'unique_key' => false,
@@ -975,22 +879,6 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'add_menu_prefix' => [
- 'name' => 'add_menu_prefix',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_MENU_PREFIX_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Settings',
- 'db' => [
- 'type' => 'CHAR(1)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
'dashboard_type' => [
'name' => 'dashboard_type',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_TYPE_LABEL',
@@ -1007,20 +895,20 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'menu_prefix' => [
- 'name' => 'menu_prefix',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_MENU_PREFIX_LABEL',
+ 'toignore' => [
+ 'name' => 'toignore',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TOIGNORE_LABEL',
'type' => 'text',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
'tab_name' => 'Settings',
'db' => [
- 'type' => 'VARCHAR(100)',
- 'default' => '',
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
'null_switch' => 'NOT NULL',
'unique_key' => false,
- 'key' => true,
+ 'key' => false,
],
],
'dashboard' => [
@@ -1071,70 +959,6 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'toignore' => [
- 'name' => 'toignore',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_TOIGNORE_LABEL',
- 'type' => 'text',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Settings',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'add_php_postflight_install' => [
- 'name' => 'add_php_postflight_install',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_INSTALL_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Dash & Install',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'add_php_postflight_update' => [
- 'name' => 'add_php_postflight_update',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_UPDATE_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Dash & Install',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'add_php_method_uninstall' => [
- 'name' => 'add_php_method_uninstall',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_UNINSTALL_LABEL',
- 'type' => 'radio',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'Dash & Install',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
'export_key' => [
'name' => 'export_key',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_KEY_LABEL',
@@ -1151,9 +975,9 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'add_php_method_install' => [
- 'name' => 'add_php_method_install',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_INSTALL_LABEL',
+ 'add_php_postflight_install' => [
+ 'name' => 'add_php_postflight_install',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_INSTALL_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
@@ -1183,14 +1007,14 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'add_sql' => [
- 'name' => 'add_sql',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL',
+ 'add_php_postflight_update' => [
+ 'name' => 'add_php_postflight_update',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_POSTFLIGHT_UPDATE_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
- 'tab_name' => 'MySQL',
+ 'tab_name' => 'Dash & Install',
'db' => [
'type' => 'TINYINT(1)',
'default' => '0',
@@ -1215,9 +1039,41 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'add_sql_uninstall' => [
- 'name' => 'add_sql_uninstall',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_UNINSTALL_LABEL',
+ 'add_php_method_uninstall' => [
+ 'name' => 'add_php_method_uninstall',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_UNINSTALL_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Dash & Install',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'add_php_method_install' => [
+ 'name' => 'add_php_method_install',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_METHOD_INSTALL_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Dash & Install',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'add_sql' => [
+ 'name' => 'add_sql',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
@@ -1231,38 +1087,6 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'assets_table_fix' => [
- 'name' => 'assets_table_fix',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ASSETS_TABLE_FIX_LABEL',
- 'type' => 'list',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => NULL,
- 'tab_name' => 'MySQL',
- 'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '3',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => true,
- ],
- ],
- 'readme' => [
- 'name' => 'readme',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'joomla_components',
- 'store' => 'base64',
- 'tab_name' => 'Readme',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
'addcontributors' => [
'name' => 'addcontributors',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDCONTRIBUTORS_LABEL',
@@ -1279,14 +1103,14 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'add_update_server' => [
- 'name' => 'add_update_server',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER_LABEL',
+ 'add_sql_uninstall' => [
+ 'name' => 'add_sql_uninstall',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_UNINSTALL_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
- 'tab_name' => 'Dynamic Integration',
+ 'tab_name' => 'MySQL',
'db' => [
'type' => 'TINYINT(1)',
'default' => '0',
@@ -1311,17 +1135,17 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'update_server_target' => [
- 'name' => 'update_server_target',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_LABEL',
- 'type' => 'radio',
+ 'assets_table_fix' => [
+ 'name' => 'assets_table_fix',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ASSETS_TABLE_FIX_LABEL',
+ 'type' => 'list',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
- 'tab_name' => 'Dynamic Integration',
+ 'tab_name' => 'MySQL',
'db' => [
'type' => 'TINYINT(1)',
- 'default' => '0',
+ 'default' => '3',
'null_switch' => 'NOT NULL',
'unique_key' => false,
'key' => true,
@@ -1343,6 +1167,54 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
+ 'readme' => [
+ 'name' => 'readme',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => 'base64',
+ 'tab_name' => 'Readme',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'add_update_server' => [
+ 'name' => 'add_update_server',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Dynamic Integration',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'update_server_target' => [
+ 'name' => 'update_server_target',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_TARGET_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Dynamic Integration',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
'update_server' => [
'name' => 'update_server',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_LABEL',
@@ -1375,6 +1247,22 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
+ 'creatuserhelper' => [
+ 'name' => 'creatuserhelper',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
'add_git_folder_path' => [
'name' => 'add_git_folder_path',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_GIT_FOLDER_PATH_LABEL',
@@ -1391,6 +1279,22 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
+ 'adduikit' => [
+ 'name' => 'adduikit',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL',
+ 'type' => 'list',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
'git_folder_path' => [
'name' => 'git_folder_path',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_GIT_FOLDER_PATH_LABEL',
@@ -1407,6 +1311,22 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
+ 'addfootable' => [
+ 'name' => 'addfootable',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL',
+ 'type' => 'list',
+ 'title' => false,
+ 'list' => 'joomla_components',
+ 'store' => NULL,
+ 'tab_name' => 'Libs & Helpers',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
'jcb_powers_path' => [
'name' => 'jcb_powers_path',
'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JCB_POWERS_PATH_LABEL',
@@ -1423,9 +1343,9 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'creatuserhelper' => [
- 'name' => 'creatuserhelper',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_CREATUSERHELPER_LABEL',
+ 'add_email_helper' => [
+ 'name' => 'add_email_helper',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
@@ -1439,10 +1359,10 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'adduikit' => [
- 'name' => 'adduikit',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDUIKIT_LABEL',
- 'type' => 'list',
+ 'add_php_helper_both' => [
+ 'name' => 'add_php_helper_both',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_BOTH_LABEL',
+ 'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
'store' => NULL,
@@ -1471,20 +1391,20 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'addfootable' => [
- 'name' => 'addfootable',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADDFOOTABLE_LABEL',
- 'type' => 'list',
+ 'php_helper_both' => [
+ 'name' => 'php_helper_both',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_LABEL',
+ 'type' => 'editor',
'title' => false,
'list' => 'joomla_components',
- 'store' => NULL,
+ 'store' => 'base64',
'tab_name' => 'Libs & Helpers',
'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
'null_switch' => 'NOT NULL',
'unique_key' => false,
- 'key' => true,
+ 'key' => false,
],
],
'crowdin_account_api_key' => [
@@ -1503,9 +1423,9 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'add_email_helper' => [
- 'name' => 'add_email_helper',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_EMAIL_HELPER_LABEL',
+ 'add_php_helper_admin' => [
+ 'name' => 'add_php_helper_admin',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_ADMIN_LABEL',
'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
@@ -1535,20 +1455,20 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'add_php_helper_both' => [
- 'name' => 'add_php_helper_both',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_PHP_HELPER_BOTH_LABEL',
- 'type' => 'radio',
+ 'php_helper_admin' => [
+ 'name' => 'php_helper_admin',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL',
+ 'type' => 'editor',
'title' => false,
'list' => 'joomla_components',
- 'store' => NULL,
+ 'store' => 'base64',
'tab_name' => 'Libs & Helpers',
'db' => [
- 'type' => 'TINYINT(1)',
- 'default' => '0',
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
'null_switch' => 'NOT NULL',
'unique_key' => false,
- 'key' => true,
+ 'key' => false,
],
],
'guid' => [
@@ -1567,20 +1487,20 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'php_helper_both' => [
- 'name' => 'php_helper_both',
- 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_LABEL',
- 'type' => 'editor',
+ 'add_admin_event' => [
+ 'name' => 'add_admin_event',
+ 'label' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_ADMIN_EVENT_LABEL',
+ 'type' => 'radio',
'title' => false,
'list' => 'joomla_components',
- 'store' => 'base64',
+ 'store' => NULL,
'tab_name' => 'Libs & Helpers',
'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
'null_switch' => 'NOT NULL',
'unique_key' => false,
- 'key' => false,
+ 'key' => true,
],
],
'modified' => [
@@ -8163,6 +8083,22 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
+ 'on_get_model_field' => [
+ 'name' => 'on_get_model_field',
+ 'label' => 'COM_COMPONENTBUILDER_FIELD_ON_GET_MODEL_FIELD_LABEL',
+ 'type' => 'textarea',
+ 'title' => false,
+ 'list' => 'fields',
+ 'store' => 'base64',
+ 'tab_name' => 'Database',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
'on_save_model_field' => [
'name' => 'on_save_model_field',
'label' => 'COM_COMPONENTBUILDER_FIELD_ON_SAVE_MODEL_FIELD_LABEL',
@@ -8195,22 +8131,6 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'initiator_on_save_model' => [
- 'name' => 'initiator_on_save_model',
- 'label' => 'COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL_LABEL',
- 'type' => 'textarea',
- 'title' => false,
- 'list' => 'fields',
- 'store' => 'base64',
- 'tab_name' => 'Database',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
'xml' => [
'name' => 'xml',
'label' => '',
@@ -8243,6 +8163,22 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
+ 'javascript_view_footer' => [
+ 'name' => 'javascript_view_footer',
+ 'label' => 'COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'fields',
+ 'store' => 'base64',
+ 'tab_name' => 'Scripts',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
'css_views' => [
'name' => 'css_views',
'label' => 'COM_COMPONENTBUILDER_FIELD_CSS_VIEWS_LABEL',
@@ -8323,38 +8259,6 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
- 'on_get_model_field' => [
- 'name' => 'on_get_model_field',
- 'label' => 'COM_COMPONENTBUILDER_FIELD_ON_GET_MODEL_FIELD_LABEL',
- 'type' => 'textarea',
- 'title' => false,
- 'list' => 'fields',
- 'store' => 'base64',
- 'tab_name' => 'Database',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
- 'javascript_view_footer' => [
- 'name' => 'javascript_view_footer',
- 'label' => 'COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'fields',
- 'store' => 'base64',
- 'tab_name' => 'Scripts',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
'javascript_views_footer' => [
'name' => 'javascript_views_footer',
'label' => 'COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL',
@@ -8435,6 +8339,22 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
+ 'initiator_on_save_model' => [
+ 'name' => 'initiator_on_save_model',
+ 'label' => 'COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL_LABEL',
+ 'type' => 'textarea',
+ 'title' => false,
+ 'list' => 'fields',
+ 'store' => 'base64',
+ 'tab_name' => 'Database',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
'guid' => [
'name' => 'guid',
'label' => 'COM_COMPONENTBUILDER_FIELD_GUID_LABEL',
@@ -9074,6 +8994,214 @@ class Table extends BaseTable implements Tableinterface
],
],
],
+ 'repository' => [
+ 'system_name' => [
+ 'name' => 'system_name',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_SYSTEM_NAME_LABEL',
+ 'type' => 'text',
+ 'title' => true,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'organisation' => [
+ 'name' => 'organisation',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_ORGANISATION_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'repository' => [
+ 'name' => 'repository',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_REPOSITORY_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'target' => [
+ 'name' => 'target',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_TARGET_LABEL',
+ 'type' => 'list',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(7)',
+ 'default' => '1',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'type' => [
+ 'name' => 'type',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_TYPE_LABEL',
+ 'type' => 'list',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '1',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'base' => [
+ 'name' => 'base',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_BASE_LABEL',
+ 'type' => 'url',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'guid' => [
+ 'name' => 'guid',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_GUID_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'publishing',
+ 'db' => [
+ 'type' => 'VARCHAR(36)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'access_repo' => [
+ 'name' => 'access_repo',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_LABEL',
+ 'type' => 'radio',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'TINYINT(1)',
+ 'default' => '0',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'write_branch' => [
+ 'name' => 'write_branch',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_WRITE_BRANCH_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'read_branch' => [
+ 'name' => 'read_branch',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_READ_BRANCH_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'token' => [
+ 'name' => 'token',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_TOKEN_LABEL',
+ 'type' => 'password',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'username' => [
+ 'name' => 'username',
+ 'label' => 'COM_COMPONENTBUILDER_REPOSITORY_USERNAME_LABEL',
+ 'type' => 'text',
+ 'title' => false,
+ 'list' => 'repositories',
+ 'store' => NULL,
+ 'tab_name' => 'Details',
+ 'db' => [
+ 'type' => 'VARCHAR(255)',
+ 'default' => '',
+ 'null_switch' => 'NULL',
+ 'unique_key' => false,
+ 'key' => true,
+ ],
+ ],
+ 'access' => [
+ 'name' => 'access',
+ 'label' => 'Access',
+ 'type' => 'accesslevel',
+ 'title' => false,
+ 'store' => NULL,
+ 'tab_name' => NULL,
+ 'db' => [
+ 'type' => 'INT(10) unsigned',
+ 'default' => '0',
+ 'key' => true,
+ 'null_switch' => 'NOT NULL',
+ ],
+ ],
+ ],
'help_document' => [
'title' => [
'name' => 'title',
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/FilterHelper.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/FilterHelper.php
index 86dec4d31..999c38ef5 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/FilterHelper.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/FilterHelper.php
@@ -465,6 +465,42 @@ abstract class FilterHelper
return null;
}
+ /**
+ * get available repositories of target area
+ *
+ * @param int $target The target area
+ *
+ * @return array|null The result ids
+ * @since 3.2.0
+ **/
+ public static function repositories(int $target): ?array
+ {
+ $db = Factory::getDbo();
+ $query = $db->getQuery(true);
+ $query
+ ->select($db->quoteName(array('repository', 'organisation')))
+ ->from($db->quoteName('#__componentbuilder_repository'))
+ ->where($db->quoteName('published') . ' >= 1')
+ ->where($db->quoteName('target') . ' = ' . $target)
+ ->order($db->quoteName('ordering') . ' desc');
+ $db->setQuery($query);
+ $db->execute();
+
+ if ($db->getNumRows())
+ {
+ $items = $db->loadObjectList();
+ $options = [];
+ foreach($items as $item)
+ {
+ $path = $item->organisation . '/' . $item->repository;
+ $options[$path] = $path;
+ }
+ return $options;
+ }
+
+ return null;
+ }
+
/**
* Get a component admin views IDs
*
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/RepoHelper.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/RepoHelper.php
new file mode 100644
index 000000000..52036a9e7
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Utilities/RepoHelper.php
@@ -0,0 +1,78 @@
+
+ * @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\Factory;
+
+
+/**
+ * Repositories Helper
+ *
+ * @since 3.2.2
+ */
+abstract class RepoHelper
+{
+ /**
+ * get available repositories of target area
+ *
+ * @param int $target The target area
+ *
+ * @return array|null The result set
+ * @since 3.2.0
+ **/
+ public static function get(int $target): ?array
+ {
+ $db = Factory::getDbo();
+ $query = $db->getQuery(true);
+ $query->select($db->quoteName(array(
+ 'type',
+ 'base',
+ 'organisation',
+ 'repository',
+ 'read_branch',
+ 'write_branch',
+ 'token',
+ 'username',
+ 'target',
+ 'access_repo',
+ 'guid'
+ )))
+ ->from($db->quoteName('#__componentbuilder_repository'))
+ ->where($db->quoteName('published') . ' >= 1')
+ ->where($db->quoteName('target') . ' = ' . $target)
+ ->order($db->quoteName('ordering') . ' desc');
+ $db->setQuery($query);
+ $db->execute();
+
+ if ($db->getNumRows())
+ {
+ $items = $db->loadObjectList();
+ $options = [];
+ foreach($items as $item)
+ {
+ if ($item->access_repo != 1)
+ {
+ unset($item->username);
+ unset($item->token);
+ }
+ unset($item->access_repo);
+ $path = $item->organisation . '/' . $item->repository;
+ $options[$path] = $item;
+ }
+ return $options;
+ }
+
+ return null;
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Delete.php b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Delete.php
new file mode 100644
index 000000000..71276de6b
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Delete.php
@@ -0,0 +1,112 @@
+
+ * @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\Data\Action;
+
+
+use VDM\Joomla\Interfaces\DeleteInterface as Database;
+use VDM\Joomla\Interfaces\Data\DeleteInterface;
+
+
+/**
+ * Data Delete
+ *
+ * @since 3.2.2
+ */
+class Delete implements DeleteInterface
+{
+ /**
+ * The Delete Class.
+ *
+ * @var Database
+ * @since 3.2.2
+ */
+ protected Database $database;
+
+ /**
+ * Table Name
+ *
+ * @var string
+ * @since 3.2.2
+ */
+ protected string $table;
+
+ /**
+ * Constructor.
+ *
+ * @param Database $database The Delete Class.
+ * @param string|null $table The table name.
+ *
+ * @since 3.2.2
+ */
+ public function __construct(Database $database, ?string $table = null)
+ {
+ $this->database = $database;
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self
+ {
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Delete all items in the database that match these conditions
+ *
+ * @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)]
+ *
+ * @return bool
+ * @since 3.2.2
+ **/
+ public function items(array $conditions): bool
+ {
+ return $this->database->items($conditions, $this->getTable());
+ }
+
+ /**
+ * Truncate a table
+ *
+ * @return void
+ * @since 3.2.2
+ **/
+ public function truncate(): void
+ {
+ $this->database->truncate($this->getTable());
+ }
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string
+ {
+ return $this->table;
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Insert.php b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Insert.php
similarity index 66%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Insert.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Insert.php
index b9013214e..58fd464ee 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Insert.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Insert.php
@@ -9,18 +9,18 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Power\Database;
+namespace VDM\Joomla\Data\Action;
use VDM\Joomla\Interfaces\ModelInterface as Model;
-use VDM\Joomla\Database\Insert as Database;
-use VDM\Joomla\Componentbuilder\Interfaces\Database\InsertInterface;
+use VDM\Joomla\Interfaces\InsertInterface as Database;
+use VDM\Joomla\Interfaces\Data\InsertInterface;
/**
- * Power Database Insert
+ * Data Insert (GUID)
*
- * @since 3.2.0
+ * @since 3.2.2
*/
class Insert implements InsertInterface
{
@@ -46,20 +46,43 @@ class Insert implements InsertInterface
* @var string
* @since 3.2.1
*/
- protected string $table = 'power';
+ protected string $table;
/**
* Constructor
*
* @param Model $model The set model object.
* @param Database $database The insert database object.
+ * @param string|null $table The table name.
*
- * @since 3.2.0
+ * @since 3.2.2
*/
- public function __construct(Model $model, Database $database)
+ public function __construct(Model $model, Database $database, ?string $table = null)
{
$this->model = $model;
$this->database = $database;
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self
+ {
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+
+ return $this;
}
/**
@@ -97,10 +120,10 @@ class Insert implements InsertInterface
public function row(array $item): bool
{
// check if object could be modelled
- if (($item = $this->model->row($item, $this->table)) !== null)
+ if (($item = $this->model->row($item, $this->getTable())) !== null)
{
// Insert the column of this table
- return $this->database->row($item, $this->table);
+ return $this->database->row($item, $this->getTable());
}
return false;
}
@@ -117,10 +140,10 @@ class Insert implements InsertInterface
public function rows(?array $items): bool
{
// check if object could be modelled
- if (($items = $this->model->rows($items, $this->table)) !== null)
+ if (($items = $this->model->rows($items, $this->getTable())) !== null)
{
// Insert the column of this table
- return $this->database->rows($items, $this->table);
+ return $this->database->rows($items, $this->getTable());
}
return false;
}
@@ -137,10 +160,10 @@ class Insert implements InsertInterface
public function item(object $item): bool
{
// check if object could be modelled
- if (($item = $this->model->item($item, $this->table)) !== null)
+ if (($item = $this->model->item($item, $this->getTable())) !== null)
{
// Insert the column of this table
- return $this->database->item($item, $this->table);
+ return $this->database->item($item, $this->getTable());
}
return false;
}
@@ -157,12 +180,23 @@ class Insert implements InsertInterface
public function items(?array $items): bool
{
// check if object could be modelled
- if (($items = $this->model->items($items, $this->table)) !== null)
+ if (($items = $this->model->items($items, $this->getTable())) !== null)
{
// Update the column of this table using guid as the primary key.
- return $this->database->items($items, $this->table);
+ return $this->database->items($items, $this->getTable());
}
return false;
+ }
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string
+ {
+ return $this->table;
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Load.php b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Load.php
similarity index 70%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Load.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Load.php
index 577d8ab38..6b1426c4d 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Load.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Load.php
@@ -9,18 +9,18 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Power\Database;
+namespace VDM\Joomla\Data\Action;
use VDM\Joomla\Interfaces\ModelInterface as Model;
-use VDM\Joomla\Database\Load as Database;
-use VDM\Joomla\Componentbuilder\Power\Database\LoadInterface;
+use VDM\Joomla\Interfaces\LoadInterface as Database;
+use VDM\Joomla\Interfaces\Data\LoadInterface;
/**
- * Power Database Load
+ * Data Load (GUID)
*
- * @since 2.0.1
+ * @since 3.2.2
*/
class Load implements LoadInterface
{
@@ -46,21 +46,43 @@ class Load implements LoadInterface
* @var string
* @since 3.2.1
*/
- protected string $table = 'power';
+ protected string $table;
/**
* Constructor
*
- * @param Table $table The core table object.
* @param Model $model The model object.
* @param Database $load The database object.
+ * @param string|null $table The table name.
*
* @since 2.0.1
*/
- public function __construct(Model $model, Database $load)
+ public function __construct(Model $model, Database $load, ?string $table = null)
{
$this->model = $model;
$this->load = $load;
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self
+ {
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+
+ return $this;
}
/**
@@ -73,7 +95,6 @@ class Load implements LoadInterface
*
* @param array $keys The item keys
* @param string $field The field key
- * @param string $table The table
*
* @return mixed
* @since 2.0.1
@@ -83,11 +104,11 @@ class Load implements LoadInterface
return $this->model->value(
$this->load->value(
["a.{$field}" => $field],
- ['a' => $this->table],
+ ['a' => $this->getTable()],
$this->prefix($keys)
),
$field,
- $this->table
+ $this->getTable()
);
}
@@ -100,7 +121,6 @@ class Load implements LoadInterface
* );
*
* @param array $keys The item keys
- * @param string $table The table
*
* @return object|null
* @since 2.0.1
@@ -110,10 +130,10 @@ class Load implements LoadInterface
return $this->model->item(
$this->load->item(
['all' => 'a.*'],
- ['a' => $this->table],
+ ['a' => $this->getTable()],
$this->prefix($keys)
),
- $this->table
+ $this->getTable()
);
}
@@ -127,10 +147,9 @@ class Load implements LoadInterface
* ]
* ]
* );
- * Example: $this->items($ids, 'table_name');
+ * Example: $this->items($ids);
*
* @param array $keys The item keys
- * @param string $table The table
*
* @return array|null
* @since 2.0.1
@@ -139,12 +158,23 @@ class Load implements LoadInterface
{
return $this->model->items(
$this->load->items(
- ['all' => 'a.*'], ['a' => $this->table], $this->prefix($keys)
+ ['all' => 'a.*'], ['a' => $this->getTable()], $this->prefix($keys)
),
- $this->table
+ $this->getTable()
);
}
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string
+ {
+ return $this->table;
+ }
+
/**
* Add prefix to the keys
*
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Update.php b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Update.php
similarity index 53%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Update.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Update.php
index 759c75ad7..b340558c6 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/Update.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/Update.php
@@ -9,18 +9,18 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Power\Database;
+namespace VDM\Joomla\Data\Action;
use VDM\Joomla\Interfaces\ModelInterface as Model;
-use VDM\Joomla\Database\Update as Database;
-use VDM\Joomla\Componentbuilder\Interfaces\Database\UpdateInterface;
+use VDM\Joomla\Interfaces\UpdateInterface as Database;
+use VDM\Joomla\Interfaces\Data\UpdateInterface;
/**
- * Power Database Update
+ * Data Update
*
- * @since 3.2.0
+ * @since 3.2.2
*/
class Update implements UpdateInterface
{
@@ -46,20 +46,43 @@ class Update implements UpdateInterface
* @var string
* @since 3.2.1
*/
- protected string $table = 'power';
+ protected string $table;
/**
* Constructor
*
* @param Model $model The set model object.
* @param Database $database The update database object.
+ * @param string|null $table The table name.
*
* @since 3.2.0
*/
- public function __construct(Model $model, Database $database)
+ public function __construct(Model $model, Database $database, ?string $table = null)
{
$this->model = $model;
$this->database = $database;
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self
+ {
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+
+ return $this;
}
/**
@@ -81,8 +104,8 @@ class Update implements UpdateInterface
$item[$key] = $keyValue;
$item[$field] = $value;
- // Update the column of this table using guid as the primary key.
- return $this->row($item);
+ // Update the column of this table using $key as the primary key.
+ return $this->row($item, $key);
}
/**
@@ -90,17 +113,18 @@ class Update implements UpdateInterface
* Example: $this->item(Array);
*
* @param array $item The item to save
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function row(array $item): bool
+ public function row(array $item, string $key = 'guid'): bool
{
// check if object could be modelled
- if (($item = $this->model->row($item, $this->table)) !== null)
+ if (($item = $this->model->row($item, $this->getTable())) !== null)
{
- // Update the column of this table using guid as the primary key.
- return $this->database->row($item, 'guid', $this->table);
+ // Update the column of this table using $key as the primary key.
+ return $this->database->row($item, $key, $this->getTable());
}
return false;
}
@@ -110,17 +134,18 @@ class Update implements UpdateInterface
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of arrays)
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function rows(?array $items): bool
+ public function rows(?array $items, string $key = 'guid'): bool
{
// check if object could be modelled
- if (($items = $this->model->rows($items, $this->table)) !== null)
+ if (($items = $this->model->rows($items, $this->getTable())) !== null)
{
- // Update the column of this table using guid as the primary key.
- return $this->database->rows($items, 'guid', $this->table);
+ // Update the column of this table using $key as the primary key.
+ return $this->database->rows($items, $key, $this->getTable());
}
return false;
}
@@ -130,17 +155,18 @@ class Update implements UpdateInterface
* Example: $this->item(Object);
*
* @param object $item The item to save
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function item(object $item): bool
+ public function item(object $item, string $key = 'guid'): bool
{
// check if object could be modelled
- if (($item = $this->model->item($item, $this->table)) !== null)
+ if (($item = $this->model->item($item, $this->getTable())) !== null)
{
- // Update the column of this table using guid as the primary key.
- return $this->database->item($item, 'guid', $this->table);
+ // Update the column of this table using $key as the primary key.
+ return $this->database->item($item, $key, $this->getTable());
}
return false;
}
@@ -150,19 +176,31 @@ class Update implements UpdateInterface
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of objects)
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function items(?array $items): bool
+ public function items(?array $items, string $key = 'guid'): bool
{
// check if object could be modelled
- if (($items = $this->model->items($items, $this->table)) !== null)
+ if (($items = $this->model->items($items, $this->getTable())) !== null)
{
- // Update the column of this table using guid as the primary key.
- return $this->database->items($items, 'guid', $this->table);
+ // Update the column of this table using $key as the primary key.
+ return $this->database->items($items, $key, $this->getTable());
}
return false;
+ }
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string
+ {
+ return $this->table;
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Action/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Data/Item.php b/libraries/vendor_jcb/VDM.Joomla/src/Data/Item.php
new file mode 100644
index 000000000..cae444207
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Item.php
@@ -0,0 +1,254 @@
+
+ * @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\Data;
+
+
+use VDM\Joomla\Interfaces\Data\LoadInterface as Load;
+use VDM\Joomla\Interfaces\Data\InsertInterface as Insert;
+use VDM\Joomla\Interfaces\Data\UpdateInterface as Update;
+use VDM\Joomla\Interfaces\Data\DeleteInterface as Delete;
+use VDM\Joomla\Interfaces\LoadInterface as Database;
+use VDM\Joomla\Interfaces\Data\ItemInterface;
+
+
+/**
+ * Data Item
+ *
+ * @since 3.2.2
+ */
+final class Item implements ItemInterface
+{
+ /**
+ * The Load Class.
+ *
+ * @var Load
+ * @since 3.2.2
+ */
+ protected Load $load;
+
+ /**
+ * The Insert Class.
+ *
+ * @var Insert
+ * @since 3.2.2
+ */
+ protected Insert $insert;
+
+ /**
+ * The Update Class.
+ *
+ * @var Update
+ * @since 3.2.2
+ */
+ protected Update $update;
+
+ /**
+ * The Delete Class.
+ *
+ * @var Delete
+ * @since 3.2.2
+ */
+ protected Delete $delete;
+
+ /**
+ * The Load Class.
+ *
+ * @var Database
+ * @since 3.2.2
+ */
+ protected Database $database;
+
+ /**
+ * Table Name
+ *
+ * @var string
+ * @since 3.2.1
+ */
+ protected string $table;
+
+ /**
+ * Constructor.
+ *
+ * @param Load $load The LoadInterface Class.
+ * @param Insert $insert The InsertInterface Class.
+ * @param Update $update The UpdateInterface Class.
+ * @param Delete $delete The UpdateInterface Class.
+ * @param Database $database The Database Load Class.
+ * @param string|null $table The table name.
+ *
+ * @since 3.2.2
+ */
+ public function __construct(Load $load, Insert $insert, Update $update,
+ Delete $delete, Database $database, ?string $table = null)
+ {
+ $this->load = $load;
+ $this->insert = $insert;
+ $this->update = $update;
+ $this->delete = $delete;
+ $this->database = $database;
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self
+ {
+ $this->table = $table;
+
+ return $this;
+ }
+
+ /**
+ * Get an item
+ *
+ * @param string $value The item key value
+ * @param string $key The item key
+ *
+ * @return object|null The item object or null
+ * @since 3.2.2
+ */
+ public function get(string $value, string $key = 'guid'): ?object
+ {
+ return $this->load->table($this->getTable())->item([$key => $value]);
+ }
+
+ /**
+ * Get the value
+ *
+ * @param string $value The item key value
+ * @param string $key The item key
+ * @param string $get The key of the values we want back
+ *
+ * @return mixed
+ * @since 3.2.2
+ */
+ public function value(string $value, string $key = 'guid', string $get = 'id')
+ {
+ // Perform the database query
+ $value = $this->database->value(
+ ["a.$get" => $get],
+ ["a" => $this->getTable()],
+ ["a.$key" => $value]
+ );
+
+ // Check if rows are found
+ if ($value !== null)
+ {
+ // Return the value
+ return $value;
+ }
+
+ // Return null if no rows are found
+ return null;
+ }
+
+ /**
+ * Set an item
+ *
+ * @param object $item The item
+ * @param string $key The item key
+ * @param string|null $action The action to load power
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function set(object $item, string $key = 'guid', ?string $action = null): bool
+ {
+ if ($action !== null || (isset($item->{$key}) && ($action = $this->action($item->{$key}, $key)) !== null))
+ {
+ return method_exists($this, $action) ? $this->{$action}($item, $key) : false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Delete an item
+ *
+ * @param string $value The item key value
+ * @param string $key The item key
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function delete(string $value, string $key = 'guid'): bool
+ {
+ return $this->delete->table($this->getTable())->items([$key => $value]);
+ }
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string
+ {
+ return $this->table;
+ }
+
+ /**
+ * Insert a item
+ *
+ * @param object $item The item
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ private function insert(object $item): bool
+ {
+ return $this->insert->table($this->getTable())->item($item);
+ }
+
+ /**
+ * Update a item
+ *
+ * @param object $item The item
+ * @param string $key The item key
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ private function update(object $item, string $key): bool
+ {
+ return $this->update->table($this->getTable())->item($item, $key);
+ }
+
+ /**
+ * Get loading action
+ *
+ * @param string $value The key value the item
+ * @param string $key The item key
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ private function action(string $value, string $key): string
+ {
+ if (($id = $this->value($value, $key, 'id')) !== null && $id > 0)
+ {
+ return 'update';
+ }
+
+ return 'insert';
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Data/Items.php b/libraries/vendor_jcb/VDM.Joomla/src/Data/Items.php
new file mode 100644
index 000000000..2e960b265
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Items.php
@@ -0,0 +1,351 @@
+
+ * @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\Data;
+
+
+use VDM\Joomla\Interfaces\Data\LoadInterface as Load;
+use VDM\Joomla\Interfaces\Data\InsertInterface as Insert;
+use VDM\Joomla\Interfaces\Data\UpdateInterface as Update;
+use VDM\Joomla\Interfaces\Data\DeleteInterface as Delete;
+use VDM\Joomla\Interfaces\LoadInterface as Database;
+use VDM\Joomla\Interfaces\Data\ItemsInterface;
+
+
+/**
+ * Data Items
+ *
+ * @since 3.2.2
+ */
+final class Items implements ItemsInterface
+{
+ /**
+ * The LoadInterface Class.
+ *
+ * @var Load
+ * @since 3.2.2
+ */
+ protected Load $load;
+
+ /**
+ * The InsertInterface Class.
+ *
+ * @var Insert
+ * @since 3.2.2
+ */
+ protected Insert $insert;
+
+ /**
+ * The UpdateInterface Class.
+ *
+ * @var Update
+ * @since 3.2.2
+ */
+ protected Update $update;
+
+ /**
+ * The DeleteInterface Class.
+ *
+ * @var Delete
+ * @since 3.2.2
+ */
+ protected Delete $delete;
+
+ /**
+ * The Load Class.
+ *
+ * @var Database
+ * @since 3.2.2
+ */
+ protected Database $database;
+
+ /**
+ * Table Name
+ *
+ * @var string
+ * @since 3.2.1
+ */
+ protected string $table;
+
+ /**
+ * Constructor.
+ *
+ * @param Load $load The LoadInterface Class.
+ * @param Insert $insert The InsertInterface Class.
+ * @param Update $update The UpdateInterface Class.
+ * @param Delete $delete The DeleteInterface Class.
+ * @param Database $database The Database Load Class.
+ * @param string|null $table The table name.
+ *
+ * @since 3.2.2
+ */
+ public function __construct(Load $load, Insert $insert, Update $update, Delete $delete,
+ Database $database, ?string $table = null)
+ {
+ $this->load = $load;
+ $this->insert = $insert;
+ $this->update = $update;
+ $this->delete = $delete;
+ $this->database = $database;
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self
+ {
+ $this->table = $table;
+
+ return $this;
+ }
+
+ /**
+ * Get list of items
+ *
+ * @param array $values The ids of the items
+ * @param string $key The key of the values
+ *
+ * @return array|null The item object or null
+ * @since 3.2.2
+ */
+ public function get(array $values, string $key = 'guid'): ?array
+ {
+ return $this->load->table($this->getTable())->items([
+ $key => [
+ 'operator' => 'IN',
+ 'value' => array_values($values)
+ ]
+ ]);
+ }
+
+ /**
+ * Get the values
+ *
+ * @param array $values The list of values (to search by).
+ * @param string $key The key on which the values being searched.
+ * @param string $get The key of the values we want back
+ *
+ * @return array|null The array of found values.
+ * @since 3.2.2
+ */
+ public function values(array $values, string $key = 'guid', string $get = 'id'): ?array
+ {
+ // Perform the database query
+ $rows = $this->database->rows(
+ ["a.$get" => $get],
+ ["a" => $this->getTable()],
+ ["a.$key" => ['operator' => 'IN', 'value' => $values]]
+ );
+
+ // Check if rows are found
+ if ($rows !== null)
+ {
+ // Return the values from the found rows
+ return array_values(
+ array_map(
+ fn($row) => $row[$get],
+ $rows
+ )
+ );
+ }
+
+ // Return null if no rows are found
+ return null;
+ }
+
+ /**
+ * Set items
+ *
+ * @param array $items The list of items
+ * @param string $key The key on which the items should be set
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function set(array $items, string $key = 'guid'): bool
+ {
+ if (($sets = $this->sort($items, $key)) !== null)
+ {
+ foreach ($sets as $action => $items)
+ {
+ $this->{$action}($items, $key);
+ }
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Delete items
+ *
+ * @param array $values The item key value
+ * @param string $key The item key
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function delete(string $values, string $key = 'guid'): bool
+ {
+ return $this->delete->table($this->getTable())->items([$key => ['operator' => 'IN', 'value' => $values]]);
+ }
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string
+ {
+ return $this->table;
+ }
+
+ /**
+ * Insert a item
+ *
+ * @param array $items The item
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ private function insert(array $items): bool
+ {
+ return $this->insert->table($this->getTable())->rows($items);
+ }
+
+ /**
+ * Update a item
+ *
+ * @param object $item The item
+ * @param string $key The item key
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ private function update(array $items, string $key): bool
+ {
+ return $this->update->table($this->getTable())->rows($items, $key);
+ }
+
+ /**
+ * Sort items between insert and update.
+ *
+ * @param array $items The list of items.
+ * @param string $key The key on which the items should be sorted.
+ *
+ * @return array|null The sorted sets.
+ * @since 3.2.2
+ */
+ private function sort(array $items, string $key): ?array
+ {
+ // Extract relevant items based on the key.
+ $values = $this->extractValues($items, $key);
+ if ($values === null)
+ {
+ return null;
+ }
+
+ $sets = [
+ 'insert' => [],
+ 'update' => []
+ ];
+
+ // Check for existing items.
+ $existingItems = $this->values($values, $key, $key);
+ if ($existingItems !== null)
+ {
+ $sets['update'] = $this->extractSet($items, $existingItems, $key) ?? [];
+ $sets['insert'] = $this->extractSet($items, $existingItems, $key, true) ?? [];
+ }
+ else
+ {
+ $sets['insert'] = $items;
+ }
+
+ // If either set is empty, remove it from the result.
+ $sets = array_filter($sets);
+
+ return !empty($sets) ? $sets : null;
+ }
+
+ /**
+ * Extracts values for a given key from an array of items.
+ * Items can be either arrays or objects.
+ *
+ * @param array $items Array of items (arrays or objects)
+ * @param string $key The key to extract values for
+ *
+ * @return array|null Extracted values
+ * @since 3.2.2
+ */
+ private function extractValues(array $items, string $key): ?array
+ {
+ $result = [];
+
+ foreach ($items as $item)
+ {
+ if (is_array($item) && !empty($item[$key]))
+ {
+ $result[] = $item[$key];
+ }
+ elseif (is_object($item) && !empty($item->{$key}))
+ {
+ $result[] = $item->{$key};
+ }
+ }
+
+ return ($result === []) ? null : $result;
+ }
+
+ /**
+ * Extracts items from an array of items based on a set.
+ * Items can be either arrays or objects.
+ *
+ * @param array $items Array of items (arrays or objects)
+ * @param array $set The set to match values against
+ * @param string $key The key of the set values
+ * @param bool $inverse Whether to extract items not in the set
+ *
+ * @return array|null Extracted values
+ * @since 3.2.2
+ */
+ private function extractSet(array $items, array $set, string $key, bool $inverse = false): ?array
+ {
+ $result = [];
+
+ foreach ($items as $item)
+ {
+ $value = is_array($item) ? ($item[$key] ?? null) : ($item->{$key} ?? null);
+
+ if ($value !== null)
+ {
+ $inSet = in_array($value, $set);
+ if (($inSet && !$inverse) || (!$inSet && $inverse))
+ {
+ $result[] = is_array($item) ? $item : (array) $item; // convert all to arrays
+ }
+ }
+ }
+
+ return empty($result) ? null : $result;
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Data/Remote.php b/libraries/vendor_jcb/VDM.Joomla/src/Data/Remote.php
new file mode 100644
index 000000000..70e987af8
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Data/Remote.php
@@ -0,0 +1,169 @@
+
+ * @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\Data;
+
+
+use VDM\Joomla\Interfaces\GrepInterface as Grep;
+use VDM\Joomla\Interfaces\Data\ItemInterface as Item;
+use VDM\Joomla\Interfaces\Data\RemoteInterface;
+
+
+/**
+ * Load data based on global unique ids from remote system
+ *
+ * @since 3.2.0
+ */
+class Remote implements RemoteInterface
+{
+ /**
+ * The Grep Class.
+ *
+ * @var Grep
+ * @since 3.2.0
+ */
+ protected Grep $grep;
+
+ /**
+ * The Item Class.
+ *
+ * @var Item
+ * @since 3.2.0
+ */
+ protected Item $item;
+
+ /**
+ * Table Name
+ *
+ * @var string
+ * @since 3.2.1
+ */
+ protected string $table;
+
+ /**
+ * Constructor.
+ *
+ * @param Grep $grep The GrepInterface Class.
+ * @param Item $item The ItemInterface Class.
+ * @param string|null $table The table name.
+ *
+ * @since 3.2.0
+ */
+ public function __construct(Grep $grep, Item $item, ?string $table = null)
+ {
+ $this->grep = $grep;
+ $this->item = $item;
+ if ($table !== null)
+ {
+ $this->table = $table;
+ }
+ }
+
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self
+ {
+ $this->table = $table;
+
+ return $this;
+ }
+
+ /**
+ * Init all items not found in database
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ public function init(): bool
+ {
+ if (($items = $this->grep->getRemotePowersGuid()) !== null)
+ {
+ foreach($items as $guid)
+ {
+ if ($this->item->table($this->getTable())->value($guid) !== null &&
+ ($item = $this->grep->get($guid, ['remote'])) !== null)
+ {
+ $this->item->set($item);
+ }
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Reset the items
+ *
+ * @param array $items The global unique ids of the items
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ public function reset(array $items): bool
+ {
+ if ($items === [])
+ {
+ return false;
+ }
+
+ $success = true;
+
+ foreach($items as $guid)
+ {
+ if (!$this->load($guid, ['remote']))
+ {
+ $success = false;
+ }
+ }
+
+ return $success;
+ }
+
+ /**
+ * Load a item
+ *
+ * @param string $guid The global unique id of the item
+ * @param array $order The search order
+ * @param string|null $action The action to load power
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ public function load(string $guid, array $order = ['remote', 'local'], ?string $action = null): bool
+ {
+ if (($item = $this->grep->get($guid, $order)) !== null)
+ {
+ return $this->item->table($this->getTable())->set($item);
+ }
+
+ return false;
+ }
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string
+ {
+ return $this->table;
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Database/Delete.php b/libraries/vendor_jcb/VDM.Joomla/src/Database/Delete.php
new file mode 100644
index 000000000..34dee96f6
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Database/Delete.php
@@ -0,0 +1,132 @@
+
+ * @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\Database;
+
+
+use VDM\Joomla\Utilities\ArrayHelper;
+use VDM\Joomla\Interfaces\DeleteInterface;
+use VDM\Joomla\Abstraction\Database;
+
+
+/**
+ * Database Delete Class
+ *
+ * @since 3.2.0
+ */
+final class Delete extends Database implements DeleteInterface
+{
+ /**
+ * Delete all items in the database that match these conditions
+ *
+ * @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)]
+ * @param string $table The table where the data is being deleted
+ *
+ * @return bool
+ * @since 3.2.2
+ **/
+ public function items(array $conditions, string $table): bool
+ {
+ // set the update columns
+ if ($conditions === [])
+ {
+ return false;
+ }
+
+ // get a query object
+ $query = $this->db->getQuery(true);
+
+ // start the conditions bucket
+ $_conditions = [];
+ foreach ($conditions as $key => $value)
+ {
+ if (ArrayHelper::check($value))
+ {
+ if (isset($value['value']) && isset($value['operator']))
+ {
+ // check if value needs to be quoted
+ $quote = $value['quote'] ?? true;
+ if (!$quote)
+ {
+ if (ArrayHelper::check($value['value']))
+ {
+ // add the where by array
+ $_conditions[] = $this->db->quoteName($key)
+ . ' ' . $value['operator']
+ . ' ' . ' (' .
+ implode(',', $value['value'])
+ . ')';
+ }
+ else
+ {
+ // add the conditions
+ $_conditions[] = $this->db->quoteName($key)
+ . ' ' . $value['operator']
+ . ' ' . $value['value'];
+ }
+ }
+ else
+ {
+ if (ArrayHelper::check($value['value']))
+ {
+ // add the where by array
+ $_conditions[] = $this->db->quoteName($key)
+ . ' ' . $value['operator']
+ . ' ' . ' (' .
+ implode(',', array_map(fn($val) => $this->quote($val), $value['value']))
+ . ')';
+ }
+ else
+ {
+ // add the conditions
+ $_conditions[] = $this->db->quoteName($key)
+ . ' ' . $value['operator']
+ . ' ' . $this->quote($value['value']);
+ }
+ }
+ }
+ else
+ {
+ // we should through an exception
+ // for security we just return false for now
+ return false;
+ }
+ }
+ else
+ {
+ // add default condition
+ $_conditions[] = $this->db->quoteName($key) . ' = ' . $this->quote($value);
+ }
+ }
+
+ // set the query targets
+ $query->delete($this->db->quoteName($this->getTable($table)));
+ $query->where($_conditions);
+
+ $this->db->setQuery($query);
+
+ return $this->db->execute();
+ }
+
+ /**
+ * Truncate a table
+ *
+ * @param string $table The table that should be truncated
+ *
+ * @return void
+ * @since 3.2.2
+ **/
+ public function truncate(string $table): void
+ {
+ $this->db->truncateTable($this->getTable($table));
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Database/Load.php b/libraries/vendor_jcb/VDM.Joomla/src/Database/Load.php
index 620f99c7f..ab7b5ff80 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Database/Load.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Database/Load.php
@@ -40,15 +40,7 @@ final class Load extends Database implements LoadInterface
?array $order = null, ?int $limit = null): ?array
{
// set key if found
- $key = '';
- if (isset($select['key']))
- {
- if (is_string($select['key']))
- {
- $key = $select['key'];
- }
- unset($select['key']);
- }
+ $key = $this->getKey($select);
// check if we can get many rows
if ($this->many($select, $tables, $where, $order, $limit))
@@ -77,15 +69,7 @@ final class Load extends Database implements LoadInterface
?array $order = null, ?int $limit = null): ?array
{
// set key if found
- $key = '';
- if (isset($select['key']))
- {
- if (is_string($select['key']))
- {
- $key = $select['key'];
- }
- unset($select['key']);
- }
+ $key = $this->getKey($select);
// check if we can get many rows
if ($this->many($select, $tables, $where, $order, $limit))
@@ -464,6 +448,30 @@ final class Load extends Database implements LoadInterface
return $query;
}
-
+
+ /**
+ * Get the key from the selection array.
+ *
+ * This function retrieves a key from the provided selection array.
+ * The key is removed from the array after being retrieved.
+ *
+ * @param array $select Array of selection keys.
+ *
+ * @return string|null The key, or null if no key is found.
+ * @since 3.2.2
+ **/
+ protected function getKey(array &$select): ?string
+ {
+ $key = null;
+
+ // Check for 'key' first and ensure it's a string.
+ if (isset($select['key']) && is_string($select['key']))
+ {
+ $key = $select['key'];
+ unset($select['key']); // Remove 'key' from the array.
+ }
+
+ return $key;
+ }
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/DeleteInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/DeleteInterface.php
new file mode 100644
index 000000000..46cc708d8
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/DeleteInterface.php
@@ -0,0 +1,60 @@
+
+ * @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\Interfaces\Data;
+
+
+/**
+ * Data Delete
+ *
+ * @since 3.2.2
+ */
+interface DeleteInterface
+{
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self;
+
+ /**
+ * Delete all items in the database that match these conditions
+ *
+ * @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)]
+ *
+ * @return bool
+ * @since 3.2.2
+ **/
+ public function items(array $conditions): bool;
+
+ /**
+ * Truncate a table
+ *
+ * @param string|null $table The table that should be truncated
+ *
+ * @return void
+ * @since 3.2.2
+ **/
+ public function truncate(): void;
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string;
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/InsertInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/InsertInterface.php
similarity index 80%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/InsertInterface.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/InsertInterface.php
index 57a83d197..3a68e00ed 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/InsertInterface.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/InsertInterface.php
@@ -9,16 +9,26 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Interfaces\Database;
+namespace VDM\Joomla\Interfaces\Data;
/**
- * Database Insert
+ * Data Insert
*
- * @since 3.2.1
+ * @since 3.2.2
*/
interface InsertInterface
{
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self;
+
/**
* Insert a value to a given table
* Example: $this->value(Value, 'value_key', 'GUID');
@@ -76,6 +86,13 @@ interface InsertInterface
* @since 3.2.0
*/
public function items(?array $items): bool;
-
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string;
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/ItemInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/ItemInterface.php
new file mode 100644
index 000000000..c7c274dcc
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/ItemInterface.php
@@ -0,0 +1,86 @@
+
+ * @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\Interfaces\Data;
+
+
+/**
+ * Data Item Interface
+ *
+ * @since 3.2.2
+ */
+interface ItemInterface
+{
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self;
+
+ /**
+ * Get an item
+ *
+ * @param string $value The item key value
+ * @param string $key The item key
+ *
+ * @return object|null The item object or null
+ * @since 3.2.2
+ */
+ public function get(string $value, string $key = 'guid'): ?object;
+
+ /**
+ * Get the value
+ *
+ * @param string $value The item key value
+ * @param string $key The item key
+ * @param string $get The key of the values we want back
+ *
+ * @return mixed
+ * @since 3.2.2
+ */
+ public function value(string $value, string $key = 'guid', string $get = 'id');
+
+ /**
+ * Set an item
+ *
+ * @param object $item The item
+ * @param string $key The item key
+ * @param string|null $action The action to load power
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function set(object $item, string $key = 'guid', ?string $action = null): bool;
+
+ /**
+ * Delete an item
+ *
+ * @param string $value The item key value
+ * @param string $key The item key
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function delete(string $value, string $key = 'guid'): bool;
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string;
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/ItemsInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/ItemsInterface.php
new file mode 100644
index 000000000..62e2f0880
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/ItemsInterface.php
@@ -0,0 +1,85 @@
+
+ * @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\Interfaces\Data;
+
+
+/**
+ * Data Items Interface
+ *
+ * @since 3.2.2
+ */
+interface ItemsInterface
+{
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self;
+
+ /**
+ * Get list of items
+ *
+ * @param array $values The ids of the items
+ * @param string $key The key of the values
+ *
+ * @return array|null The item object or null
+ * @since 3.2.2
+ */
+ public function get(array $values, string $key = 'guid'): ?array;
+
+ /**
+ * Get the values
+ *
+ * @param array $values The list of values (to search by).
+ * @param string $key The key on which the values being searched.
+ * @param string $get The key of the values we want back
+ *
+ * @return array|null The array of found values.
+ * @since 3.2.2
+ */
+ public function values(array $values, string $key = 'guid', string $get = 'id'): ?array;
+
+ /**
+ * Set items
+ *
+ * @param array $items The list of items
+ * @param string $key The key on which the items should be set
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function set(array $items, string $key = 'guid'): bool;
+
+ /**
+ * Delete items
+ *
+ * @param array $values The item key value
+ * @param string $key The item key
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function delete(string $values, string $key = 'guid'): bool;
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string;
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/LoadInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/LoadInterface.php
similarity index 78%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/LoadInterface.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/LoadInterface.php
index 60d166f52..f43616fbf 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Database/LoadInterface.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/LoadInterface.php
@@ -9,16 +9,26 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Power\Database;
+namespace VDM\Joomla\Interfaces\Data;
/**
- * Power Database Load
+ * Data Load Interface
*
- * @since 2.0.1
+ * @since 3.2.2
*/
interface LoadInterface
{
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self;
+
/**
* Get a value from a given table
* Example: $this->value(
@@ -29,7 +39,6 @@ interface LoadInterface
*
* @param array $keys The item keys
* @param string $field The field key
- * @param string $table The table
*
* @return mixed
* @since 2.0.1
@@ -45,7 +54,6 @@ interface LoadInterface
* );
*
* @param array $keys The item keys
- * @param string $table The table
*
* @return object|null
* @since 2.0.1
@@ -62,14 +70,21 @@ interface LoadInterface
* ]
* ]
* );
- * Example: $this->items($ids, 'table_name');
+ * Example: $this->items($keys);
*
* @param array $keys The item keys
- * @param string $table The table
*
* @return array|null
* @since 2.0.1
*/
- public function items(array $keys): ?array;
+ public function items(array $keys): ?array;
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string;
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/RemoteInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/RemoteInterface.php
new file mode 100644
index 000000000..ab4fea56b
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/RemoteInterface.php
@@ -0,0 +1,69 @@
+
+ * @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\Interfaces\Data;
+
+
+/**
+ * Load data based on global unique ids from remote system
+ *
+ * @since 3.2.2
+ */
+interface RemoteInterface
+{
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self;
+
+ /**
+ * Init all items not found in database
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ public function init(): bool;
+
+ /**
+ * Reset the items
+ *
+ * @param array $items The global unique ids of the items
+ *
+ * @return bool
+ * @since 3.2.0
+ */
+ public function reset(array $items): bool;
+
+ /**
+ * Load a item
+ *
+ * @param string $guid The global unique id of the item
+ * @param array $order The search order
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ public function load(string $guid, array $order = ['remote', 'local']): bool;
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string;
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/UpdateInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/UpdateInterface.php
similarity index 65%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/UpdateInterface.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/UpdateInterface.php
index 45658ee2f..02b91e616 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/Database/UpdateInterface.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/UpdateInterface.php
@@ -9,16 +9,26 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Interfaces\Database;
+namespace VDM\Joomla\Interfaces\Data;
/**
- * Database Update
+ * Data Update
*
- * @since 3.2.1
+ * @since 3.2.2
*/
interface UpdateInterface
{
+ /**
+ * Set the current active table
+ *
+ * @param string|null $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(?string $table): self;
+
/**
* Update a value to a given table
* Example: $this->value(Value, 'value_key', 'GUID');
@@ -38,43 +48,55 @@ interface UpdateInterface
* Example: $this->item(Array);
*
* @param array $item The item to save
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function row(array $item): bool;
+ public function row(array $item, string $key = 'guid'): bool;
/**
* Update multiple rows to a given table
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of arrays)
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function rows(?array $items): bool;
+ public function rows(?array $items, string $key = 'guid'): bool;
/**
* Update single item with multiple values to a given table
* Example: $this->item(Object);
*
* @param object $item The item to save
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function item(object $item): bool;
+ public function item(object $item, string $key = 'guid'): bool;
/**
* Update multiple items to a given table
* Example: $this->items(Array);
*
* @param array|null $items The items updated in database (array of objects)
+ * @param string $key The key name
*
* @return bool
* @since 3.2.0
*/
- public function items(?array $items): bool;
+ public function items(?array $items, string $key = 'guid'): bool;
+
+ /**
+ * Get the current active table
+ *
+ * @return string
+ * @since 3.2.2
+ */
+ public function getTable(): string;
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Data/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/DeleteInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/DeleteInterface.php
new file mode 100644
index 000000000..355015618
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/DeleteInterface.php
@@ -0,0 +1,43 @@
+
+ * @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\Interfaces;
+
+
+/**
+ * Database Delete Interface
+ *
+ * @since 3.2.0
+ */
+interface DeleteInterface
+{
+ /**
+ * Delete all rows in the database that match these conditions
+ *
+ * @param array $conditions Conditions by which to delete the data in database [array of arrays (key => value)]
+ * @param string $table The table where the data is being deleted
+ *
+ * @return bool
+ * @since 3.2.0
+ **/
+ public function items(array $conditions, string $table): bool;
+
+ /**
+ * Truncate a table
+ *
+ * @param string $table The table that should be truncated
+ *
+ * @return void
+ * @since 3.2.2
+ **/
+ public function truncate(string $table): void;
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/ModelInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/ModelInterface.php
index 51f342455..c93e80a04 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/ModelInterface.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/ModelInterface.php
@@ -19,6 +19,16 @@ namespace VDM\Joomla\Interfaces;
*/
interface ModelInterface
{
+ /**
+ * Set the current active table
+ *
+ * @param string $table The table that should be active
+ *
+ * @return self
+ * @since 3.2.2
+ */
+ public function table(string $table): self;
+
/**
* Model the value
* Example: $this->value(value, 'value_key', 'table_name');
@@ -36,13 +46,13 @@ interface ModelInterface
* Model the values of an item
* Example: $this->item(Object, 'table_name');
*
- * @param object $item The item object
+ * @param object|null $item The item object
* @param string|null $table The table
*
* @return object|null
* @since 3.2.0
*/
- public function item(object $item, ?string $table = null): ?object;
+ public function item(?object $item, ?string $table = null): ?object;
/**
* Model the values of multiple items
@@ -60,13 +70,13 @@ interface ModelInterface
* Model the values of an row
* Example: $this->item(Array, 'table_name');
*
- * @param array $item The item array
+ * @param array|null $item The item array
* @param string|null $table The table
*
* @return array|null
* @since 3.2.0
*/
- public function row(array $item, ?string $table = null): ?array;
+ public function row(?array $item, ?string $table = null): ?array;
/**
* Model the values of multiple rows
@@ -89,6 +99,26 @@ interface ModelInterface
* @return int|null
* @since 3.2.0
*/
- public function last(?string $table = null): ?int;
+ public function last(?string $table = null): ?int;
+
+ /**
+ * Set the current active table
+ *
+ * @param string $tableName The table name
+ *
+ * @return void
+ * @since 3.2.2
+ */
+ public function setTable(string $tableName): void;
+
+ /**
+ * Set the switch to control the behaviour of empty values
+ *
+ * @param bool $allowEmpty The switch
+ *
+ * @return void
+ * @since 3.2.2
+ */
+ public function setAllowEmpty(bool $allowEmpty): void;
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/Load.php b/libraries/vendor_jcb/VDM.Joomla/src/Model/Load.php
similarity index 84%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/Load.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Model/Load.php
index 6254608a2..83002ce50 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/Load.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Model/Load.php
@@ -9,22 +9,22 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Power\Model;
+namespace VDM\Joomla\Model;
-use VDM\Joomla\Abstraction\Model as AbstractionModel;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Interfaces\ModelInterface;
+use VDM\Joomla\Abstraction\Model;
/**
* Power Model Load
*
- * @since 3.2.0
+ * @since 3.2.2
*/
-class Load extends AbstractionModel implements ModelInterface
+final class Load extends Model implements ModelInterface
{
/**
* Model the value
@@ -80,6 +80,11 @@ class Load extends AbstractionModel implements ModelInterface
{
return true;
}
+ // check if we allow empty
+ elseif ($this->getAllowEmpty() && empty($value))
+ {
+ return true;
+ }
// remove empty values
return false;
}
@@ -101,19 +106,13 @@ class Load extends AbstractionModel implements ModelInterface
{
return true;
}
+ // check if we allow empty
+ elseif ($this->getAllowEmpty() && empty($value))
+ {
+ return true;
+ }
// remove empty values
return false;
- }
-
- /**
- * Get the current active table
- *
- * @return string
- * @since 3.2.0
- */
- protected function getTable(): string
- {
- return 'power';
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/Upsert.php b/libraries/vendor_jcb/VDM.Joomla/src/Model/Upsert.php
similarity index 86%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/Upsert.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Model/Upsert.php
index 00eda6b55..b9111e7df 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Model/Upsert.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Model/Upsert.php
@@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Power\Model;
+namespace VDM\Joomla\Model;
use VDM\Joomla\Utilities\StringHelper;
@@ -24,7 +24,7 @@ use VDM\Joomla\Abstraction\Model;
*
* @since 3.2.0
*/
-class Upsert extends Model implements ModelInterface
+final class Upsert extends Model implements ModelInterface
{
/**
* Model the value
@@ -80,6 +80,11 @@ class Upsert extends Model implements ModelInterface
{
return true;
}
+ // check if we allow empty
+ elseif ($this->getAllowEmpty() && empty($value))
+ {
+ return true;
+ }
// remove empty values
return false;
}
@@ -101,20 +106,13 @@ class Upsert extends Model implements ModelInterface
{
return true;
}
+ // check if we allow empty
+ elseif ($this->getAllowEmpty() && empty($value))
+ {
+ return true;
+ }
// remove empty values
return false;
- }
-
- /**
- * Get the current active table
- *
- * @return string
- * @since 3.2.0
- */
- protected function getTable(): string
- {
- return 'power';
- }
-
+ }
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Model/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Model/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Model/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Service/Data.php b/libraries/vendor_jcb/VDM.Joomla/src/Service/Data.php
new file mode 100644
index 000000000..d05319a77
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Service/Data.php
@@ -0,0 +1,162 @@
+
+ * @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\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Data\Action\Load;
+use VDM\Joomla\Data\Action\Insert;
+use VDM\Joomla\Data\Action\Update;
+use VDM\Joomla\Data\Action\Delete;
+use VDM\Joomla\Data\Item;
+use VDM\Joomla\Data\Items;
+
+
+/**
+ * Data Service Provider
+ *
+ * @since 3.2.0
+ */
+class Data implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(Load::class, 'Data.Load')
+ ->share('Data.Load', [$this, 'getLoad'], true);
+
+ $container->alias(Insert::class, 'Data.Insert')
+ ->share('Data.Insert', [$this, 'getInsert'], true);
+
+ $container->alias(Update::class, 'Data.Update')
+ ->share('Data.Update', [$this, 'getUpdate'], true);
+
+ $container->alias(Delete::class, 'Data.Delete')
+ ->share('Data.Delete', [$this, 'getDelete'], true);
+
+ $container->alias(Item::class, 'Data.Item')
+ ->share('Data.Item', [$this, 'getItem'], true);
+
+ $container->alias(Items::class, 'Data.Items')
+ ->share('Data.Items', [$this, 'getItems'], true);
+ }
+
+ /**
+ * Get The Load Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Load
+ * @since 3.2.0
+ */
+ public function getLoad(Container $container): Load
+ {
+ return new Load(
+ $container->get('Model.Load'),
+ $container->get('Load')
+ );
+ }
+
+ /**
+ * Get The Insert Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Insert
+ * @since 3.2.0
+ */
+ public function getInsert(Container $container): Insert
+ {
+ return new Insert(
+ $container->get('Model.Upsert'),
+ $container->get('Insert')
+ );
+ }
+
+ /**
+ * Get The Update Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Update
+ * @since 3.2.0
+ */
+ public function getUpdate(Container $container): Update
+ {
+ return new Update(
+ $container->get('Model.Upsert'),
+ $container->get('Update')
+ );
+ }
+
+ /**
+ * Get The Delete Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Delete
+ * @since 3.2.0
+ */
+ public function getDelete(Container $container): Delete
+ {
+ return new Delete(
+ $container->get('Delete')
+ );
+ }
+
+ /**
+ * Get The Item Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Item
+ * @since 3.2.0
+ */
+ public function getItem(Container $container): Item
+ {
+ return new Item(
+ $container->get('Data.Load'),
+ $container->get('Data.Insert'),
+ $container->get('Data.Update'),
+ $container->get('Data.Delete'),
+ $container->get('Load')
+ );
+ }
+
+ /**
+ * Get The Items Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Items
+ * @since 3.2.0
+ */
+ public function getItems(Container $container): Items
+ {
+ return new Items(
+ $container->get('Data.Load'),
+ $container->get('Data.Insert'),
+ $container->get('Data.Update'),
+ $container->get('Data.Delete'),
+ $container->get('Load')
+ );
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Database.php b/libraries/vendor_jcb/VDM.Joomla/src/Service/Database.php
similarity index 79%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Database.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Service/Database.php
index c5a417bf5..fe04c44f5 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Service/Database.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Service/Database.php
@@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Service;
+namespace VDM\Joomla\Service;
use Joomla\DI\Container;
@@ -17,6 +17,7 @@ use Joomla\DI\ServiceProviderInterface;
use VDM\Joomla\Database\Load;
use VDM\Joomla\Database\Insert;
use VDM\Joomla\Database\Update;
+use VDM\Joomla\Database\Delete;
/**
@@ -44,6 +45,9 @@ class Database implements ServiceProviderInterface
$container->alias(Update::class, 'Update')
->share('Update', [$this, 'getUpdate'], true);
+
+ $container->alias(Delete::class, 'Delete')
+ ->share('Delete', [$this, 'getDelete'], true);
}
/**
@@ -83,6 +87,19 @@ class Database implements ServiceProviderInterface
public function getUpdate(Container $container): Update
{
return new Update();
+ }
+
+ /**
+ * Get the Core Delete Database
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Delete
+ * @since 3.2.2
+ */
+ public function getDelete(Container $container): Delete
+ {
+ return new Delete();
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Service/Model.php b/libraries/vendor_jcb/VDM.Joomla/src/Service/Model.php
new file mode 100644
index 000000000..800e48992
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Service/Model.php
@@ -0,0 +1,75 @@
+
+ * @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\Service;
+
+
+use Joomla\DI\Container;
+use Joomla\DI\ServiceProviderInterface;
+use VDM\Joomla\Model\Load;
+use VDM\Joomla\Model\Upsert;
+
+
+/**
+ * Model Service Provider
+ *
+ * @since 3.2.0
+ */
+class Model implements ServiceProviderInterface
+{
+ /**
+ * Registers the service provider with a DI container.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ public function register(Container $container)
+ {
+ $container->alias(Load::class, 'Model.Load')
+ ->share('Model.Load', [$this, 'getLoad'], true);
+
+ $container->alias(Upsert::class, 'Model.Upsert')
+ ->share('Model.Upsert', [$this, 'getUpsert'], true);
+ }
+
+ /**
+ * Get The Load Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Load
+ * @since 3.2.0
+ */
+ public function getLoad(Container $container): Load
+ {
+ return new Load(
+ $container->get('Table')
+ );
+ }
+
+ /**
+ * Get The Upsert Class.
+ *
+ * @param Container $container The DI container.
+ *
+ * @return Upsert
+ * @since 3.2.0
+ */
+ public function getUpsert(Container $container): Upsert
+ {
+ return new Upsert(
+ $container->get('Table')
+ );
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Service/index.html b/libraries/vendor_jcb/VDM.Joomla/src/Service/index.html
new file mode 100644
index 000000000..fa6d84e80
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Service/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/media/js/field.js b/media/js/field.js
index 11d3d5e76..4d7956427 100644
--- a/media/js/field.js
+++ b/media/js/field.js
@@ -31,10 +31,6 @@ document.addEventListener('DOMContentLoaded', function()
var datatype_vvvvwbi = jQuery("#jform_datatype").val();
vvvvwbi(datatype_vvvvwbi);
- var store_vvvvwbj = jQuery("#jform_store").val();
- var datatype_vvvvwbj = jQuery("#jform_datatype").val();
- vvvvwbj(store_vvvvwbj,datatype_vvvvwbj);
-
var store_vvvvwbl = jQuery("#jform_store").val();
vvvvwbl(store_vvvvwbl);
@@ -277,67 +273,6 @@ function datatype_vvvvwbi_SomeFunc(datatype_vvvvwbi)
return false;
}
-// the vvvvwbj function
-function vvvvwbj(store_vvvvwbj,datatype_vvvvwbj)
-{
- if (isSet(store_vvvvwbj) && store_vvvvwbj.constructor !== Array)
- {
- var temp_vvvvwbj = store_vvvvwbj;
- var store_vvvvwbj = [];
- store_vvvvwbj.push(temp_vvvvwbj);
- }
- else if (!isSet(store_vvvvwbj))
- {
- var store_vvvvwbj = [];
- }
- var store = store_vvvvwbj.some(store_vvvvwbj_SomeFunc);
-
- if (isSet(datatype_vvvvwbj) && datatype_vvvvwbj.constructor !== Array)
- {
- var temp_vvvvwbj = datatype_vvvvwbj;
- var datatype_vvvvwbj = [];
- datatype_vvvvwbj.push(temp_vvvvwbj);
- }
- else if (!isSet(datatype_vvvvwbj))
- {
- var datatype_vvvvwbj = [];
- }
- var datatype = datatype_vvvvwbj.some(datatype_vvvvwbj_SomeFunc);
-
-
- // set this function logic
- if (store && datatype)
- {
- jQuery('.note_whmcs_encryption').closest('.control-group').show();
- }
- else
- {
- jQuery('.note_whmcs_encryption').closest('.control-group').hide();
- }
-}
-
-// the vvvvwbj Some function
-function store_vvvvwbj_SomeFunc(store_vvvvwbj)
-{
- // set the function logic
- if (store_vvvvwbj == 4)
- {
- return true;
- }
- return false;
-}
-
-// the vvvvwbj Some function
-function datatype_vvvvwbj_SomeFunc(datatype_vvvvwbj)
-{
- // set the function logic
- if (datatype_vvvvwbj == 'CHAR' || datatype_vvvvwbj == 'VARCHAR' || datatype_vvvvwbj == 'TEXT' || datatype_vvvvwbj == 'MEDIUMTEXT' || datatype_vvvvwbj == 'LONGTEXT' || datatype_vvvvwbj == 'BLOB' || datatype_vvvvwbj == 'TINYBLOB' || datatype_vvvvwbj == 'MEDIUMBLOB' || datatype_vvvvwbj == 'LONGBLOB')
- {
- return true;
- }
- return false;
-}
-
// the vvvvwbl function
function vvvvwbl(store_vvvvwbl)
{
diff --git a/media/js/repository.js b/media/js/repository.js
new file mode 100644
index 000000000..9d6629898
--- /dev/null
+++ b/media/js/repository.js
@@ -0,0 +1,11 @@
+/**
+ * @package Joomla.Component.Builder
+ *
+ * @created 30th April, 2015
+ * @author Llewellyn van der Merwe
+ * @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
+ */
+
+