forked from joomla/Component-Builder
Release of v3.2.2-alpha7
Add push options to Joomla Power. Complete the Joomla Power Init and Reset features. Fix Gitea Contents class functions. Last Alpha release (feature block).
This commit is contained in:
parent
1d417c40f1
commit
9e59163661
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,8 +1,9 @@
|
|||||||
# v3.2.2-alpha6
|
# v3.2.2-alpha7
|
||||||
|
|
||||||
- Add new subform classes
|
- Add push options to Joomla Power
|
||||||
- Fix registry class methods return type
|
- Complete the Joomla Power Init and Reset features
|
||||||
- Update all list and custom fields to use the new layouts
|
- Fix Gitea Contents class functions
|
||||||
|
- Last Alpha release (feature block)
|
||||||
|
|
||||||
# v3.2.2-alpha
|
# v3.2.2-alpha
|
||||||
|
|
||||||
@ -13,6 +14,9 @@
|
|||||||
- Add repositories for better integration with gitea
|
- Add repositories for better integration with gitea
|
||||||
- Refactored the Data classes
|
- Refactored the Data classes
|
||||||
- Add new Data classes
|
- Add new Data classes
|
||||||
|
- Add new subform classes
|
||||||
|
- Fix registry class methods return type
|
||||||
|
- Update all list and custom fields to use the new layouts
|
||||||
|
|
||||||
# v3.2.1
|
# v3.2.1
|
||||||
|
|
||||||
|
10
README.md
10
README.md
@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
|||||||
|
|
||||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
|
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 (3.2.2-alpha6) 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 (3.2.2-alpha7) 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)
|
> 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,13 +144,13 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 28th June, 2024
|
+ *Last Build*: 8th July, 2024
|
||||||
+ *Version*: 3.2.2-alpha6
|
+ *Version*: 3.2.2-alpha7
|
||||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **777954**
|
+ *Line count*: **779561**
|
||||||
+ *Field count*: **2104**
|
+ *Field count*: **2104**
|
||||||
+ *File count*: **5399**
|
+ *File count*: **5409**
|
||||||
+ *Folder count*: **476**
|
+ *Folder count*: **476**
|
||||||
|
|
||||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||||
|
@ -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!
|
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 (3.2.2-alpha6) 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 (3.2.2-alpha7) 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)
|
> 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,13 +144,13 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 28th June, 2024
|
+ *Last Build*: 8th July, 2024
|
||||||
+ *Version*: 3.2.2-alpha6
|
+ *Version*: 3.2.2-alpha7
|
||||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **777954**
|
+ *Line count*: **779561**
|
||||||
+ *Field count*: **2104**
|
+ *Field count*: **2104**
|
||||||
+ *File count*: **5399**
|
+ *File count*: **5409**
|
||||||
+ *Folder count*: **476**
|
+ *Folder count*: **476**
|
||||||
|
|
||||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
|
||||||
|
@ -419,6 +419,7 @@
|
|||||||
<action name="joomla_plugin_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC" />
|
<action name="joomla_plugin_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC" />
|
||||||
<action name="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" />
|
<action name="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" />
|
||||||
<action name="joomla_power.init" title="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC" />
|
<action name="joomla_power.init" title="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC" />
|
||||||
|
<action name="joomla_power.push" title="COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS_DESC" />
|
||||||
<action name="joomla_power.reset" title="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC" />
|
<action name="joomla_power.reset" title="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC" />
|
||||||
<action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" />
|
<action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" />
|
||||||
<action name="joomla_power.batch" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE_DESC" />
|
<action name="joomla_power.batch" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE_DESC" />
|
||||||
|
@ -117,27 +117,40 @@ class ComponentbuilderControllerAdmin_views extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('admin_views.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('admin_views.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -151,6 +164,7 @@ class ComponentbuilderControllerAdmin_views extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -522,27 +522,40 @@ class ComponentbuilderControllerCompiler extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -556,6 +569,7 @@ class ComponentbuilderControllerCompiler extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -117,27 +117,40 @@ class ComponentbuilderControllerCustom_codes extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('custom_codes.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('custom_codes.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -151,6 +164,7 @@ class ComponentbuilderControllerCustom_codes extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -117,27 +117,40 @@ class ComponentbuilderControllerDynamic_gets extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('dynamic_gets.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('dynamic_gets.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -151,6 +164,7 @@ class ComponentbuilderControllerDynamic_gets extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -117,27 +117,40 @@ class ComponentbuilderControllerFields extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('fields.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('fields.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -151,6 +164,7 @@ class ComponentbuilderControllerFields extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -118,27 +118,40 @@ class ComponentbuilderControllerJoomla_components extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('joomla_components.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('joomla_components.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -152,6 +165,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -52,27 +52,40 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('joomla_plugins.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('joomla_plugins.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -86,6 +99,7 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,20 @@ class ComponentbuilderControllerJoomla_power extends FormController
|
|||||||
parent::__construct($config);
|
parent::__construct($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the specified Joomla power.
|
||||||
|
*
|
||||||
|
* 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 power.
|
||||||
|
* 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 power.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
public function resetPowers()
|
public function resetPowers()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
@ -79,6 +93,7 @@ class ComponentbuilderControllerJoomla_power extends FormController
|
|||||||
}
|
}
|
||||||
elseif($user->authorise('power.reset', 'com_componentbuilder'))
|
elseif($user->authorise('power.reset', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if (JoomlaPowerFactory::_('Joomlapower')->reset([$guid]))
|
if (JoomlaPowerFactory::_('Joomlapower')->reset([$guid]))
|
||||||
{
|
{
|
||||||
// set success message
|
// set success message
|
||||||
@ -92,6 +107,85 @@ class ComponentbuilderControllerJoomla_power extends FormController
|
|||||||
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>';
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_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=joomla_power'
|
||||||
|
. $this->getRedirectToItemAppend($id), $success
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes the specified Joomla power.
|
||||||
|
*
|
||||||
|
* 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 power.
|
||||||
|
* 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 power.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
public function pushPowers()
|
||||||
|
{
|
||||||
|
// Check for request forgeries
|
||||||
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
|
// get Item posted
|
||||||
|
$item = $this->input->post->get('jform', array(), 'array');
|
||||||
|
|
||||||
|
// 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_PUSH_THIS_JOOMLA_POWER') . '</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_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
|
||||||
|
}
|
||||||
|
elseif($user->authorise('power.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if (JoomlaPowerFactory::_('Joomla.Power.Repository')->set([$guid]))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_POWER_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_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set redirect
|
// set redirect
|
||||||
|
@ -50,6 +50,18 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
|
|||||||
return parent::getModel($name, $prefix, $config);
|
return parent::getModel($name, $prefix, $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes all remote Joomla powers 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 checks whether the current user has the necessary permissions to initialize the Joomla powers.
|
||||||
|
* 3. If the user is authorized, it attempts to initialize the remote Joomla powers.
|
||||||
|
* 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()
|
public function initPowers()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
@ -66,6 +78,7 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
|
|||||||
|
|
||||||
if($user->authorise('power.init', 'com_componentbuilder'))
|
if($user->authorise('power.init', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if (JoomlaPowerFactory::_('Joomlapower')->init())
|
if (JoomlaPowerFactory::_('Joomlapower')->init())
|
||||||
{
|
{
|
||||||
// set success message
|
// set success message
|
||||||
@ -80,6 +93,10 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
|
|||||||
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
||||||
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED') . '</p>';
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED') . '</p>';
|
||||||
}
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set redirect
|
// set redirect
|
||||||
@ -89,6 +106,21 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
|
|||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the selected Joomla powers.
|
||||||
|
*
|
||||||
|
* 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 powers.
|
||||||
|
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla powers.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
public function resetPowers()
|
public function resetPowers()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
@ -121,6 +153,7 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
|
|||||||
{
|
{
|
||||||
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
|
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
|
||||||
|
|
||||||
|
try {
|
||||||
if (JoomlaPowerFactory::_('Joomlapower')->reset($guids))
|
if (JoomlaPowerFactory::_('Joomlapower')->reset($guids))
|
||||||
{
|
{
|
||||||
// set success message
|
// set success message
|
||||||
@ -134,6 +167,89 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
|
|||||||
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
|
||||||
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>';
|
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_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=joomla_powers', $success);
|
||||||
|
$this->setRedirect($redirect_url, $message, $status);
|
||||||
|
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set redirect
|
||||||
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', false);
|
||||||
|
$this->setRedirect($redirect_url);
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes the selected Joomla powers.
|
||||||
|
*
|
||||||
|
* 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 powers.
|
||||||
|
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla powers.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
public function pushPowers()
|
||||||
|
{
|
||||||
|
// 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=joomla_powers', false);
|
||||||
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$status = 'error';
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
// check if user has the right
|
||||||
|
$user = Factory::getUser();
|
||||||
|
if($user->authorise('power.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (JoomlaPowerFactory::_('Joomla.Power.Repository')->set($guids))
|
||||||
|
{
|
||||||
|
// set success message
|
||||||
|
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
|
||||||
|
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_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_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
|
||||||
|
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
// set redirect
|
// set redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', $success);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', $success);
|
||||||
|
@ -49,6 +49,20 @@ class ComponentbuilderControllerPower extends FormController
|
|||||||
parent::__construct($config);
|
parent::__construct($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the specified power.
|
||||||
|
*
|
||||||
|
* 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 power.
|
||||||
|
* 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 power.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
public function resetPowers()
|
public function resetPowers()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
|
@ -54,27 +54,40 @@ class ComponentbuilderControllerPowers extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('powers.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('powers.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -88,10 +101,23 @@ class ComponentbuilderControllerPowers extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes all remote powers 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 checks whether the current user has the necessary permissions to initialize the powers.
|
||||||
|
* 3. If the user is authorized, it attempts to initialize the remote powers.
|
||||||
|
* 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()
|
public function initPowers()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
@ -131,6 +157,21 @@ class ComponentbuilderControllerPowers extends AdminController
|
|||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the selected powers.
|
||||||
|
*
|
||||||
|
* 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 powers.
|
||||||
|
* 6. If the user is authorized and powers are selected, it attempts to reset the selected powers.
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
public function resetPowers()
|
public function resetPowers()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
|
@ -117,27 +117,40 @@ class ComponentbuilderControllerValidation_rules extends AdminController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the Expansion
|
* Runs the expansion module.
|
||||||
*
|
*
|
||||||
* @return void
|
* 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 run the expansion module.
|
||||||
|
* 3. If the user is authorized, it attempts to run the expansion via an API call.
|
||||||
|
* 4. Depending on the result of the expansion 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 expansion, false on failure.
|
||||||
*/
|
*/
|
||||||
public function runExpansion()
|
public function runExpansion()
|
||||||
{
|
{
|
||||||
// Check for request forgeries
|
// Check for request forgeries
|
||||||
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN'));
|
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||||
|
|
||||||
// check if user has the right
|
// check if user has the right
|
||||||
$user = Factory::getUser();
|
$user = Factory::getUser();
|
||||||
|
|
||||||
// set page redirect
|
// set page redirect
|
||||||
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=validation_rules', false);
|
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=validation_rules', false);
|
||||||
|
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
|
||||||
|
|
||||||
// check if this user has the right to run expansion
|
// check if this user has the right to run expansion
|
||||||
if($user->authorise('validation_rules.run_expansion', 'com_componentbuilder'))
|
if($user->authorise('validation_rules.run_expansion', 'com_componentbuilder'))
|
||||||
{
|
{
|
||||||
// set massage
|
// set massage
|
||||||
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
|
||||||
|
|
||||||
// run expansion via API
|
// run expansion via API
|
||||||
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
|
||||||
|
|
||||||
// is there a message returned
|
// is there a message returned
|
||||||
if (!is_numeric($result) && StringHelper::check($result))
|
if (!is_numeric($result) && StringHelper::check($result))
|
||||||
{
|
{
|
||||||
@ -151,6 +164,7 @@ class ComponentbuilderControllerValidation_rules extends AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setRedirect($redirect_url, $message, 'error');
|
$this->setRedirect($redirect_url, $message, 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -6912,6 +6912,8 @@ COM_COMPONENTBUILDER_JOOMLA_POWER_NEW="A New Joomla Power"
|
|||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_ORDERING_LABEL="Ordering"
|
COM_COMPONENTBUILDER_JOOMLA_POWER_ORDERING_LABEL="Ordering"
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_PERMISSION="Permissions"
|
COM_COMPONENTBUILDER_JOOMLA_POWER_PERMISSION="Permissions"
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_JOOMLA_POWER_PUBLISHING="Publishing"
|
||||||
|
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS="Joomla Power Push Button Access"
|
||||||
|
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access"
|
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access"
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Power to customise the alias."
|
COM_COMPONENTBUILDER_JOOMLA_POWER_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Joomla Power to customise the alias."
|
||||||
@ -7659,6 +7661,7 @@ COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the
|
|||||||
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
|
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
|
||||||
COM_COMPONENTBUILDER_PERMISSION_DENIED="Permission Denied!"
|
COM_COMPONENTBUILDER_PERMISSION_DENIED="Permission Denied!"
|
||||||
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
|
COM_COMPONENTBUILDER_PJOOMLA_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Joomla Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="<p>Joomla Power <b>guid:%s</b> not found!</p>"
|
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="<p>Joomla Power <b>guid:%s</b> not found!</p>"
|
||||||
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP="<p>Joomla Power <b>guid:%s</b> was found, but missing a namespace value for Joomla %s!</p>"
|
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP="<p>Joomla Power <b>guid:%s</b> was found, but missing a namespace value for Joomla %s!</p>"
|
||||||
COM_COMPONENTBUILDER_PLACEHOLDER="Placeholder"
|
COM_COMPONENTBUILDER_PLACEHOLDER="Placeholder"
|
||||||
@ -7948,6 +7951,8 @@ COM_COMPONENTBUILDER_PS_NAMING_MISMATCH_ERROR_SPPTHE_S_NAME_IS_BSB_AND_THE_ENDIN
|
|||||||
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
||||||
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
||||||
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
|
COM_COMPONENTBUILDER_PUBLISHING="Publishing"
|
||||||
|
COM_COMPONENTBUILDER_PUSH="Push"
|
||||||
|
COM_COMPONENTBUILDER_PUSH_FAILED="Push Failed!"
|
||||||
COM_COMPONENTBUILDER_README="Readme"
|
COM_COMPONENTBUILDER_README="Readme"
|
||||||
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
|
COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component"
|
||||||
COM_COMPONENTBUILDER_REFRESH="Refresh"
|
COM_COMPONENTBUILDER_REFRESH="Refresh"
|
||||||
@ -9072,6 +9077,7 @@ COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an e
|
|||||||
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_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="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>."
|
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>."
|
||||||
|
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED="These Joomla powers have successfully been pushed."
|
||||||
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla powers have successfully been reset."
|
COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These Joomla powers have successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
|
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
|
||||||
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
|
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
|
||||||
@ -9122,6 +9128,7 @@ COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_Y
|
|||||||
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
|
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
|
||||||
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED="The initialization of this Joomla powers has failed."
|
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED="The initialization of this Joomla powers has failed."
|
||||||
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED="The initialization of this powers has failed."
|
COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED="The initialization of this powers has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED="The Joomla power has successfully been pushed."
|
||||||
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla power has successfully been reset."
|
COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The Joomla power has successfully been reset."
|
||||||
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
|
COM_COMPONENTBUILDER_THE_KEY_OF_THIS_PACKAGE="The key of this package."
|
||||||
COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields"
|
COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields"
|
||||||
@ -9142,6 +9149,8 @@ COM_COMPONENTBUILDER_THE_POWER_HAS_SUCCESSFULLY_BEEN_RESET="The power has succes
|
|||||||
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!"
|
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="The private key field could not be loaded for <b>%s</b> server!"
|
||||||
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
|
COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for <b>%s</b> server!"
|
||||||
COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board is loading"
|
COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board is loading"
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The push of these Joomla powers has failed."
|
||||||
|
COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWER_HAS_FAILED="The push of this Joomla power has failed."
|
||||||
COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading"
|
COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading"
|
||||||
COM_COMPONENTBUILDER_THE_REPLACE_PROCESS_HAD_AN_ERROR_WITH_TABLE="The replace process had an error with table"
|
COM_COMPONENTBUILDER_THE_REPLACE_PROCESS_HAD_AN_ERROR_WITH_TABLE="The replace process had an error with table"
|
||||||
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The reset of these Joomla powers has failed."
|
COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED="The reset of these Joomla powers has failed."
|
||||||
@ -9402,6 +9411,7 @@ COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THESE_EXTENSIONS="You
|
|||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_COMPONENT="You do not have permission to install the component!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_COMPONENT="You do not have permission to install the component!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_MODULE="You do not have permission to install the module!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_MODULE="You do not have permission to install the module!"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_PLUGIN="You do not have permission to install the plugin!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INSTALL_THE_PLUGIN="You do not have permission to install the plugin!"
|
||||||
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_POWER="You do not have permission to push this Joomla power"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_POWER="You do not have permission to reset this Joomla power"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_POWER="You do not have permission to reset this Joomla power"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_POWER="You do not have permission to reset this power"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_POWER="You do not have permission to reset this power"
|
||||||
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE="You do not have permission to run the expansion module!"
|
COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE="You do not have permission to run the expansion module!"
|
||||||
|
@ -850,6 +850,8 @@ COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU="Joomla Powers Submenu"
|
|||||||
COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of joomla power"
|
COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of joomla power"
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS="Joomla Power Init Button Access"
|
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS="Joomla Power Init Button Access"
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
|
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
|
||||||
|
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS="Joomla Power Push Button Access"
|
||||||
|
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access"
|
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access"
|
||||||
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
|
||||||
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
|
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
|
||||||
|
@ -86,10 +86,18 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -235,10 +235,18 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -90,10 +90,18 @@ class ComponentbuilderModelClass_extends extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -94,10 +94,18 @@ class ComponentbuilderModelClass_method extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -91,10 +91,18 @@ class ComponentbuilderModelClass_property extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -94,10 +94,18 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -95,10 +95,18 @@ class ComponentbuilderModelComponent_router extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -152,10 +152,18 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -106,10 +106,18 @@ class ComponentbuilderModelCustom_code extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -146,10 +146,18 @@ class ComponentbuilderModelDynamic_get extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -139,10 +139,18 @@ class ComponentbuilderModelField extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -113,10 +113,18 @@ class ComponentbuilderModelFieldtype extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -270,10 +270,18 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -176,10 +176,18 @@ class ComponentbuilderModelJoomla_module extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -153,10 +153,18 @@ class ComponentbuilderModelJoomla_plugin extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -86,10 +86,18 @@ class ComponentbuilderModelLanguage_translation extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -108,10 +108,18 @@ class ComponentbuilderModelLayout extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -124,10 +124,18 @@ class ComponentbuilderModelLibrary extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -88,10 +88,18 @@ class ComponentbuilderModelPlaceholder extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -134,10 +134,18 @@ class ComponentbuilderModelPower extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -155,10 +155,18 @@ class ComponentbuilderModelSite_view extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -108,10 +108,18 @@ class ComponentbuilderModelTemplate extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
@ -91,10 +91,18 @@ class ComponentbuilderModelValidation_rule extends AdminModel
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get VDM internal session key
|
* Retrieves or generates a Vast Development Method (VDM) key for the current item.
|
||||||
*
|
*
|
||||||
* @return string the session key
|
* This function performs the following operations:
|
||||||
|
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
|
||||||
|
* 2. Determines the item ID based on the presence of a specific argument.
|
||||||
|
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
|
||||||
|
* 4. If a VDM key is not found, it generates a new random VDM key.
|
||||||
|
* 5. Stores the VDM key and associates it with the item ID in a helper method.
|
||||||
|
* 6. Optionally, stores return and GUID values if available.
|
||||||
|
* 7. Returns the VDM key.
|
||||||
*
|
*
|
||||||
|
* @return string The VDM key for the current item.
|
||||||
*/
|
*/
|
||||||
public function getVDM()
|
public function getVDM()
|
||||||
{
|
{
|
||||||
|
File diff suppressed because one or more lines are too long
@ -163,6 +163,11 @@ class ComponentbuilderViewJoomla_power extends HtmlView
|
|||||||
// add Reset button.
|
// add Reset button.
|
||||||
ToolbarHelper::custom('joomla_power.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
ToolbarHelper::custom('joomla_power.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
||||||
}
|
}
|
||||||
|
if ($this->canDo->get('joomla_power.push'))
|
||||||
|
{
|
||||||
|
// add Push button.
|
||||||
|
ToolbarHelper::custom('joomla_power.pushPowers', 'share custom-button-pushpowers', '', 'COM_COMPONENTBUILDER_PUSH', false);
|
||||||
|
}
|
||||||
ToolbarHelper::cancel('joomla_power.cancel', 'JTOOLBAR_CLOSE');
|
ToolbarHelper::cancel('joomla_power.cancel', 'JTOOLBAR_CLOSE');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,6 +159,11 @@ class ComponentbuilderViewJoomla_powers extends HtmlView
|
|||||||
// add Reset button.
|
// add Reset button.
|
||||||
ToolbarHelper::custom('joomla_powers.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
ToolbarHelper::custom('joomla_powers.resetPowers', 'joomla custom-button-resetpowers', '', 'COM_COMPONENTBUILDER_RESET', false);
|
||||||
}
|
}
|
||||||
|
if ($this->user->authorise('joomla_power.push', 'com_componentbuilder'))
|
||||||
|
{
|
||||||
|
// add Push button.
|
||||||
|
ToolbarHelper::custom('joomla_powers.pushPowers', 'share custom-button-pushpowers', '', 'COM_COMPONENTBUILDER_PUSH', false);
|
||||||
|
}
|
||||||
|
|
||||||
// set help url for this view if found
|
// set help url for this view if found
|
||||||
$this->help_url = ComponentbuilderHelper::getHelpUrl('joomla_powers');
|
$this->help_url = ComponentbuilderHelper::getHelpUrl('joomla_powers');
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="component" version="3.10" method="upgrade">
|
<extension type="component" version="3.10" method="upgrade">
|
||||||
<name>COM_COMPONENTBUILDER</name>
|
<name>COM_COMPONENTBUILDER</name>
|
||||||
<creationDate>28th June, 2024</creationDate>
|
<creationDate>8th July, 2024</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>joomla@vdm.io</authorEmail>
|
<authorEmail>joomla@vdm.io</authorEmail>
|
||||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||||
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
|
||||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||||
<version>3.2.2-alpha6</version>
|
<version>3.2.2-alpha7</version>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
<h1>Component Builder (v.3.2.2-alpha6)</h1>
|
<h1>Component Builder (v.3.2.2-alpha7)</h1>
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
<version>3.2.2-alpha</version>
|
<version>3.2.2-alpha</version>
|
||||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||||
<downloads>
|
<downloads>
|
||||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha6.zip</downloadurl>
|
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha7.zip</downloadurl>
|
||||||
</downloads>
|
</downloads>
|
||||||
<tags>
|
<tags>
|
||||||
<tag>alpha</tag>
|
<tag>alpha</tag>
|
||||||
@ -166,10 +166,10 @@
|
|||||||
<element>pkg_component_builder</element>
|
<element>pkg_component_builder</element>
|
||||||
<type>package</type>
|
<type>package</type>
|
||||||
<client>site</client>
|
<client>site</client>
|
||||||
<version>3.2.2-alpha6</version>
|
<version>3.2.2-alpha7</version>
|
||||||
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
|
||||||
<downloads>
|
<downloads>
|
||||||
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha6.zip</downloadurl>
|
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha7.zip</downloadurl>
|
||||||
</downloads>
|
</downloads>
|
||||||
<tags>
|
<tags>
|
||||||
<tag>alpha</tag>
|
<tag>alpha</tag>
|
||||||
|
@ -64,10 +64,10 @@ class Contents extends Api
|
|||||||
* @param string|null $ref Optional. The name of the commit/branch/tag.
|
* @param string|null $ref Optional. The name of the commit/branch/tag.
|
||||||
* Default the repository's default branch (usually master).
|
* Default the repository's default branch (usually master).
|
||||||
*
|
*
|
||||||
* @return object|null
|
* @return null|array|object
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
**/
|
**/
|
||||||
public function metadata(string $owner, string $repo, string $filepath, ?string $ref = null): ?object
|
public function metadata(string $owner, string $repo, string $filepath, ?string $ref = null): null|array|object
|
||||||
{
|
{
|
||||||
// Build the request path.
|
// Build the request path.
|
||||||
$path = "/repos/{$owner}/{$repo}/contents/{$filepath}";
|
$path = "/repos/{$owner}/{$repo}/contents/{$filepath}";
|
||||||
@ -100,7 +100,7 @@ class Contents extends Api
|
|||||||
* @param string|null $authorEmail The author's email.
|
* @param string|null $authorEmail The author's email.
|
||||||
* @param string|null $committerName The committer's name.
|
* @param string|null $committerName The committer's name.
|
||||||
* @param string|null $committerEmail The committer's email.
|
* @param string|null $committerEmail The committer's email.
|
||||||
* @param bool|null $newBranch Whether to create a new branch. Defaults to false.
|
* @param string|null $newBranch Whether to create a new branch. Defaults to null.
|
||||||
* @param string|null $authorDate The author's date.
|
* @param string|null $authorDate The author's date.
|
||||||
* @param string|null $committerDate The committer's date.
|
* @param string|null $committerDate The committer's date.
|
||||||
* @param bool|null $signoff Add a Signed-off-by trailer. Defaults to null.
|
* @param bool|null $signoff Add a Signed-off-by trailer. Defaults to null.
|
||||||
@ -119,7 +119,7 @@ class Contents extends Api
|
|||||||
?string $authorEmail = null,
|
?string $authorEmail = null,
|
||||||
?string $committerName = null,
|
?string $committerName = null,
|
||||||
?string $committerEmail = null,
|
?string $committerEmail = null,
|
||||||
?bool $newBranch = false,
|
?string $newBranch = null,
|
||||||
?string $authorDate = null,
|
?string $authorDate = null,
|
||||||
?string $committerDate = null,
|
?string $committerDate = null,
|
||||||
?bool $signoff = null
|
?bool $signoff = null
|
||||||
|
@ -29,7 +29,7 @@ final class Http extends JoomlaHttp
|
|||||||
* @var string
|
* @var string
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
*/
|
*/
|
||||||
protected string $_token_; // to avoid collusions (but allow swapping)
|
protected string $_token_; // to avoid collisions (but allow swapping)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -52,7 +52,7 @@ final class Http extends JoomlaHttp
|
|||||||
// add the token if given
|
// add the token if given
|
||||||
if (is_string($token))
|
if (is_string($token))
|
||||||
{
|
{
|
||||||
$config['headers']['Authorization'] = $token;
|
$config['headers']['Authorization'] = 'token ' . $token;
|
||||||
$this->_token_ = $token;
|
$this->_token_ = $token;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ final class Http extends JoomlaHttp
|
|||||||
);
|
);
|
||||||
|
|
||||||
// add the token
|
// add the token
|
||||||
$headers['Authorization'] = $token;
|
$headers['Authorization'] = 'token ' . $token;
|
||||||
$this->_token_ = $token;
|
$this->_token_ = $token;
|
||||||
|
|
||||||
$this->setOption('headers', $headers);
|
$this->setOption('headers', $headers);
|
||||||
|
@ -55,6 +55,14 @@ abstract class Grep implements GrepInterface
|
|||||||
**/
|
**/
|
||||||
protected array $order = ['local', 'remote'];
|
protected array $order = ['local', 'remote'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The target branch field name ['read_branch', 'write_branch']
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.2.2
|
||||||
|
**/
|
||||||
|
protected string $branch_field = 'read_branch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gitea Repository Contents
|
* Gitea Repository Contents
|
||||||
*
|
*
|
||||||
@ -120,6 +128,19 @@ abstract class Grep implements GrepInterface
|
|||||||
return empty($powers) ? null : array_unique($powers);
|
return empty($powers) ? null : array_unique($powers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the branch field
|
||||||
|
*
|
||||||
|
* @param string $field The global unique id of the power
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function setBranchField(string $field): void
|
||||||
|
{
|
||||||
|
$this->branch_field = $field;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a power
|
* Get a power
|
||||||
*
|
*
|
||||||
@ -196,15 +217,12 @@ abstract class Grep implements GrepInterface
|
|||||||
$path->path = trim($path->organisation) . '/' . trim($path->repository);
|
$path->path = trim($path->organisation) . '/' . trim($path->repository);
|
||||||
|
|
||||||
// update the branch
|
// update the branch
|
||||||
if ($path->read_branch === 'default' || empty($path->read_branch))
|
$branch_field = $this->getBranchField();
|
||||||
{
|
$branch = $path->{$branch_field} ?? null;
|
||||||
$path->read_branch = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// only update the write branch if set
|
if ($branch === 'default' || empty($branch))
|
||||||
if (isset($path->write_branch) && ($path->write_branch === 'default' || empty($path->write_branch)))
|
|
||||||
{
|
{
|
||||||
$path->write_branch = null;
|
$path->{$branch_field} = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set local path
|
// set local path
|
||||||
@ -220,5 +238,16 @@ abstract class Grep implements GrepInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the branch field
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function getBranchField(): string
|
||||||
|
{
|
||||||
|
return $this->branch_field;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ use Joomla\Registry\Registry as JoomlaRegistry;
|
|||||||
use Joomla\CMS\Factory as JoomlaFactory;
|
use Joomla\CMS\Factory as JoomlaFactory;
|
||||||
use VDM\Joomla\Utilities\GetHelper;
|
use VDM\Joomla\Utilities\GetHelper;
|
||||||
use VDM\Joomla\Utilities\StringHelper;
|
use VDM\Joomla\Utilities\StringHelper;
|
||||||
|
use VDM\Joomla\Componentbuilder\Utilities\RepoHelper;
|
||||||
use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
use VDM\Joomla\Componentbuilder\Abstraction\BaseConfig;
|
||||||
|
|
||||||
|
|
||||||
@ -113,21 +114,6 @@ class Config extends BaseConfig
|
|||||||
return $repos;
|
return $repos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get Joomla power push repo
|
|
||||||
*
|
|
||||||
* @return object|null The push repository on Gitea
|
|
||||||
* @since 3.2.1
|
|
||||||
*/
|
|
||||||
protected function getJoomlapowerspushrepo(): ?object
|
|
||||||
{
|
|
||||||
// some defaults repos we need by JCB
|
|
||||||
if (!empty($this->gitea_username))
|
|
||||||
{
|
|
||||||
return (object) ['organisation' => $this->gitea_username, 'repository' => 'joomla-powers', 'read_branch' => 'master'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get joomla power approved paths
|
* Get joomla power approved paths
|
||||||
*
|
*
|
||||||
@ -136,7 +122,26 @@ class Config extends BaseConfig
|
|||||||
*/
|
*/
|
||||||
protected function getApprovedjoomlapaths(): array
|
protected function getApprovedjoomlapaths(): array
|
||||||
{
|
{
|
||||||
return array_values($this->joomla_powers_init_repos);
|
// some defaults repos we need by JCB
|
||||||
|
$approved = $this->joomla_powers_init_repos;
|
||||||
|
|
||||||
|
$paths = RepoHelper::get(2); // Joomla Power = 2
|
||||||
|
|
||||||
|
if ($paths !== null)
|
||||||
|
{
|
||||||
|
foreach ($paths as $path)
|
||||||
|
{
|
||||||
|
$owner = $path->organisation ?? null;
|
||||||
|
$repo = $path->repository ?? null;
|
||||||
|
if ($owner !== null && $repo !== null)
|
||||||
|
{
|
||||||
|
// we make sure to get only the objects
|
||||||
|
$approved = ["{$owner}.{$repo}" => $path] + $approved;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_values($approved);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,20 +54,36 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$path->index = null;
|
||||||
|
|
||||||
|
// update the branch
|
||||||
|
$branch_field = $this->getBranchField();
|
||||||
|
$branch = $path->{$branch_field} ?? $path->read_branch ?? 'master';
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
||||||
$path->index = $this->contents->get($path->organisation, $path->repository, 'joomla-powers.json', $path->read_branch);
|
$source = $this->contents->metadata($path->organisation, $path->repository, 'src', $branch);
|
||||||
|
if ($source && is_array($source))
|
||||||
|
{
|
||||||
|
$path->index = new \stdClass();
|
||||||
|
foreach ($source as $index)
|
||||||
|
{
|
||||||
|
if (is_object($index) && isset($index->name))
|
||||||
|
{
|
||||||
|
$path->index->{$index->name} = $index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->contents->reset_();
|
$this->contents->reset_();
|
||||||
}
|
}
|
||||||
catch (\Exception $e)
|
catch (\Exception $e)
|
||||||
{
|
{
|
||||||
$this->app->enqueueMessage(
|
$this->app->enqueueMessage(
|
||||||
Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
|
Text::sprintf('COM_COMPONENTBUILDER_PJOOMLA_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
|
||||||
'Error'
|
'Error'
|
||||||
);
|
);
|
||||||
|
|
||||||
$path->index = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +98,7 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
protected function searchRemote(string $guid): ?object
|
protected function searchRemote(string $guid): ?object
|
||||||
{
|
{
|
||||||
// we can only search if we have paths
|
// we can only search if we have paths
|
||||||
if ($this->path && $this->paths)
|
if (is_array($this->paths))
|
||||||
{
|
{
|
||||||
foreach ($this->paths as $path)
|
foreach ($this->paths as $path)
|
||||||
{
|
{
|
||||||
@ -100,7 +116,7 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a remote power
|
* Get a remote joomla power
|
||||||
*
|
*
|
||||||
* @param object $path The repository path details
|
* @param object $path The repository path details
|
||||||
* @param string $guid The global unique id of the power
|
* @param string $guid The global unique id of the power
|
||||||
@ -111,21 +127,41 @@ final class Grep extends ExtendingGrep implements GrepInterface
|
|||||||
protected function getRemote(object $path, string $guid): ?object
|
protected function getRemote(object $path, string $guid): ?object
|
||||||
{
|
{
|
||||||
$power = null;
|
$power = null;
|
||||||
if (empty($path->index->{$guid}->settings))
|
if (empty($path->index->{$guid}->path))
|
||||||
{
|
{
|
||||||
return $power;
|
return $power;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the branch name
|
||||||
|
$branch_field = $this->getBranchField();
|
||||||
|
$branch = $path->{$branch_field} ?? $path->read_branch ?? 'master';
|
||||||
|
|
||||||
// get the settings
|
// get the settings
|
||||||
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
$this->contents->load_($path->base ?? null, $path->token ?? null);
|
||||||
if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->settings, $path->read_branch)) !== null &&
|
if (($power = $this->loadRemoteFile($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null &&
|
||||||
isset($power->guid))
|
isset($power->guid))
|
||||||
{
|
{
|
||||||
// set the git details in params
|
// set the git details in params
|
||||||
$power->params = (object) [
|
$path_guid = $path->guid ?? null;
|
||||||
'source' => ['guid' => $path->guid ?? null]
|
if ($path_guid !== null)
|
||||||
|
{
|
||||||
|
if (($meta = $this->contents->metadata($path->organisation, $path->repository, $path->index->{$guid}->path . '/item.json', $branch)) !== null &&
|
||||||
|
isset($meta->sha))
|
||||||
|
{
|
||||||
|
if (isset($power->params) && is_object($power->params) &&
|
||||||
|
isset($power->params->source) && is_array($power->params->source))
|
||||||
|
{
|
||||||
|
$power->params->source[$path_guid] = $meta->sha;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$power->params = (object)[
|
||||||
|
'source' => [$path_guid => $meta->sha]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->contents->reset_();
|
$this->contents->reset_();
|
||||||
|
|
||||||
return $power;
|
return $power;
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Component.Builder
|
||||||
|
*
|
||||||
|
* @created 4th September, 2022
|
||||||
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||||
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||||
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace VDM\Joomla\Componentbuilder\JoomlaPower;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Data\Repository as ExtendingRepository;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set JoomlaPower based on global unique ids to remote repository
|
||||||
|
*
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
final class Repository extends ExtendingRepository
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Table Name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
protected string $table = 'joomla_power';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The item map
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected array $map = [
|
||||||
|
'system_name' => 'system_name',
|
||||||
|
'settings' => 'settings',
|
||||||
|
'guid' => 'guid',
|
||||||
|
'description' => 'description'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -18,6 +18,7 @@ use VDM\Joomla\Componentbuilder\JoomlaPower\Config;
|
|||||||
use VDM\Joomla\Componentbuilder\Table;
|
use VDM\Joomla\Componentbuilder\Table;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Grep;
|
||||||
use VDM\Joomla\Componentbuilder\JoomlaPower\Super as Superpower;
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Super as Superpower;
|
||||||
|
use VDM\Joomla\Componentbuilder\JoomlaPower\Repository;
|
||||||
use VDM\Joomla\Componentbuilder\Compiler\Power\Parser;
|
use VDM\Joomla\Componentbuilder\Compiler\Power\Parser;
|
||||||
|
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ class JoomlaPower implements ServiceProviderInterface
|
|||||||
* @param Container $container The DI container.
|
* @param Container $container The DI container.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
public function register(Container $container)
|
public function register(Container $container)
|
||||||
{
|
{
|
||||||
@ -50,6 +51,9 @@ class JoomlaPower implements ServiceProviderInterface
|
|||||||
$container->alias(Superpower::class, 'Joomlapower')
|
$container->alias(Superpower::class, 'Joomlapower')
|
||||||
->share('Joomlapower', [$this, 'getSuperpower'], true);
|
->share('Joomlapower', [$this, 'getSuperpower'], true);
|
||||||
|
|
||||||
|
$container->alias(Repository::class, 'Joomla.Power.Repository')
|
||||||
|
->share('Joomla.Power.Repository', [$this, 'getRepository'], true);
|
||||||
|
|
||||||
$container->alias(Parser::class, 'Power.Parser')
|
$container->alias(Parser::class, 'Power.Parser')
|
||||||
->share('Power.Parser', [$this, 'getParser'], true);
|
->share('Power.Parser', [$this, 'getParser'], true);
|
||||||
}
|
}
|
||||||
@ -60,7 +64,7 @@ class JoomlaPower implements ServiceProviderInterface
|
|||||||
* @param Container $container The DI container.
|
* @param Container $container The DI container.
|
||||||
*
|
*
|
||||||
* @return Config
|
* @return Config
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
public function getConfig(Container $container): Config
|
public function getConfig(Container $container): Config
|
||||||
{
|
{
|
||||||
@ -73,7 +77,7 @@ class JoomlaPower implements ServiceProviderInterface
|
|||||||
* @param Container $container The DI container.
|
* @param Container $container The DI container.
|
||||||
*
|
*
|
||||||
* @return Table
|
* @return Table
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
public function getTable(Container $container): Table
|
public function getTable(Container $container): Table
|
||||||
{
|
{
|
||||||
@ -86,7 +90,7 @@ class JoomlaPower implements ServiceProviderInterface
|
|||||||
* @param Container $container The DI container.
|
* @param Container $container The DI container.
|
||||||
*
|
*
|
||||||
* @return Grep
|
* @return Grep
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
public function getGrep(Container $container): Grep
|
public function getGrep(Container $container): Grep
|
||||||
{
|
{
|
||||||
@ -102,7 +106,7 @@ class JoomlaPower implements ServiceProviderInterface
|
|||||||
* @param Container $container The DI container.
|
* @param Container $container The DI container.
|
||||||
*
|
*
|
||||||
* @return Superpower
|
* @return Superpower
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
public function getSuperpower(Container $container): Superpower
|
public function getSuperpower(Container $container): Superpower
|
||||||
{
|
{
|
||||||
@ -112,13 +116,31 @@ class JoomlaPower implements ServiceProviderInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Repository Class.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return Repository
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function getRepository(Container $container): Repository
|
||||||
|
{
|
||||||
|
return new Repository(
|
||||||
|
$container->get('Config')->approved_joomla_paths,
|
||||||
|
$container->get('Joomla.Power.Grep'),
|
||||||
|
$container->get('Data.Items'),
|
||||||
|
$container->get('Gitea.Repository.Contents')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get The Parser Class.
|
* Get The Parser Class.
|
||||||
*
|
*
|
||||||
* @param Container $container The DI container.
|
* @param Container $container The DI container.
|
||||||
*
|
*
|
||||||
* @return Parser
|
* @return Parser
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
public function getParser(Container $container): Parser
|
public function getParser(Container $container): Parser
|
||||||
{
|
{
|
||||||
|
@ -135,26 +135,6 @@ class Config extends BaseConfig
|
|||||||
return $repos;
|
return $repos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get super power push repo
|
|
||||||
*
|
|
||||||
* @return object|null The push repository on Gitea
|
|
||||||
* @since 3.2.1
|
|
||||||
*/
|
|
||||||
protected function getSuperpowerspushrepo(): ?object
|
|
||||||
{
|
|
||||||
if ($this->gitea_username !== null)
|
|
||||||
{
|
|
||||||
return (object) [
|
|
||||||
'organisation' => $this->gitea_username,
|
|
||||||
'repository' => 'super-powers',
|
|
||||||
'read_branch' => 'master'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get temporary path
|
* get temporary path
|
||||||
*
|
*
|
||||||
|
386
libraries/vendor_jcb/VDM.Joomla/src/Data/Repository.php
Normal file
386
libraries/vendor_jcb/VDM.Joomla/src/Data/Repository.php
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Component.Builder
|
||||||
|
*
|
||||||
|
* @created 4th September, 2022
|
||||||
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||||
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||||
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace VDM\Joomla\Data;
|
||||||
|
|
||||||
|
|
||||||
|
use VDM\Joomla\Interfaces\GrepInterface as Grep;
|
||||||
|
use VDM\Joomla\Interfaces\Data\ItemsInterface as Items;
|
||||||
|
use VDM\Joomla\Gitea\Repository\Contents as Git;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set data based on global unique ids to remote repository
|
||||||
|
*
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
class Repository
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The GrepInterface Class.
|
||||||
|
*
|
||||||
|
* @var Grep
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected Grep $grep;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ItemsInterface Class.
|
||||||
|
*
|
||||||
|
* @var Items
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected Items $items;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Contents Class.
|
||||||
|
*
|
||||||
|
* @var Git
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected Git $git;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All active repos
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.2.0
|
||||||
|
**/
|
||||||
|
public array $repos;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Table Name
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.2.1
|
||||||
|
*/
|
||||||
|
protected string $table;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The item map
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected array $map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param array $repos The active repos
|
||||||
|
* @param Grep $grep The GrepInterface Class.
|
||||||
|
* @param Items $items The ItemsInterface Class.
|
||||||
|
* @param Git $git The Contents Class.
|
||||||
|
* @param string|null $table The table name.
|
||||||
|
*
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function __construct(array $repos, Grep $grep, Items $items, Git $git, ?string $table = null)
|
||||||
|
{
|
||||||
|
$this->repos = $repos;
|
||||||
|
$this->grep = $grep;
|
||||||
|
$this->items = $items;
|
||||||
|
$this->git = $git;
|
||||||
|
if ($table !== null)
|
||||||
|
{
|
||||||
|
$this->table = $table;
|
||||||
|
}
|
||||||
|
// set the branch to writing
|
||||||
|
$this->grep->setBranchField('write_branch');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the current active table
|
||||||
|
*
|
||||||
|
* @param string $table The table that should be active
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function table(string $table): self
|
||||||
|
{
|
||||||
|
$this->table = $table;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set items
|
||||||
|
*
|
||||||
|
* @param array $guids The global unique id of the item
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @throws \Exception
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function set(array $guids): bool
|
||||||
|
{
|
||||||
|
if (($items = $this->getLocalItems($guids)) === null)
|
||||||
|
{
|
||||||
|
throw new \Exception("At least one valid local [Joomla Power] must exist for the push function to operate correctly.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$this->canWrite())
|
||||||
|
{
|
||||||
|
throw new \Exception("At least one [Joomla Power] content repository must be configured with a [Write Branch] value in the repositories area for the push function to operate correctly.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// update the existing found
|
||||||
|
if (($existing_items = $this->getRepoItems($guids)) !== [])
|
||||||
|
{
|
||||||
|
foreach ($existing_items as $e_guid => $item)
|
||||||
|
{
|
||||||
|
if (isset($items[$e_guid]))
|
||||||
|
{
|
||||||
|
$this->updateItem($items[$e_guid], $item);
|
||||||
|
unset($items[$e_guid]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// create the new items
|
||||||
|
foreach ($items as $item)
|
||||||
|
{
|
||||||
|
$this->createItem($item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current active table
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function getTable(): string
|
||||||
|
{
|
||||||
|
return $this->table;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get items
|
||||||
|
*
|
||||||
|
* @param array $guids The global unique id of the item
|
||||||
|
*
|
||||||
|
* @return array|null
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function getLocalItems(array $guids): ?array
|
||||||
|
{
|
||||||
|
$items = $this->fetchLocalItems($guids);
|
||||||
|
|
||||||
|
if ($items === null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->mapItems($items);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch items from the database
|
||||||
|
*
|
||||||
|
* @param array $guids The global unique id of the item
|
||||||
|
*
|
||||||
|
* @return array|null
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function fetchLocalItems(array $guids): ?array
|
||||||
|
{
|
||||||
|
return $this->items->table($this->table)->get($guids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map items to their properties
|
||||||
|
*
|
||||||
|
* @param array $items The items fetched from the database
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function mapItems(array $items): array
|
||||||
|
{
|
||||||
|
$bucket = [];
|
||||||
|
|
||||||
|
foreach ($items as $item)
|
||||||
|
{
|
||||||
|
if (!isset($item->guid))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$bucket[$item->guid] = $this->mapItem($item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $bucket;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map a single item to its properties
|
||||||
|
*
|
||||||
|
* @param object $item The item to be mapped
|
||||||
|
*
|
||||||
|
* @return object
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function mapItem(object $item): object
|
||||||
|
{
|
||||||
|
$power = [];
|
||||||
|
|
||||||
|
foreach ($this->map as $key => $map)
|
||||||
|
{
|
||||||
|
$power[$key] = $item->{$map} ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (object) $power;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get existing items
|
||||||
|
*
|
||||||
|
* @param array $guids The global unique id of the item
|
||||||
|
*
|
||||||
|
* @return array|null
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function getRepoItems(array $guids): ?array
|
||||||
|
{
|
||||||
|
$bucket = [];
|
||||||
|
foreach ($guids as $guid)
|
||||||
|
{
|
||||||
|
if (($item = $this->grep->get($guid)) !== null)
|
||||||
|
{
|
||||||
|
$bucket[$guid] = (object) $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $bucket ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check that we have an active repo towards which we can write data
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function canWrite(): bool
|
||||||
|
{
|
||||||
|
foreach ($this->repos as $repo)
|
||||||
|
{
|
||||||
|
if (!empty($repo->write_branch) && $repo->write_branch !== 'default')
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if two objects are equal by comparing their JSON representations.
|
||||||
|
*
|
||||||
|
* This method converts both input objects to JSON strings and compares these strings.
|
||||||
|
* If the JSON strings are identical, the objects are considered equal.
|
||||||
|
*
|
||||||
|
* @param object $obj1 The first object to compare.
|
||||||
|
* @param object $obj2 The second object to compare.
|
||||||
|
*
|
||||||
|
* @return bool True if the objects are equal, false otherwise.
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function areObjectsEqual(object $obj1, object $obj2): bool
|
||||||
|
{
|
||||||
|
// Convert both objects to JSON strings
|
||||||
|
$json1 = json_encode($obj1);
|
||||||
|
$json2 = json_encode($obj2);
|
||||||
|
|
||||||
|
// Compare the JSON strings
|
||||||
|
return $json1 === $json2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update an existing item (if changed)
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
* @param object $existing
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function updateItem(object $item, object $existing): void
|
||||||
|
{
|
||||||
|
if (isset($existing->params->source) && is_array($existing->params->source))
|
||||||
|
{
|
||||||
|
// get the source values
|
||||||
|
$source = $existing->params->source;
|
||||||
|
|
||||||
|
// make sure there was a change
|
||||||
|
$existing = $this->mapItem($existing);
|
||||||
|
if ($this->areObjectsEqual($item, $existing))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->repos as $repo)
|
||||||
|
{
|
||||||
|
if (isset($source[$repo->guid]))
|
||||||
|
{
|
||||||
|
$this->git->load_($repo->base ?? null, $repo->token ?? null);
|
||||||
|
$this->git->update(
|
||||||
|
$repo->organisation, // The owner name.
|
||||||
|
$repo->repository, // The repository name.
|
||||||
|
'src/' . $item->guid . '/item.json', // The file path.
|
||||||
|
json_encode($item, JSON_PRETTY_PRINT), // The file content.
|
||||||
|
'Update ' . $item->system_name, // The commit message.
|
||||||
|
$source[$repo->guid], // The blob SHA of the old file.
|
||||||
|
$repo->write_branch // The branch name.
|
||||||
|
);
|
||||||
|
$this->git->reset_();
|
||||||
|
|
||||||
|
// only update in the first found repo
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create a new item
|
||||||
|
*
|
||||||
|
* @param object $item
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
protected function createItem(object $item): void
|
||||||
|
{
|
||||||
|
foreach ($this->repos as $repo)
|
||||||
|
{
|
||||||
|
if (!empty($repo->write_branch) && $repo->write_branch !== 'default')
|
||||||
|
{
|
||||||
|
$this->git->load_($repo->base ?? null, $repo->token ?? null);
|
||||||
|
$this->git->create(
|
||||||
|
$repo->organisation, // The owner name.
|
||||||
|
$repo->repository, // The repository name.
|
||||||
|
'src/' . $item->guid . '/item.json', // The file path.
|
||||||
|
json_encode($item, JSON_PRETTY_PRINT), // The file content.
|
||||||
|
'Create ' . $item->system_name, // The commit message.
|
||||||
|
$repo->write_branch // The branch name.
|
||||||
|
);
|
||||||
|
$this->git->reset_();
|
||||||
|
// only create in the first found repo
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,6 +27,16 @@ interface GrepInterface
|
|||||||
*/
|
*/
|
||||||
public function getRemotePowersGuid(): ?array;
|
public function getRemotePowersGuid(): ?array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the branch field
|
||||||
|
*
|
||||||
|
* @param string $field The global unique id of the power
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function setBranchField(string $field): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a power
|
* Get a power
|
||||||
*
|
*
|
||||||
|
@ -7143,7 +7143,7 @@ class Com_ComponentbuilderInstallerScript
|
|||||||
{
|
{
|
||||||
$rule_length = $db->loadResult();
|
$rule_length = $db->loadResult();
|
||||||
// Check the size of the rules column
|
// Check the size of the rules column
|
||||||
if ($rule_length <= 103680)
|
if ($rule_length <= 103840)
|
||||||
{
|
{
|
||||||
// Fix the assets table rules column size
|
// Fix the assets table rules column size
|
||||||
$fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to MEDIUMTEXT by JCB';";
|
$fix_rules_size = "ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control. Enlarged to MEDIUMTEXT by JCB';";
|
||||||
@ -9979,7 +9979,7 @@ class Com_ComponentbuilderInstallerScript
|
|||||||
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
|
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"/>
|
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||||
</a>
|
</a>
|
||||||
<h3>Upgrade to Version 3.2.2-alpha6 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
<h3>Upgrade to Version 3.2.2-alpha7 Was Successful! Let us know if anything is not working as expected.</h3></div>';
|
||||||
|
|
||||||
// Set db if not set already.
|
// Set db if not set already.
|
||||||
if (!isset($db))
|
if (!isset($db))
|
||||||
|
@ -100,6 +100,7 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not
|
|||||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
|
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
|
||||||
COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
|
COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
|
||||||
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
|
COM_COMPONENTBUILDER_PJOOMLA_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Joomla Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||||
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="<p>Joomla Power <b>guid:%s</b> not found!</p>"
|
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="<p>Joomla Power <b>guid:%s</b> not found!</p>"
|
||||||
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP="<p>Joomla Power <b>guid:%s</b> was found, but missing a namespace value for Joomla %s!</p>"
|
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP="<p>Joomla Power <b>guid:%s</b> was found, but missing a namespace value for Joomla %s!</p>"
|
||||||
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_THIS_ERROR_USUALLY_HAPPENS_IF_IT_IS_A_NEW_COMPONENT_BECAUSE_WE_NEED_A_COMPONENT_ID_TO_DO_THIS_BUILD_WITH_YOUR_SQL_DUMP="Please try again, this error usually happens if it is a new component, because we need a component ID to do this build with your sql dump."
|
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_THIS_ERROR_USUALLY_HAPPENS_IF_IT_IS_A_NEW_COMPONENT_BECAUSE_WE_NEED_A_COMPONENT_ID_TO_DO_THIS_BUILD_WITH_YOUR_SQL_DUMP="Please try again, this error usually happens if it is a new component, because we need a component ID to do this build with your sql dump."
|
||||||
|
Loading…
Reference in New Issue
Block a user