diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee97b7b14..bf5549e37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,12 +1,13 @@
-# v3.2.4-alpha2
+# v3.2.4-alpha3
-- Fix library save as copy error. #1162
-- Fix the error when no components exists. #1164
-- Fix search page error due to File class.
+- Fix usergrouplist compiler triggers. #1100
# v3.2.4-alpha
-- Add push option to powers area
+- Add push option to powers area
+- Fix library save as copy error. #1162
+- Fix the error when no components exists. #1164
+- Fix search page error due to File class.
# v3.2.3
diff --git a/README.md b/README.md
index a1b1fdb2e..c59add56b 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
-You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.4-alpha2) 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.4-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 21st August, 2024
-+ *Version*: 3.2.4-alpha2
++ *Last Build*: 23rd August, 2024
++ *Version*: 3.2.4-alpha3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **835591**
++ *Line count*: **840006**
+ *Field count*: **2098**
-+ *File count*: **5678**
-+ *Folder count*: **496**
++ *File count*: **5722**
++ *Folder count*: **500**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
diff --git a/admin/README.txt b/admin/README.txt
index a1b1fdb2e..c59add56b 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
-You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.4-alpha2) 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.4-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 21st August, 2024
-+ *Version*: 3.2.4-alpha2
++ *Last Build*: 23rd August, 2024
++ *Version*: 3.2.4-alpha3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **835591**
++ *Line count*: **840006**
+ *Field count*: **2098**
-+ *File count*: **5678**
-+ *Folder count*: **496**
++ *File count*: **5722**
++ *Folder count*: **500**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
diff --git a/admin/access.xml b/admin/access.xml
index e2e564188..2f2cd418c 100644
--- a/admin/access.xml
+++ b/admin/access.xml
@@ -288,6 +288,9 @@
' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RESET_THIS_JOOMLA_FIELD_TYPE') . '
'; + $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 = '' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '
'; + } + elseif($user->authorise('fieldtype.reset', 'com_componentbuilder')) + { + if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset([$guid])) + { + // set success message + $message = ''.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_RESET').'
'; + $status = 'success'; + $success = true; + } + else + { + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED') . '
'; + } + } + + // set redirect + $redirect_url = Route::_( + 'index.php?option=com_componentbuilder&view=fieldtype' + . $this->getRedirectToItemAppend($id), $success + ); + + $this->setRedirect($redirect_url, $message, $status); + + return $success; + } + + /** + * Pushes the specified Joomla Field Type. + * + * This function performs several checks and operations: + * 1. It verifies the authenticity of the request to prevent request forgery. + * 2. It retrieves the item data posted by the user. + * 3. It checks whether the current user has the necessary permissions to push the Joomla Field Type. + * 4. It validates the presence of the necessary item identifiers (ID and GUID). + * 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Joomla Field Type. + * 6. Depending on the result of the push operation, it sets the appropriate success or error message. + * 7. It redirects the user to a specified URL with the result message and status. + * + * @return bool True on successful push, false on failure. + */ + 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 = '' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_FIELD_TYPE') . '
'; + $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 = '' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_FIELD_TYPE_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '
'; + } + elseif($user->authorise('fieldtype.push', 'com_componentbuilder')) + { + try { + if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items([$guid])) + { + // set success message + $message = ''.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_FIELD_TYPE_HAS_SUCCESSFULLY_BEEN_PUSHED').'
'; + $status = 'success'; + $success = true; + } + else + { + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_FIELD_TYPE_HAS_FAILED') . '
'; + } + } catch (\Exception $e) { + $message = '' . \htmlspecialchars($e->getMessage()) . '
'; + } + } + + // set redirect + $redirect_url = Route::_( + 'index.php?option=com_componentbuilder&view=fieldtype' + . $this->getRedirectToItemAppend($id), $success + ); + + $this->setRedirect($redirect_url, $message, $status); + + return $success; + } + /** * Method override to check if you can add a new record. * diff --git a/admin/controllers/fieldtypes.php b/admin/controllers/fieldtypes.php index aa23f161b..1e82c8809 100644 --- a/admin/controllers/fieldtypes.php +++ b/admin/controllers/fieldtypes.php @@ -20,6 +20,8 @@ use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper; use VDM\Joomla\Utilities\ObjectHelper; +use VDM\Joomla\Componentbuilder\Fieldtype\Factory as FieldtypeFactory; +use VDM\Joomla\Utilities\GetHelper; /** * Fieldtypes Admin Controller @@ -112,4 +114,219 @@ class ComponentbuilderControllerFieldtypes extends AdminController $this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false), $message, 'error'); return; } + + + /** + * Initializes all remote Joomla Field Types and syncs them with the local database. + * + * This function performs several checks and operations: + * 1. It verifies the authenticity of the request to prevent request forgery. + * 2. It checks whether the current user has the necessary permissions to initialize the Joomla Field Types. + * 3. If the user is authorized, it attempts to initialize the remote Joomla Field Types. + * 4. Depending on the result of the initialization operation, it sets the appropriate success or error message. + * 5. It redirects the user to a specified URL with the result message and status. + * + * @return bool True on successful initialization, false on failure. + */ + public function initPowers() + { + // Check for request forgeries + Session::checkToken() or die(Text::_('JINVALID_TOKEN')); + + // check if user has the right + $user = Factory::getUser(); + + // set default error message + $message = '' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_INITIALIZE_JOOMLA_FIELD_TYPES') . '
'; + $status = 'error'; + $success = false; + + if($user->authorise('fieldtype.init', 'com_componentbuilder')) + { + try { + if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->init()) + { + // set success message + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_JOOMLA_FIELD_TYPES_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '
'; + + $status = 'success'; + $success = true; + } + else + { + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_FIELD_TYPES_HAS_FAILED') . '
'; + } + } catch (\Exception $e) { + $message = '' . \htmlspecialchars($e->getMessage()) . '
'; + } + } + + // set redirect + $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success); + $this->setRedirect($redirect_url, $message, $status); + + return $success; + } + + /** + * Resets the selected Joomla Field Types. + * + * This function performs several checks and operations: + * 1. It verifies the authenticity of the request to prevent request forgery. + * 2. It retrieves the IDs of the selected powers from the user input. + * 3. It sanitizes the input by converting the IDs to integers. + * 4. It checks whether any powers have been selected. + * 5. It checks whether the current user has the necessary permissions to reset the selected Joomla Field Types. + * 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla Field Types. + * 7. Depending on the result of the reset operation, it sets the appropriate success or error message. + * 8. It redirects the user to a specified URL with the result message and status. + * + * @return bool True on successful reset, false on failure. + */ + public function resetPowers() + { + // 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 = ''.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'
'; + // set redirect + $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false); + $this->setRedirect($redirect_url, $message, 'error'); + return false; + } + + $status = 'error'; + $success = false; + + // check if user has the right + $user = Factory::getUser(); + if($user->authorise('fieldtype.reset', 'com_componentbuilder')) + { + $guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid'); + + try { + if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Get')->reset($guids)) + { + // set success message + $message = ''.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_RESET').'
'; + $status = 'success'; + $success = true; + } + else + { + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED') . '
'; + } + } catch (\Exception $e) { + $message = '' . \htmlspecialchars($e->getMessage()) . '
'; + } + + // set redirect + $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success); + $this->setRedirect($redirect_url, $message, $status); + + return $success; + } + + // set redirect + $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false); + $this->setRedirect($redirect_url); + return $success; + } + + /** + * Pushes the selected Joomla Field Types. + * + * This function performs several checks and operations: + * 1. It verifies the authenticity of the request to prevent request forgery. + * 2. It retrieves the IDs of the selected powers from the user input. + * 3. It sanitizes the input by converting the IDs to integers. + * 4. It checks whether any powers have been selected. + * 5. It checks whether the current user has the necessary permissions to push the selected Joomla Field Types. + * 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla Field Types. + * 7. Depending on the result of the push operation, it sets the appropriate success or error message. + * 8. It redirects the user to a specified URL with the result message and status. + * + * @return bool True on successful push, false on failure. + */ + 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 = ''.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'
'; + // set redirect + $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false); + $this->setRedirect($redirect_url, $message, 'error'); + return false; + } + + $status = 'error'; + $success = false; + + // check if user has the right + $user = Factory::getUser(); + if($user->authorise('fieldtype.push', 'com_componentbuilder')) + { + $guids = GetHelper::vars('fieldtype', $pks, 'id', 'guid'); + + try { + if (FieldtypeFactory::_('Joomla.Fieldtype.Remote.Set')->items($guids)) + { + // set success message + $message = ''.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_FIELD_TYPES_HAVE_SUCCESSFULLY_BEEN_PUSHED').'
'; + $status = 'success'; + $success = true; + } + else + { + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_FIELD_TYPES_HAS_FAILED') . '
'; + } + } catch (\Exception $e) { + $message = '' . \htmlspecialchars($e->getMessage()) . '
'; + } + + // set redirect + $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', $success); + $this->setRedirect($redirect_url, $message, $status); + + return $success; + } + + // set redirect + $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fieldtypes', false); + $this->setRedirect($redirect_url); + return $success; + } } \ No newline at end of file diff --git a/admin/controllers/joomla_power.php b/admin/controllers/joomla_power.php index ee5a8f33b..d9bc1c965 100644 --- a/admin/controllers/joomla_power.php +++ b/admin/controllers/joomla_power.php @@ -49,15 +49,16 @@ class ComponentbuilderControllerJoomla_power extends FormController parent::__construct($config); } + /** - * Resets the specified Joomla power. + * 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. + * 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. + * 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified Joomla 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. * @@ -93,23 +94,18 @@ class ComponentbuilderControllerJoomla_power extends FormController } elseif($user->authorise('joomla_power.reset', 'com_componentbuilder')) { - try { - if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->reset([$guid])) - { - // set success message - $message = ''.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET').'
'; - $status = 'success'; - $success = true; - } - else - { - $message = '' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '
'; - } - } catch (\Exception $e) { + if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->reset([$guid])) + { + // set success message + $message = ''.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_RESET').'
'; + $status = 'success'; + $success = true; + } + else + { $message = '' . \htmlspecialchars($e->getMessage()) . '
'; + $message .= '' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '
'; } } @@ -125,14 +121,14 @@ class ComponentbuilderControllerJoomla_power extends FormController } /** - * Pushes the specified Joomla power. + * 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. + * 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. + * 5. If the user is authorized and the identifiers are valid, it attempts to push the specified Joomla 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. * diff --git a/admin/controllers/joomla_powers.php b/admin/controllers/joomla_powers.php index f75ea6d91..5b2997b39 100644 --- a/admin/controllers/joomla_powers.php +++ b/admin/controllers/joomla_powers.php @@ -50,13 +50,14 @@ class ComponentbuilderControllerJoomla_powers extends AdminController return parent::getModel($name, $prefix, $config); } + /** - * Initializes all remote Joomla powers and syncs them with the local database. + * 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. + * 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. * @@ -107,15 +108,15 @@ class ComponentbuilderControllerJoomla_powers extends AdminController } /** - * Resets the selected Joomla powers. + * 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. + * 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. * @@ -186,15 +187,15 @@ class ComponentbuilderControllerJoomla_powers extends AdminController } /** - * Pushes the selected Joomla powers. + * 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. + * 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. * diff --git a/admin/controllers/power.php b/admin/controllers/power.php index 79a5d5a22..65cb60120 100644 --- a/admin/controllers/power.php +++ b/admin/controllers/power.php @@ -49,6 +49,7 @@ class ComponentbuilderControllerPower extends FormController parent::__construct($config); } + /** * Resets the specified power. * diff --git a/admin/controllers/powers.php b/admin/controllers/powers.php index 353829c08..f6b4081d1 100644 --- a/admin/controllers/powers.php +++ b/admin/controllers/powers.php @@ -50,13 +50,14 @@ class ComponentbuilderControllerPowers extends AdminController return parent::getModel($name, $prefix, $config); } + /** - * Initializes all remote powers and syncs them with the local database. + * 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. + * 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. * @@ -78,19 +79,24 @@ class ComponentbuilderControllerPowers extends AdminController if($user->authorise('power.init', 'com_componentbuilder')) { - if (PowerFactory::_('Power.Remote.Get')->init()) - { - // set success message - $message = '' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '
'; + try { + if (PowerFactory::_('Power.Remote.Get')->init()) + { + // set success message + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_LOCAL_DATABASE_POWERS_HAS_SUCCESSFULLY_BEEN_SYNCED_WITH_THE_REMOTE_REPOSITORIES') . '
'; - $status = 'success'; - $success = true; - } - else - { + $status = 'success'; + $success = true; + } + else + { + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED') . '
'; + } + } catch (\Exception $e) { $message = '' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_POWERS_HAS_FAILED') . '
'; + $message .= '' . \htmlspecialchars($e->getMessage()) . '
'; } } @@ -102,15 +108,15 @@ class ComponentbuilderControllerPowers extends AdminController } /** - * Resets the selected powers. + * 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. + * 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. * @@ -148,18 +154,23 @@ class ComponentbuilderControllerPowers extends AdminController { $guids = GetHelper::vars('power', $pks, 'id', 'guid'); - if (PowerFactory::_('Power.Remote.Get')->reset($guids)) - { - // set success message - $message = ''.Text::_('COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'
'; - $status = 'success'; - $success = true; - } - else - { + try { + if (PowerFactory::_('Power.Remote.Get')->reset($guids)) + { + // set success message + $message = ''.Text::_('COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'
'; + $status = 'success'; + $success = true; + } + else + { + $message = '' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED') . '
'; + } + } catch (\Exception $e) { $message = '' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED') . '
'; + $message .= '' . \htmlspecialchars($e->getMessage()) . '
'; } // set redirect @@ -176,15 +187,15 @@ class ComponentbuilderControllerPowers extends AdminController } /** - * Pushes the selected powers. + * Pushes 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 push the selected powers. - * 6. If the user is authorized and powers are selected, it attempts to push the selected powers. + * 5. It checks whether the current user has the necessary permissions to push the selected Powers. + * 6. If the user is authorized and powers are selected, it attempts to push the selected 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. * diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 4746e618a..5433c8124 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -3513,12 +3513,12 @@ abstract class ComponentbuilderHelper 'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist', 'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition', 'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules', - 'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup' + 'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup', 'usergrouplist' ), 'plain' => array( 'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha', 'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle', - 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup' + 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup', 'usergrouplist' ), 'option' => array( 'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components', diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 91d19e305..4ca182aa1 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -4227,6 +4227,7 @@ COM_COMPONENTBUILDER_DTEMAILDTDDSDD="File at %s/%s gave the following error!
%s
Joomla Field Type repository at %s/%s gave the following error!
%s
Joomla Power repository at %s/%s gave the following error!
%s
Joomla Power guid:%s not found!
" COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP="Joomla Power guid:%s was found, but missing a namespace value for Joomla %s!
" @@ -7991,6 +7999,7 @@ COM_COMPONENTBUILDER_REPOSITORY_GUID_DESCRIPTION="Globally Unique Identifier" COM_COMPONENTBUILDER_REPOSITORY_GUID_HINT="Auto Generated" COM_COMPONENTBUILDER_REPOSITORY_GUID_LABEL="GUID" COM_COMPONENTBUILDER_REPOSITORY_ID="Id" +COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPE="Joomla Field Type" COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER="Joomla Power" COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_DESC="The last user that modified this Repository." COM_COMPONENTBUILDER_REPOSITORY_MODIFIED_BY_LABEL="Modified By" @@ -8899,7 +8908,6 @@ COM_COMPONENTBUILDER_SUBMENU_TEMPLATES="Templates" COM_COMPONENTBUILDER_SUBMENU_VALIDATION_RULES="Validation Rules" COM_COMPONENTBUILDER_SUCCESS="Success" COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS="Successfully Initialized all Remote Joomla Powers" -COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS="Successfully Initialized all Remote Powers" COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED="Success! The snippet was saved." COM_COMPONENTBUILDER_SUCCESS_THE_SNIPPET_WAS_SAVED_BUT_THE_MODIFIED_DATE_COULD_NOT_BE_ADJUSTED_BR_BR_BTHIS_MEANS_THE_SNIPPETS_WILL_CONTINUE_TO_APPEAR_OUT_OF_DATEB="Success! The snippet was saved. But the modified date could not be adjusted..
+The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml
index 7716d49ba..9ac0afe30 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -187,7 +187,7 @@
File at %s/%s gave the following error! Joomla Field Type repository at %s/%s gave the following error! Joomla Power repository at %s/%s gave the following error! Joomla Power guid:%s not found! Joomla Power guid:%s was found, but missing a namespace value for Joomla %s!Upgrade to Version 3.2.4-alpha2 Was Successful! Let us know if anything is not working as expected.
Upgrade to Version 3.2.4-alpha3 Was Successful! Let us know if anything is not working as expected.
';
// Set db if not set already.
if (!isset($db))
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index 7fc54f692..7074c4f5f 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -3510,12 +3510,12 @@ abstract class ComponentbuilderHelper
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
- 'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
+ 'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup', 'usergrouplist'
),
'plain' => array(
'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha',
'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle',
- 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
+ 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup', 'usergrouplist'
),
'option' => array(
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
diff --git a/site/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini
index 7ed1da60c..3949b5bd5 100644
--- a/site/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/site/language/en-GB/en-GB.com_componentbuilder.ini
@@ -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_PAIDLOCKED="Paid/Locked"
COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="
%s
%s
%s