Compare commits

..

No commits in common. "5.x" and "5.x" have entirely different histories.
5.x ... 5.x

422 changed files with 3358 additions and 14981 deletions

View File

@ -1,42 +1,14 @@
# v5.0.4-beta1
# v5.0.3-alpha3
- Add first classes for the new import engine.
- Fix usergrouplist compiler triggers. #1100
- Add field type power integration [init, reset, push]
# v5.0.4-alpha
# v5.0.3-alpha
- Add [AllowDynamicProperties] in the base view class for J5
- Move the _prepareDocument above the display call in the base view class
- Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run.
- Added new import powers for custom import of spreadsheets.
- Move the setDocument and _prepareDocument above the display in the site view and custom admin view.
- Update the trashhelper layout to work in Joomla 5.
- Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues.
- Fix Save failed issue in dynamicGet. #1148
- Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]
- Add the DateHelper class and improve the date methods.
- Add simple SessionHelper class.
# v5.0.3
- Add [push] option to powers area.
- Fix error in [Save As Copy] functionality for the library. #1162
- Fix error when no components exist. #1164
- Fix search page error caused by File class.
- Fix UserGroupList compiler triggers. #1100
- Add power integration field type with [init, reset, push] options.
- Fix default database fields to allow NULL values. #1169
- Fix power list field to support search functionality. #1167
- Expand Demo component in JCB v4 to include advanced features.
- Fix missing working path in zip creation.
- Fix dynamic retrieval for the demo site view.
- Fix demo site view to display files.
- Fix field type initialization message.
- Fix type-agnostic comparisons by casting to CHAR in dynamic get joins.
- Fix dynamic download for site area to use correct namespace.
- Fix missing edit button on fields in related views.
- Fix dashboard display issues.
- Restore search option in the [use] field for related views.
- Fix namespace issue causing linker to break.
- Add push option to powers area
- Fix library save as copy error. #1162
- Fix the error when no components exists. #1164
- Fix search page error due to File class.
# v5.0.2
@ -129,45 +101,40 @@
- Add the BaseDatabaseModel use statement to custom site view controller. #1119
- Fix the customfolderlist field. #1120
# v4.0.3
# v4.0.2
- Add [push] option to powers area.
- Fix [Save as Copy] error in library. #1162
- Fix error when no components exist. #1164
- Fix search page error caused by File class.
- Fix usergrouplist compiler triggers. #1100
- Add power field type integration [init, reset, push].
- Fix default database fields to allow NULL. #1169
- Fix power list field to enable search. #1167
- Expand the Demo component in JCB v4 to include more advanced features.
- Fix missing working path in zip process.
- Fix dynamic get issue in demo site view.
- Fix demo site view to display files.
- Fix field type init message.
- Ensure type-agnostic comparisons by casting to CHAR in joins for dynamic get.
- Fix dynamic download for site area with correct namespace.
- Fix missing edit button on fields in related views.
- Fix dashboard display.
- Restore search option in [use] field of related views.
- Fix namespace issue that broke the linker.
- Fix site view form missing classes in J4+
- Fix permissions tab in items in J4+
- Fix site display controller checkEditId function in J4+
- Add class methods to the HtmlView classes in J4+
- Fix broken toolbar call in HtmlView in J4+
- Fix missing scripts and styles fields and methods in the site admin view model
- Update subform field layout across JCB for cleaner look
- Remove expansion feature
- Fix helper area
- Fix database mySql update in J4+
- Remove phpspreadsheet completely from Joomla 4+
- Add option to use powers in preflight event in the installer class
- Fix abstract schema class function check default index warring
- Fix dynamicGet so that the table values will load again. #1155
- Add more pure JS to the dynamic get area
- Add native plugin builder for Joomla 4 & 5
# v3.2.4
# v3.2.3
- Add [push] option to Powers area.
- Fix [Save As Copy] error in library. #1162
- Fix error when no components exist. #1164
- Fix search page error caused by File class.
- Fix UserGroupList compiler triggers. #1100
- Add Power field type integration: init, reset, push.
- Fix database default fields to allow NULL. #1169
- Fix Power List field to allow searching. #1167
- Remove Demo component from JCB v3; add Hello World component as demo.
- Fix missing working path in ZIP.
- Fix demo site view to display files.
- Fix message for Field Type init.
- Ensure type-agnostic comparisons by casting to CHAR in joins for dynamic retrieval.
- Fix dynamic download in site area with correct namespace.
- Fix missing edit button on fields in related views.
- Fix dashboard display issues.
- Re-add search option in use field of related views.
- Fix namespace issue that broke the linker.
- Fix site view form missing classes in J4+
- Fix permissions tab in items in J4+
- Fix site display controller checkEditId function in J4+
- Add class methods to the HtmlView classes in J4+
- Fix broken toolbar call in HtmlView in J4+
- Fix missing scripts and styles fields and methods in the site admin view model
- Update subform field layout across JCB for cleaner look
- Remove expansion feature
- Fix helper area
- Fix database mySql update in J4+
- Remove phpspreadsheet completely from Joomla 4+
- Add option to use powers in preflight event in the installer class
- Fix abstract schema class function check default index warring
- Fix dynamicGet so that the table values will load again. #1155
- Keep jQuery in dynamicGet area for Joomla 3
- Add native plugin builder for Joomla 4 & 5

View File

@ -1514,10 +1514,10 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
// Fix the assets table rules column size.
$this->setDatabaseAssetsRulesFix(95520, "MEDIUMTEXT");
$this->setDatabaseAssetsRulesFix(95680, "MEDIUMTEXT");
// Install the global extension params.
$this->setExtensionsParams(
'{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":{"subform_layouts0":{"view_field":"default","layout":"repeatablejcbjfive"}},"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":"2","type_name_builder":"2","import_guid_only":"1","export_language_strings":"1","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_company":"Vast Development Method","export_owner":"Llewellyn van der Merwe","export_email":"joomla@vdm.io","export_website":"https://dev.vdm.io/","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","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_company":"Vast Development Method","export_owner":"Llewellyn van der Merwe","export_email":"joomla@vdm.io","export_website":"https://dev.vdm.io/","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":""}'
);
@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 5.0.4-beta1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 5.0.3-alpha3 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta1) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.3-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 7th November, 2024
+ *Version*: 5.0.4-beta1
+ *Last Build*: 23rd August, 2024
+ *Version*: 5.0.3-alpha3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **890506**
+ *Line count*: **835017**
+ *Field count*: **2104**
+ *File count*: **6228**
+ *Folder count*: **636**
+ *File count*: **5805**
+ *Folder count*: **622**
> 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)

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.4-beta1) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.3-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 7th November, 2024
+ *Version*: 5.0.4-beta1
+ *Last Build*: 23rd August, 2024
+ *Version*: 5.0.3-alpha3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **890506**
+ *Line count*: **835017**
+ *Field count*: **2104**
+ *File count*: **6228**
+ *Folder count*: **636**
+ *File count*: **5805**
+ *Folder count*: **622**
> 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)

View File

@ -314,6 +314,7 @@
<action name="joomla_component.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_STATE_DESC" />
<action name="joomla_component.version" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_EDIT_VERSION_DESC" />
<action name="joomla_component.submenu" title="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENTS_SUBMENU_DESC" />
<action name="joomla_module.get_snippets" title="COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS_DESC" />
<action name="joomla_module.access" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_ACCESS_DESC" />
<action name="joomla_module.batch" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_BATCH_USE_DESC" />
<action name="joomla_module.create" title="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE" description="COM_COMPONENTBUILDER_JOOMLA_MODULES_CREATE_DESC" />

View File

@ -78,7 +78,7 @@ function getLibraries(path) {
buildLibraries(_paths);
} else {
jQuery.get(path)
.done(function(paths) {
.success(function(paths) {
// load only this library paths
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
buildLibraries(paths);
@ -161,7 +161,7 @@ function getSnippets(path, libraryName) {
jQuery('#snippets-github').html('<h1>'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS')+'</h1>');
} else {
jQuery.get(path)
.done(function(paths) {
.success(function(paths) {
// load only this library paths
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
setSnippets(paths, libraryName);
@ -190,7 +190,7 @@ function setSnippets(paths, libraryName) {
fromLocal = true;
} else {
jQuery.get(snippetPath+value.path)
.done(function(snippet) {
.success(function(snippet) {
// convert the string to json.object
snippet = jQuery.parseJSON(snippet);
jQuery.jStorage.set(value.path, snippet, {TTL: expire});
@ -469,7 +469,7 @@ function getSnippetModal(key, type) {
showSnippetModal(_snippet, type);
} else {
jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/'+key)
.done(function(snippet) {
.success(function(snippet) {
// convert the string to json.object
snippet = jQuery.parseJSON(snippet);
jQuery.jStorage.set(key, snippet, {TTL: expire});
@ -527,6 +527,7 @@ function getKeyID(key) {
// return the id build
return keyID;
}
// get key ID
function getKeyID(key) {
// get useful ID

View File

@ -35,9 +35,6 @@ class ###Component###View###SView### extends HtmlView
$this->user = Factory::getUser();
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**

View File

@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
throw new Exception(implode("\n", $errors), 500);
}
// Set the document
$this->setDocument();
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
@ -113,11 +113,6 @@ class ###Component###View###View### extends HtmlView
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###

View File

@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
throw new Exception(implode("\n", $errors), 500);
}
// Set the document
$this->setDocument();
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
@ -114,11 +114,6 @@ class ###Component###View###View### extends HtmlView
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
// only add the ISIS template css & js if needed (default is 1 = true)

View File

@ -65,11 +65,11 @@ class ###Component###View###Views### extends HtmlView
throw new Exception(implode("\n", $errors), 500);
}
// Set the document
$this->setDocument();
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
@ -151,11 +151,6 @@ class ###Component###View###Views### extends HtmlView
*/
protected function setDocument()
{
// Load Core
Html::_('behavior.core');
// Load jQuery
Html::_('jquery.framework');
if (!isset($this->document))
{
$this->document = Factory::getDocument();

View File

@ -35,9 +35,6 @@ class ###Component###View###SViews### extends HtmlView
$this->user = Factory::getUser();
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**

View File

@ -33,9 +33,6 @@ class ###Component###View###SViews### extends HtmlView
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**

View File

@ -33,9 +33,6 @@ class ###Component###View###SView### extends HtmlView
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
// Display the template
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**

View File

@ -25,7 +25,6 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -90,10 +89,9 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null): void
public function display($tpl = null)
{
// Assign data to the view
$this->items = $this->get('Items');

View File

@ -52,23 +52,7 @@ class ###View###Controller extends FormController
* @var string
* @since 1.6
*/
protected $view_list = '###views###';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
protected $view_list = '###views###';###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/**
* Method override to check if you can add a new record.

View File

@ -25,7 +25,6 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -114,10 +113,9 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null): void
public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_###component###');

View File

@ -25,7 +25,6 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -66,10 +65,9 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null): void
public function display($tpl = null)
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
@ -84,8 +82,6 @@ class HtmlView extends BaseHtmlView
// Set the html view document stuff
$this->_prepareDocument();
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**

View File

@ -105,12 +105,9 @@ class ###SViews###Model extends ListModel
];
/**
* A custom property for UI Kit components.
*
* @var mixed Property for storing UI Kit component-related data or objects.
* @since 3.2.0
* A custom property for UIKit components. (not used unless you load v2)
*/
protected $uikitComp = [];
protected $uikitComp;
/**
* Constructor

View File

@ -25,7 +25,6 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@ -34,10 +33,9 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null): void
public function display($tpl = null)
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
@ -52,8 +50,6 @@ class HtmlView extends BaseHtmlView
// Set the html view document stuff
$this->_prepareDocument();
parent::display($tpl);
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
/**

View File

@ -115,10 +115,10 @@ class ###SView###Model extends ItemModel
/**
* A custom property for UI Kit components.
*
* @var mixed Property for storing UI Kit component-related data or objects.
* @var array|null Property for storing UI Kit component-related data or objects.
* @since 3.2.0
*/
protected $uikitComp = [];
protected ?array $uikitComp;
/**
* @var object item

View File

@ -25,17 +25,13 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
* View display method
*
* @return void
* @throws \Exception
* @since 1.6
*/
function display($tpl = null): void
function display($tpl = null)
{
// Assign data to the view
$this->icons = $this->get('Icons');

View File

@ -81,10 +81,9 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null): void
public function display($tpl = null)
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
@ -94,8 +93,6 @@ class HtmlView extends BaseHtmlView
$this->scripts = $this->get('Scripts');
// get the user object
$this->user ??= $this->app->getIdentity();###SITE_DIPLAY_METHOD###
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**

View File

@ -65,10 +65,9 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null): void
public function display($tpl = null)
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
@ -78,8 +77,6 @@ class HtmlView extends BaseHtmlView
$this->scripts = $this->get('Scripts') ?? [];
// get the user object
$this->user ??= $this->getCurrentUser();###SITE_DIPLAY_METHOD###
parent::display($tpl);
}###SITE_EXTRA_DIPLAY_METHODS###
/**

View File

@ -57,7 +57,7 @@
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION"
icon="list"
max="10"
max="9"
min="1">
<form hidden="true" name="list_subform_layouts_modal" repeat="true">
<!-- View_field Field. Type: List. (joomla) -->
@ -73,8 +73,6 @@
<!-- Option Set. -->
<option value="default">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="admin_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_ADMIN_VIEWS_AJAX_INPUT</option>
<option value="admin_custom_tabs.tabs">
COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS</option>
<option value="admin_fields.addfields">
@ -95,8 +93,6 @@
COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_MENUS_ADDCUSTOMMENUS</option>
<option value="component_site_views.addsite_views">
COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS</option>
<option value="custom_admin_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_CUSTOM_ADMIN_VIEWS_AJAX_INPUT</option>
<option value="dynamic_get.join_db_table">
COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE</option>
<option value="dynamic_get.join_view_table">
@ -107,8 +103,6 @@
COM_COMPONENTBUILDER_CONFIG_JOOMLA_MODULE_UPDATES_VERSION_UPDATE</option>
<option value="joomla_plugin_updates.version_update">
COM_COMPONENTBUILDER_CONFIG_JOOMLA_PLUGIN_UPDATES_VERSION_UPDATE</option>
<option value="site_view.ajax_input">
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT</option>
</field>
<!-- Layout Field. Type: List. (joomla) -->
<field

View File

@ -1,16 +0,0 @@
<?php
/**
*
* @version 2.0.0 - September 03, 2014
* @package Component Builder
* @author Llewellyn van de Merwe <http://www.vdm.io>
* @copyright Copyright (C) 2014. All Rights Reserved
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
*
**/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
###BOM###
[CUSTOMCODE=dynamicDownloadController+Administrator]

View File

@ -1,16 +0,0 @@
<?php
/**
*
* @version 2.0.0 - September 03, 2014
* @package Component Builder
* @author Llewellyn van de Merwe <http://www.vdm.io>
* @copyright Copyright (C) 2014. All Rights Reserved
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
*
**/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
###BOM###
[CUSTOMCODE=dynamicDownloadController+Site]

View File

@ -2473,7 +2473,6 @@
name="table"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
button="false"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"
@ -173,6 +174,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL"
rows="20"
cols="30"
default=""
class="text_area tab_html"
filter="raw"
hint="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"
@ -186,6 +187,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_LABEL"
rows="20"
cols="40"
default=""
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_IDS_DESCRIPTION"
class="text_area ids_selection"
filter="raw"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"

View File

@ -104,6 +104,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
readonly="true"
@ -158,6 +159,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_LABEL"
rows="30"
cols="15"
default=""
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_MYSQL_DESCRIPTION"
class="text_area mysql_update"
filter="raw"

View File

@ -144,7 +144,6 @@
label="COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">

View File

@ -332,6 +332,7 @@
label="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_LABEL"
rows="2"
cols="15"
default=""
description="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_DESCRIPTION"
message="COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_MESSAGE"
class="text_area span12"

View File

@ -287,7 +287,7 @@
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">

View File

@ -143,6 +143,7 @@
label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_LABEL"
rows="30"
cols="15"
default=""
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_MYSQL_DESCRIPTION"
class="text_area mysql_update"
filter="raw"

View File

@ -143,6 +143,7 @@
label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_LABEL"
rows="30"
cols="15"
default=""
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_MYSQL_DESCRIPTION"
class="text_area mysql_update"
filter="raw"

View File

@ -238,10 +238,10 @@
label="COM_COMPONENTBUILDER_POWER_NAMESPACE_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove"
buttons="add,remove,move"
icon="list"
max="30"
min="0"
min="1"
nested_depth="1">
<form hidden="true" name="list_namespace_modal" repeat="true">
<!-- Use Field. Type: Text. (joomla) -->
@ -496,8 +496,7 @@
type="namespaces"
name="use"
label="COM_COMPONENTBUILDER_POWER_USE_LABEL"
class="span12"
layout="joomla.form.field.list-fancy-select"
class="list_class span12"
multiple="false"
default="0"
button="false"

View File

@ -264,9 +264,9 @@
label="COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_LABEL"
description="COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0">
default="">
<!-- Option Set. -->
<option value="0">
<option value="">
COM_COMPONENTBUILDER_REPOSITORY_GLOBAL</option>
<option value="1">
COM_COMPONENTBUILDER_REPOSITORY_OVERRIDE</option>

View File

@ -166,6 +166,7 @@
label="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_LABEL"
rows="15"
cols="5"
default=""
description="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_DESCRIPTION"
class="input-xxlarge span12"
hint="COM_COMPONENTBUILDER_SERVER_PRIVATE_KEY_HINT"

View File

@ -1357,7 +1357,7 @@ COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported
COM_COMPONENTBUILDER_BSB_HAS_BEEN_IMPORTED="<b>%s</b> has been imported!"
COM_COMPONENTBUILDER_BSB_HAS_BEEN_UPDATED="<b>%s</b> has been updated!"
COM_COMPONENTBUILDER_BSB_WAS_FOUND="<b>%s</b> was found!"
COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEARED_SUCCESSFULLYB="<b>The tmp folder has been cleared successfully!</b>"
COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB="<b>The tmp folder has been clear successfully!</b>"
COM_COMPONENTBUILDER_BUILD="Build"
COM_COMPONENTBUILDER_BUILDIN="Build-in"
COM_COMPONENTBUILDER_BUILD_DATE="Build Date"
@ -1370,7 +1370,6 @@ COM_COMPONENTBUILDER_BULK_UPDATE_ALL_DIVERGED_SNIPPETS="Bulk Update All Diverged
COM_COMPONENTBUILDER_BULK_UPDATE_ALL_OUT_DATED_SNIPPETS="Bulk Update All Out Dated Snippets"
COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME="Button to create %s will show once %s is saved for the first time."
COM_COMPONENTBUILDER_CANCEL="Cancel"
COM_COMPONENTBUILDER_CAN_NOT_SAVE_USER_WITHOUT_EMAIL_VALUE="Can not save user without email value."
COM_COMPONENTBUILDER_CHAIN="Chain"
COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there."
COM_COMPONENTBUILDER_CLASS_EXTENDINGS="Class Extendings"
@ -3345,7 +3344,6 @@ COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS="Admin Custom Tabs (tabs)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_ADDFIELDS="Admin Fields (addfields)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS="Admin Fields Conditions (addconditions)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_RELATIONS_ADDRELATIONS="Admin Fields Relations (addrelations)"
COM_COMPONENTBUILDER_CONFIG_ADMIN_VIEWS_AJAX_INPUT="Admin Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot"
@ -3412,7 +3410,6 @@ 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_CUSTOM_ADMIN_VIEWS_AJAX_INPUT="Custom Admin Views (ajax_input)"
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"
@ -3614,7 +3611,6 @@ COM_COMPONENTBUILDER_CONFIG_SET_BROWSER_STORAGE_LABEL="Browser Storage"
COM_COMPONENTBUILDER_CONFIG_SHOW="Show"
COM_COMPONENTBUILDER_CONFIG_SHOW_ALL="Show All"
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS="SimpleXMLElement Class"
COM_COMPONENTBUILDER_CONFIG_SITE_VIEWS_AJAX_INPUT="Site Views (ajax_input)"
COM_COMPONENTBUILDER_CONFIG_SMTP="SMTP"
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_DESCRIPTION="Select yes if your SMTP host requires SMTP Authentication."
COM_COMPONENTBUILDER_CONFIG_SMTPAUTH_LABEL="SMTP Authentication"
@ -4171,9 +4167,9 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_DESCRIPTION="The end hash target
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_HINT="autogenerated md5 hash"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_LABEL="End Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The end hash target to help insert the code until the correct place, if the line position change. This hash is the md5 of a few lines below the custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The start hash target to help insert the code at the correct place, if the line position change. This hash is the md5 of a few lines above the custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_HINT="autogenerated md5 hash"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="End Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="Start Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CUSTOM_CODE_HASH_AUTOMATION="Hash (automation)"
COM_COMPONENTBUILDER_CUSTOM_CODE_HTML="HTML"
@ -4570,7 +4566,6 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_YES="Yes"
COM_COMPONENTBUILDER_DYNAMIC_GET_YY="yy"
COM_COMPONENTBUILDER_DYNAMIC_GET_Z="z"
COM_COMPONENTBUILDER_DYNAMIC_GET_ZZ="zz"
COM_COMPONENTBUILDER_D_ROWS_PROCESSED_SUCCESS_RATE_TWOF_IMPORT_SUCCESSFUL="%d rows processed. Success rate: %.2f%%. Import successful!"
COM_COMPONENTBUILDER_EDIT="Edit"
COM_COMPONENTBUILDER_EDITCREATE_SITE_VIEW="Edit/Create Site View"
COM_COMPONENTBUILDER_EDITING="Editing"
@ -4993,7 +4988,6 @@ COM_COMPONENTBUILDER_FILE_BSB_COULD_NOT_BE_UNLOCKED="File <b>%s</b> could not be
COM_COMPONENTBUILDER_FILE_BSB_WAS_MOVED_TO_BSB="File <b>%s</b> was moved to <b>%s</b>"
COM_COMPONENTBUILDER_FILE_BSB_WAS_NOT_MOVED_TO_BSB="File <b>%s</b> was not moved to <b>%s</b>"
COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED="File <b>%s</b> was successfully unlocked!"
COM_COMPONENTBUILDER_FILE_TYPE_NOT_VALID_IN_S_AREA="File type not valid in %s area."
COM_COMPONENTBUILDER_FILTER="Filter"
COM_COMPONENTBUILDER_FILTER_ADD_TYPE_ASCENDING="Add Type ascending"
COM_COMPONENTBUILDER_FILTER_ADD_TYPE_DESCENDING="Add Type descending"
@ -5441,7 +5435,6 @@ COM_COMPONENTBUILDER_ID="id"
COM_COMPONENTBUILDER_ID_MISMATCH_WAS_DETECTED_WITH_THE_SSSS_GUI_CODE_FIELD_SO_THE_PLACEHOLDER_WAS_NOT_SET="ID mismatch was detected with the %s.%s.%s.%s GUI code field. So the placeholder was not set."
COM_COMPONENTBUILDER_IEMAILI_BSB="<i>Email:</i> <b>%s</b>"
COM_COMPONENTBUILDER_IMPORT_BY_GUID_ONLY="Import by GUID only!"
COM_COMPONENTBUILDER_IMPORT_FAILED_D_ROWS_PROCESSED_WITH_ONLY_D_SUCCESSES_ERROR_RATE_TWOF="Import failed. %d rows processed with only %d successes. Error rate: %.2f%%."
COM_COMPONENTBUILDER_IMPORT_S="Import %s"
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_COMPONENTS="Select the file to import data to joomla_components."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_LANGUAGE_TRANSLATIONS="Select the file to import data to language_translations."
@ -5846,7 +5839,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README="Readme"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_README_LABEL="README.md"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_DESCRIPTION="Should we remove all line breaks (&quot;\r&quot;, &quot;\n&quot;) from all language strings in this component."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL="Remove line breaks<br /><small>from language strings<br>This switch will be removed since it must always be true for J4+.</small>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL="Remove line breaks<br /><small>from language strings</small>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_DESCRIPTION="Select your sales server for this component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_LABEL="Sales Server"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Component to customise the alias."
@ -6188,6 +6181,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_FILE_DESCRIPTION="Leave default if you don't
COM_COMPONENTBUILDER_JOOMLA_MODULE_FILE_HINT="config"
COM_COMPONENTBUILDER_JOOMLA_MODULE_FILE_LABEL="File Name"
COM_COMPONENTBUILDER_JOOMLA_MODULE_FORMS_FIELDS="Forms & Fields"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS="Joomla Module Get Snippets Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_JOOMLA_MODULE_GUID_DESCRIPTION="Globally Unique Identifier"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GUID_HINT="Auto Generated"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GUID_LABEL="GUID"
@ -7493,7 +7488,7 @@ COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_DESCRIPTION="There is no be
COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_LABEL="No Behaviour"
COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_DESCRIPTION="There is no behaviour set for this library. This means JCB will not add any files unless you custom code it in somewhere."
COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_LABEL="No Behaviour"
COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_LIBRARY_DESCRIPTION="To effectively integrate a PHP library into your component, leverage the [Powers] Area within JCB. This feature empowers you to seamlessly incorporate Composer packages as well as standard PHP class structures into your component, ensuring a robust and maintainable solution."
COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_LIBRARY_DESCRIPTION="We are working on this feature it is not yet ready, but soon enough you will be able to build real Joomla library integration here."
COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_LIBRARY_LABEL="Set Behaviour"
COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_DESCRIPTION="All the library files linked to this library will always be added to a view if linked to the view."
COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_LABEL="Set Behaviour"
@ -7600,13 +7595,11 @@ COM_COMPONENTBUILDER_NO_NAMESPACE_FOUND="No Namespace Found"
COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION="No need to get it since it is already in sync with your local version"
COM_COMPONENTBUILDER_NO_PATHS_FOUND="No Paths Found"
COM_COMPONENTBUILDER_NO_RESULTS_MATCH="No results match"
COM_COMPONENTBUILDER_NO_ROWS_WERE_PROCESSED="No rows were processed."
COM_COMPONENTBUILDER_NO_SELECTION_DETECTED="No selection detected"
COM_COMPONENTBUILDER_NO_SNIPPETS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No snippets were selected, please make a selection and try again!"
COM_COMPONENTBUILDER_NO_S_FOUND="No %s Found"
COM_COMPONENTBUILDER_NO_S_HAVE_BEEN_LINKED_TO_THIS_VIEW_SOON_AS_THIS_IS_DONE_IT_WILL_BE_DISPLAYED_HERE="No %s have been linked to this view. Soon as this is done it will be displayed here."
COM_COMPONENTBUILDER_NO_TYPE="No Type"
COM_COMPONENTBUILDER_NO_UPLOAD_SELECTED="No upload selected"
COM_COMPONENTBUILDER_NO_VALIDATION_RULES_FOUND="No validation rules found."
COM_COMPONENTBUILDER_NO_VALID_MODE_HAS_BEEN_SPECIFIED="No valid mode has been specified!"
COM_COMPONENTBUILDER_OFFICIAL_VDM_PACKAGES="Official VDM Packages"
@ -7616,6 +7609,7 @@ COM_COMPONENTBUILDER_ONLY_ONE_COMPONENT_CAN_BE_CLONED_AT_A_TIME_PLEASE_SELECT_ON
COM_COMPONENTBUILDER_ONLY_SZIP_FILE_WAS_REMOVED_THE_FROM_TMP_FOLDER_DURING_INSTALLATION="Only (%s.zip) file was removed the from tmp folder during installation!"
COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE="Only use the <b>None DB</b> option if you are planning on targeting this field with JavaScript/Custom PHP to move its value into another field that does get saved to the database."
COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS="Open Library Snippets"
COM_COMPONENTBUILDER_OPTIONS="Options"
COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before"
COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit"
COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views"
@ -8916,9 +8910,7 @@ COM_COMPONENTBUILDER_SUBMENU_SNIPPETS="Snippets"
COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates"
COM_COMPONENTBUILDER_SUBMENU_VALIDATION_RULES="Validation Rules"
COM_COMPONENTBUILDER_SUCCESS="Success"
COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_FIELD_TYPES="Successfully Initialized all Remote Joomla Field Types"
COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS="Successfully Initialized all Remote Joomla Powers"
COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS="Successfully Initialized all Remote Powers"
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was saved."
COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted. <br /><br /><b>This means the snippets will continue to appear out of date.</b>"
COM_COMPONENTBUILDER_SUPER_POWER="Super Power"
@ -9061,7 +9053,6 @@ COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no
COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!"
COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_PLEASE_TRY_AGAIN="There has been an error please try again"
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info."
COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_UPLOADING_TO_THE_SERVER="There was an error uploading to the server."
COM_COMPONENTBUILDER_THERE_WAS_A_PROBLEM_BNO_VIEW_OR_ID_FOUND_IN_SESSION_OR_VIEW_NOT_ALLOWED_TO_ACCESS_AREAB_WE_COULD_NOT_LOAD_ANY_LINKED_TO_VALUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR="There was a problem, <b>no view or id found in session or view not allowed to access area</b>, we could not load any linked to values. Please inform your system administrator!"
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free."
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
@ -9138,7 +9129,6 @@ COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING="The notice board is loading"
COM_COMPONENTBUILDER_THE_OPTION_TO_ADD_A_DYNAMIC_BUTTON_IS_NOT_AVAILABLE_IN_BOWN_CUSTOM_FIELD_TYPESB_YOU_WILL_HAVE_TO_CUSTOM_CODE_IT="The option to add a dynamic button is not available in <b>own custom field types</b>, you will have to custom code it."
COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: <code>%s</code>"
COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s"
COM_COMPONENTBUILDER_THE_PHP_TEMPORARY_FOLDER_IS_NOT_SET="The PHP temporary folder is not set."
COM_COMPONENTBUILDER_THE_PLUGIN_FILES_FOLDERS="The plugin files & folders"
COM_COMPONENTBUILDER_THE_PLUGIN_UPDATES="The plugin updates"
COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED="The power has successfully been pushed."
@ -9169,7 +9159,7 @@ COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DID_NOT_RETURN_S_DAT
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DID_NOT_RETURN_VALID_DATA="The url (%s) set to retrieve the packages did not return valid data!"
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_EXIST="The url (%s) set to retrieve the packages does not exist!"
COM_COMPONENTBUILDER_THE_URL_S_SET_TO_RETRIEVE_THE_PACKAGES_DOES_NOT_RETURN_ANY_DATA="The url (%s) set to retrieve the packages does not return any data!"
COM_COMPONENTBUILDER_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JCB_SYSTEM_HAS_INTERNET_CONNECTION="The wiki can only be loaded when your JCB system has internet connection."
COM_COMPONENTBUILDER_THE_WIKI_CAN_ONLY_BE_LOADED_WHEN_YOUR_JOOMLA_COMPONENT_BUILDER_SYSTEM_HAS_INTERNET_CONNECTION="The wiki can only be loaded when your Joomla Component Builder system has internet connection."
COM_COMPONENTBUILDER_THE_WIKI_IS_LOADING="The wiki is loading"
COM_COMPONENTBUILDER_THIS_ADDS_POWERS_TO_A_LOCAL_REPOSITORY_FOLDER_ALL_BAPPROVEDB_POWERS_LINKED_TO_THIS_COMPONENT_WILL_BE_MOVED_TO_YOUR_BLOCALB_POWERS_REPOSITORY_FOLDER_INTO_THEIR_SELECTIVE_TARGET_PATHS_THIS_LOCAL_FOLDER_PATH_MUST_BE_SET_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_BSUPER_POWERB_TAB="This adds powers to a local repository folder. All <b>approved</b> powers, linked to this component, will be moved to your <b>local</b> powers repository folder into their selective target paths. This local folder path must be set in the global options of JCB under the <b>super power</b> tab."
COM_COMPONENTBUILDER_THIS_BSB_IS_NOT_LINKED_TO_ANY_OTHER_AREAS_OF_JCB_AT_THIS_TIME="This <b>%s</b> is not linked to any other areas of JCB at this time!"
@ -9257,13 +9247,9 @@ COM_COMPONENTBUILDER_UPDATE_ALL="Update All"
COM_COMPONENTBUILDER_UPDATE_ALL_DIVERGED_SNIPPETS="Update All Diverged Snippets"
COM_COMPONENTBUILDER_UPDATE_ALL_ITEMS_FOUND_WITH_THIS_DATABASE_SEARCH_WITH_THE_REPLACE_VALUE="Update all items found with this database search, with the replace value."
COM_COMPONENTBUILDER_UPDATE_ALL_OUT_DATED_SNIPPETS="Update All Out Dated Snippets"
COM_COMPONENTBUILDER_UPDATE_OF_USER_S_S_FAILEDS="Update of user %s (%s) failed!%s"
COM_COMPONENTBUILDER_UPLOAD_IS_NOT_A_VALID_TYPE="Upload is not a valid type."
COM_COMPONENTBUILDER_UP_TO_DATE="Up to date"
COM_COMPONENTBUILDER_USAGE="Usage"
COM_COMPONENTBUILDER_USED_IN="Used in"
COM_COMPONENTBUILDER_USER_CREATION_FAILED="User creation failed!"
COM_COMPONENTBUILDER_USER_S_S_CREATION_FAILEDS="User %s (%s) creation failed!%s"
COM_COMPONENTBUILDER_USE_BATCH="Use Batch"
COM_COMPONENTBUILDER_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
COM_COMPONENTBUILDER_USE_KEY="Use Key"
@ -9364,7 +9350,6 @@ COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS="View the contributor details"
COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION="View Usage of community version"
COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_SNIPPET="View who contributed to this snippet"
COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM="
COM_COMPONENTBUILDER_WARNING_UPLOAD_ERROR="Warning, upload error."
COM_COMPONENTBUILDER_WEBSITE="Website"
COM_COMPONENTBUILDER_WEBSITE_OF_S="Website of %s"
COM_COMPONENTBUILDER_WEBSITE_S="Website: %s"
@ -9400,12 +9385,10 @@ COM_COMPONENTBUILDER_YOUR_COMPONENT_WILL_BE_COMPILED_TO_WORK_IN_JOOMLA_FIVE="You
COM_COMPONENTBUILDER_YOUR_COMPONENT_WILL_BE_COMPILED_TO_WORK_IN_JOOMLA_FOUR="Your component will be compiled to work in Joomla 4"
COM_COMPONENTBUILDER_YOUR_COMPONENT_WILL_BE_COMPILED_TO_WORK_IN_JOOMLA_THREE="Your component will be compiled to work in Joomla 3"
COM_COMPONENTBUILDER_YOUR_DATA_IS_ENCRYPTED_WITH_A_AES_TWO_HUNDRED_AND_FIFTY_SIX_BIT_ENCRYPTION_USING_THE_ABOVE_THIRTY_TWO_CHARACTER_KEY="Your data is encrypted with a AES 256 bit encryption using the above 32 character key."
COM_COMPONENTBUILDER_YOUR_FILE_WAS_IS_LARGER_THAN_THE_ALLOWED_SIZE="Your file was is larger than the allowed size."
COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items."
COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!"
COM_COMPONENTBUILDER_YOU_CAN_DIRECTLY_DOWNLOAD_THE_LATEST_UPDATE_OR_USE_THE_JOOMLA_UPDATE_AREA="You can directly download the latest update, or use the Joomla update area."
COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component <b>zip</b> package you would like to import.<br /><small>Please note that smart component import only works with the following format: <b>(.zip)</b></small>"
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSIONS_TO_UPLOAD_S="You do not have permissions to upload (%s)."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_ACCESS_THE_SERVER_DETAILS_BS_DENIEDB_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="You do not have permission to access the server details (<b>%s - denied</b>), please contact your system administrator for more info."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_CLONE_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to clone a component, please contact your system administrator for more help."
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_DOWNLOAD_THE_COMPILER_ANIMATIONS="You do not have permission to download the compiler animations!"

View File

@ -682,6 +682,8 @@ COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_STATE="Joomla Modules Updates E
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_STATE_DESC="Allows the users in this group to update the state of the joomla module updates"
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION="Joomla Modules Updates Edit Version"
COM_COMPONENTBUILDER_JOOMLA_MODULES_UPDATES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version joomla modules updates"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS="Joomla Module Get Snippets Button Access"
COM_COMPONENTBUILDER_JOOMLA_MODULE_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button."
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS="Joomla Plugins Access"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_ACCESS_DESC="Allows the users in this group to access access joomla plugins"
COM_COMPONENTBUILDER_JOOMLA_PLUGINS_BATCH_USE="Joomla Plugins Batch Use"

View File

@ -44,9 +44,9 @@ else
$ref = ($id) ? "&ref=fieldtype&refid=" . $id : "";
}
// set the create new URL
$new = "index.php?option=com_componentbuilder&view=fields&task=field.add" . $ref;
$new = "index.php?option=com_componentbuilder&view=fields&task=field.edit" . $ref;
// set the create new and close URL
$close_new = "index.php?option=com_componentbuilder&view=fields&task=field.add";
$close_new = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
// load the action object
$can = ComponentbuilderHelper::getActions('field');

View File

@ -21,28 +21,12 @@ use VDM\Joomla\Utilities\StringHelper;
// No direct access to this file
defined('JPATH_BASE') or die;
// Extract all keys from $displayData as individual variables.
extract($displayData);
// Assign default values for variables that might not be present in $displayData.
// The 'table_id' parameter, defaulting to a randomly generated value if not set or is null.
$table_id = $id ?? StringHelper::random(7);
// The 'name' parameter, defaulting to false if not set or is null.
$name ??= false;
// The 'table_class' parameter, defaulting to 'uk-table' if not set or is null.
$table_class ??= 'uk-table';
// The 'table_container_class' parameter, defaulting to 'uk-overflow-auto' if not set or is null.
$table_container_class ??= 'uk-overflow-auto';
// The 'headers' parameter, defaulting to an array of default header values if not set or is null.
$headers ??= [Text::_('COM_COMPONENTBUILDER_NO'), Text::_('COM_COMPONENTBUILDER_HEADERS'), Text::_('COM_COMPONENTBUILDER_FOUND')];
// The 'items' parameter, defaulting to 6 if not set or is null.
$items ??= 6;
$table_id = (isset($displayData['id'])) ? $displayData['id'] : StringHelper::random(7);
$name = (isset($displayData['name'])) ? $displayData['name'] : false;
$table_class = (isset($displayData['table_class'])) ? $displayData['table_class'] : 'uk-table';
$table_container_class = (isset($displayData['table_container_class'])) ? $displayData['table_container_class'] : 'uk-overflow-auto';
$headers = (isset($displayData['headers'])) ? $displayData['headers'] : [Text::_('COM_COMPONENTBUILDER_NO'), Text::_('COM_COMPONENTBUILDER_HEADERS'), Text::_('COM_COMPONENTBUILDER_FOUND')];
$items = (isset($displayData['items'])) ? $displayData['items'] : 6;
?>
<div class="<?php echo $$table_container_class; ?>">

View File

@ -34,16 +34,16 @@ defined('JPATH_BASE') or die;
document.adminForm.elements['checkall-toggle'].checked=1;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
// check to confirm the deletion
if(confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
if(confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
} else {
document.adminForm.elements['checkall-toggle'].checked=0;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
}
} else {
// confirm deletion of those selected
if (confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
if (confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
};
}
return false;
@ -59,23 +59,23 @@ defined('JPATH_BASE') or die;
<?php if (empty($displayData->items)): ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?php echo Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
<?= Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
</h4>
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
<?php else: ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?php echo Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
<?= Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
</h4>
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
<span class="icon-delete" aria-hidden="true"></span>
<?php echo Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
<?= Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
</button>
<?php endif; ?>
<button onclick="exitTrash();" class="btn btn-small">
<span class="icon-back" aria-hidden="true"></span>
<?php echo Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
<?= Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
</button>
</div>
<?php endif; ?>

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@

View File

@ -62,22 +62,6 @@ class Admin_custom_tabsController extends FormController
*/
protected $view_list = 'admins_custom_tabs';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Admin_fieldsController extends FormController
*/
protected $view_list = 'admins_fields';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Admin_fields_conditionsController extends FormController
*/
protected $view_list = 'admins_fields_conditions';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Admin_fields_relationsController extends FormController
*/
protected $view_list = 'admins_fields_relations';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -63,22 +63,6 @@ class Admin_viewController extends FormController
*/
protected $view_list = 'admin_views';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Class_extendsController extends FormController
*/
protected $view_list = 'class_extendings';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Class_methodController extends FormController
*/
protected $view_list = 'class_methods';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Class_propertyController extends FormController
*/
protected $view_list = 'class_properties';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -19,9 +19,6 @@ use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
use Joomla\CMS\Version;
use VDM\Joomla\Componentbuilder\File\Factory as FileFactory;
use VDM\Joomla\Componentbuilder\Import\Factory as ImportFactory;
use VDM\Joomla\Abstraction\Console\Import;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
@ -72,15 +69,6 @@ class CompilerController extends AdminController
$this->setRedirect(Route::_('index.php?option=com_componentbuilder', false));
}
/**
* Adding this so that the upload factory gets build for Super Powers
* FileFactory
* Adding this so that the import factory gets build for Super Powers
* ImportFactory
* Adding this so that the import cli gets build for Super Powers
* Import
*/
/**
* get all the animations used in the compiler
*
@ -571,7 +559,7 @@ class CompilerController extends AdminController
$tmp = $comConfig->get('tmp_path');
if ($model->emptyFolder($tmp))
{
$message = Text::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEARED_SUCCESSFULLYB');
$message = Text::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB');
$this->setRedirect($redirect_url, $message, 'message');
// get application
$app = Factory::getApplication();

View File

@ -62,22 +62,6 @@ class Component_admin_viewsController extends FormController
*/
protected $view_list = 'components_admin_views';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_configController extends FormController
*/
protected $view_list = 'components_config';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_custom_admin_menusController extends FormController
*/
protected $view_list = 'components_custom_admin_menus';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_custom_admin_viewsController extends FormController
*/
protected $view_list = 'components_custom_admin_views';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_dashboardController extends FormController
*/
protected $view_list = 'components_dashboard';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_files_foldersController extends FormController
*/
protected $view_list = 'components_files_folders';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_modulesController extends FormController
*/
protected $view_list = 'components_modules';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_mysql_tweaksController extends FormController
*/
protected $view_list = 'components_mysql_tweaks';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_placeholdersController extends FormController
*/
protected $view_list = 'components_placeholders';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_pluginsController extends FormController
*/
protected $view_list = 'components_plugins';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_routerController extends FormController
*/
protected $view_list = 'components_routers';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Component_site_viewsController extends FormController
*/
protected $view_list = 'components_site_views';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -65,22 +65,6 @@ class Component_updatesController extends FormController
*/
protected $view_list = 'components_updates';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Custom_admin_viewController extends FormController
*/
protected $view_list = 'custom_admin_views';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Custom_codeController extends FormController
*/
protected $view_list = 'custom_codes';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Dynamic_getController extends FormController
*/
protected $view_list = 'dynamic_gets';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class FieldController extends FormController
*/
protected $view_list = 'fields';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -25,6 +25,7 @@ use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Fieldtype\Factory as FieldtypeFactory;
use VDM\Joomla\Utilities\GetHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@ -63,34 +64,75 @@ class FieldtypeController extends FormController
*/
protected $view_list = 'fieldtypes';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Resets the specified Joomla Field Type.
* Initializes all remote Joomla Field Types and syncs them with the local database.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Joomla Field Type.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Joomla Field Type.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
* 2. It checks whether the current user has the necessary permissions to initialize the Joomla Field Types.
* 3. If the user is authorized, it attempts to initialize the remote Joomla Field Types.
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful initialization, false on failure.
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_FIELD_TYPES') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('fieldtype.init', 'com_componentbuilder'))
{
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->init())
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_FIELD_TYPES_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Joomla Field Types.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla Field Types.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla Field Types.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
@ -99,73 +141,77 @@ class FieldtypeController extends FormController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// check if user has the right
$user = Factory::getUser();
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_FIELD_TYPE') . '</p>';
$status = 'error';
$success = false;
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
// check if user has the right
$user = Factory::getUser();
if($user->authorise('fieldtype.reset', 'com_componentbuilder'))
{
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('fieldtype.reset', 'com_componentbuilder'))
{
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset([$guid]))
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset($guids))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_RESET').'</p>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_RESET').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED') . '</p>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=fieldtype'
. $this->getRedirectToItemAppend($id), $success
);
$this->setRedirect($redirect_url, $message, $status);
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the specified Joomla Field Type.
/**
* Pushes the selected Joomla Field Types.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Joomla Field Type.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Joomla Field Type.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla Field Types.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla Field Types.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
*/
@ -174,59 +220,62 @@ class FieldtypeController extends FormController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// check if user has the right
$user = Factory::getUser();
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_FIELD_TYPE') . '</p>';
$status = 'error';
$success = false;
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
// check if user has the right
$user = Factory::getUser();
if($user->authorise('fieldtype.push', 'com_componentbuilder'))
{
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('fieldtype.push', 'com_componentbuilder'))
{
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items([$guid]))
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items($guids))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED') . '</p>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=fieldtype'
. $this->getRedirectToItemAppend($id), $success
);
$this->setRedirect($redirect_url, $message, $status);
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url);
return $success;
}

View File

@ -18,7 +18,6 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Componentbuilder\Fieldtype\Factory as FieldtypeFactory;
use VDM\Joomla\Utilities\GetHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@ -56,73 +55,16 @@ class FieldtypesController extends AdminController
/**
* Initializes all remote Joomla Field Types and syncs them with the local database.
* Resets the specified Joomla Field Type.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to initialize the Joomla Field Types.
* 3. If the user is authorized, it attempts to initialize the remote Joomla Field Types.
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful initialization, false on failure.
*/
public function initPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right
$user = Factory::getUser();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_FIELD_TYPES') . '</p>';
$status = 'error';
$success = false;
if($user->authorise('fieldtype.init', 'com_componentbuilder'))
{
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->init())
{
// set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_FIELD_TYPES') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_FIELD_TYPES_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Resets the selected Joomla Field Types.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla Field Types.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla Field Types.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Joomla Field Type.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Joomla Field Type.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
@ -131,77 +73,73 @@ class FieldtypesController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = Factory::getUser();
if($user->authorise('fieldtype.reset', 'com_componentbuilder'))
{
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_FIELD_TYPE') . '</p>';
$status = 'error';
$success = false;
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('fieldtype.reset', 'com_componentbuilder'))
{
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset($guids))
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset([$guid]))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_RESET').'</p>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_RESET').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</p>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url);
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=fieldtype'
. $this->getRedirectToItemAppend($id), $success
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the selected Joomla Field Types.
/**
* Pushes the specified Joomla Field Type.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla Field Types.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla Field Types.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Joomla Field Type.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Joomla Field Type.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
*/
@ -210,62 +148,59 @@ class FieldtypesController extends AdminController
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = Factory::getUser();
if($user->authorise('fieldtype.push', 'com_componentbuilder'))
{
$guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid');
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_FIELD_TYPE') . '</p>';
$status = 'error';
$success = false;
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('fieldtype.push', 'com_componentbuilder'))
{
try {
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items($guids))
if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items([$guid]))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED') . '</p>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false);
$this->setRedirect($redirect_url);
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=fieldtype'
. $this->getRedirectToItemAppend($id), $success
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
}

View File

@ -62,22 +62,6 @@ class Help_documentController extends FormController
*/
protected $view_list = 'help_documents';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -63,22 +63,6 @@ class Joomla_componentController extends FormController
*/
protected $view_list = 'joomla_components';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
public function refresh()
{
// Check for request forgeries

View File

@ -143,7 +143,7 @@ class Joomla_componentsController extends AdminController
$tmp = $comConfig->get('tmp_path');
if ($model->emptyFolder($tmp))
{
$message = Text::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEARED_SUCCESSFULLYB');
$message = Text::_('COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB');
$this->setRedirect($redirect_url, $message, 'message');
// get application
$app = Factory::getApplication();

View File

@ -63,22 +63,6 @@ class Joomla_moduleController extends FormController
*/
protected $view_list = 'joomla_modules';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Joomla_module_files_folders_urlsController extends FormController
*/
protected $view_list = 'joomla_modules_files_folders_urls';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -64,22 +64,6 @@ class Joomla_module_updatesController extends FormController
*/
protected $view_list = 'joomla_modules_updates';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -51,4 +51,13 @@ class Joomla_modulesController extends AdminController
{
return parent::getModel($name, $prefix, $config);
}
public function getSnippets()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// redirect to the import snippets custom admin view
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=get_snippets', false));
return;
}
}

View File

@ -63,22 +63,6 @@ class Joomla_pluginController extends FormController
*/
protected $view_list = 'joomla_plugins';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Joomla_plugin_files_folders_urlsController extends FormController
*/
protected $view_list = 'joomla_plugins_files_folders_urls';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Joomla_plugin_groupController extends FormController
*/
protected $view_list = 'joomla_plugin_groups';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -64,22 +64,6 @@ class Joomla_plugin_updatesController extends FormController
*/
protected $view_list = 'joomla_plugins_updates';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -63,22 +63,6 @@ class Joomla_powerController extends FormController
*/
protected $view_list = 'joomla_powers';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Resets the specified Joomla Power.

View File

@ -62,22 +62,6 @@ class LanguageController extends FormController
*/
protected $view_list = 'languages';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

View File

@ -62,22 +62,6 @@ class Language_translationController extends FormController
*/
protected $view_list = 'language_translations';
/**
* Referral value
*
* @var string
* @since 5.0
*/
protected string $ref;
/**
* Referral ID value
*
* @var int
* @since 5.0
*/
protected int $refid;
/**
* Method override to check if you can add a new record.
*

Some files were not shown because too many files have changed in this diff Show More