Release of v3.2.1-alpha2

Add view list and single name fix. Add component code name fix. Add reset list of powers. Fix missing Factory class in plugin. #1102.
This commit is contained in:
Robot 2024-04-09 13:07:08 +02:00
parent 94bc92357e
commit 4c7b4f11a4
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
14 changed files with 142 additions and 42 deletions

View File

@ -1,3 +1,10 @@
# v3.2.1-alpha2
- Add view list and single name fix.
- Add component code name fix.
- Add reset list of powers.
- Fix missing Factory class in plugin. #1102
# v3.2.1-alpha1
- Add power path override option on component level.

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1-alpha1) 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.1-alpha2) 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,13 +144,13 @@ 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*: 6th April, 2024
+ *Version*: 3.2.1-alpha1
+ *Last Build*: 9th April, 2024
+ *Version*: 3.2.1-alpha2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **739628**
+ *Line count*: **739869**
+ *Field count*: **2080**
+ *File count*: **5207**
+ *File count*: **5213**
+ *Folder count*: **459**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1-alpha1) 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.1-alpha2) 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,13 +144,13 @@ 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*: 6th April, 2024
+ *Version*: 3.2.1-alpha1
+ *Last Build*: 9th April, 2024
+ *Version*: 3.2.1-alpha2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **739628**
+ *Line count*: **739869**
+ *Field count*: **2080**
+ *File count*: **5207**
+ *File count*: **5213**
+ *Folder count*: **459**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).

View File

@ -20,6 +20,7 @@ use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
use VDM\Joomla\Utilities\GetHelper;
/**
* Powers Admin Controller
@ -141,7 +142,7 @@ class ComponentbuilderControllerPowers extends AdminController
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks == [])
if ($pks === [])
{
// set error message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'</h1>';
@ -152,21 +153,39 @@ class ComponentbuilderControllerPowers extends AdminController
return false;
}
$status = 'error';
$success = false;
// check if user has the right
$user = Factory::getUser();
if($user->authorise('power.reset', 'com_componentbuilder'))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_THIS_RESET_FEATURE_IS_STILL_UNDER_DEVELOPMENT').'</h1>';
$message .= '<p>'.Text::sprintf('COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_SOON_ANDOR_FOLLOW_THE_PROGRESS_ON_SGITVDMDEVA', '<a href="https://git.vdm.dev/joomla/Component-Builder/issues/984" target="_blank">').'</p>';
$guids = GetHelper::vars('power', $pks, 'id', 'guid');
if (PowerFactory::_('Superpower')->reset($guids))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED') . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
$this->setRedirect($redirect_url, $message);
return true;
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
$this->setRedirect($redirect_url);
return false;
return $success;
}
}

View File

@ -3955,7 +3955,7 @@ COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB="New Tab"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEW_TAB_2="New Tab 2"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NEXT="Next"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NO="No"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo Text::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo Text::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@ -6296,7 +6296,7 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_JOOMLA_MODULE_NEW="A New Joomla Module"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO="No"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NONE="None"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo Text::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo Text::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_DESCRIPTION="<p>All libraries added to modules are added to the component media folder for now</p><p>So over here you are able to manually add HTML code to your model default tmpl.</p>"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_LABEL="Libraries Options"
@ -7119,7 +7119,7 @@ COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL="Name"
COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_LAYOUT_NEW="A New Layout"
COM_COMPONENTBUILDER_LAYOUT_NO="No"
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo Text::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo Text::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@ -7680,7 +7680,6 @@ COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED="Places across JCB
COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)"
COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)"
COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATER="Please check again later"
COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_SOON_ANDOR_FOLLOW_THE_PROGRESS_ON_SGITVDMDEVA="Please check again soon! and/or follow the progress on %sgit.vdm.dev</a>."
COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST="Please first make a selection from the list."
COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION="Please note that this package <b>has no</b> checksum validation!"
COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile."
@ -8365,7 +8364,7 @@ COM_COMPONENTBUILDER_SITE_VIEW_NEW_TAB_2="New Tab 2"
COM_COMPONENTBUILDER_SITE_VIEW_NEXT="Next"
COM_COMPONENTBUILDER_SITE_VIEW_NO="No"
COM_COMPONENTBUILDER_SITE_VIEW_NONE="None"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo Text::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo Text::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION="Use this placeholder in the body <code>[[[SITE_TOOLBAR]]]</code> to add the custom position of the toolbar."
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
@ -8854,7 +8853,7 @@ COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL="Name"
COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_TEMPLATE_NEW="A New Template"
COM_COMPONENTBUILDER_TEMPLATE_NO="No"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo JText::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo JText::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<code>&lt;?php echo Text::_(&apos;Text&apos;); ?&gt;</code><br /><code>&lt;?php echo Text::sprintf(&apos;Hello %s&apos;, $this->user->name); ?&gt;</code><br /><b>Just get UPPERCASE language string:</b><br /><code>&lt;?php echo JustTEXT::_(&apos;Text&apos;); ?&gt;</code>"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the <span id='open-libraries'>libraries</span> for more details."
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@ -8890,6 +8889,7 @@ COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE
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_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_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET="These powers have successfully been reset."
COM_COMPONENTBUILDER_THE_ADMIN_CUSTOM_TABS="The admin custom tabs"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
@ -8955,6 +8955,7 @@ COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVE
COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board 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_RESET_OF_THESE_POWERS_HAS_FAILED="The reset of these powers has failed."
COM_COMPONENTBUILDER_THE_RESET_OF_THIS_POWER_HAS_FAILED="The reset of this power has failed."
COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BSNIPPET_LIBRARY_OR_SNIPPET_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_SNIPPETS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the snippets are case sensitive so if you changed the local <b>names</b> of either or the <b>snippet, library or snippet types</b> in any small way, the system will not be able to connect your local snippets with those in the community repository. So we strongly advice to <b>keep to the community naming</b> to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected."
COM_COMPONENTBUILDER_THE_SEARCH_PROCESS_HAD_AN_ERROR_WITH_TABLE="The search process had an error with table"
@ -8974,7 +8975,6 @@ COM_COMPONENTBUILDER_THIS_CAN_NOT_BE_UNDONE_BYOU_HAVE_BEEN_WARNEDB="This can not
COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT="This may take a while depending on the size of your project."
COM_COMPONENTBUILDER_THIS_PACKAGE_BPASSEDB_THE_CHECKSUM_VALIDATIONBR_BR_SMALLMANUALLY_ALSO_VALIDATE_THAT_THE_CORRECT_CHECKSUM_WAS_USEDSMALLBR_THIS_CHECKSUM_BSB_MUST_BE_THE_SAME_AS_THE_ONE_FOUND_A_S_SA="This package <b>PASSED</b> the checksum validation!<br /><br /><small>Manually also validate that the correct checksum was used.</small><br />This checksum: <b>%s</b> must be the same as the one found @ <a %s %s</a>"
COM_COMPONENTBUILDER_THIS_PACKAGE_HAS_NO_KEY="This package has no key."
COM_COMPONENTBUILDER_THIS_RESET_FEATURE_IS_STILL_UNDER_DEVELOPMENT="This (reset) feature is still under development!"
COM_COMPONENTBUILDER_TITLE="Title"
COM_COMPONENTBUILDER_TO_ADD_SIMPLY_COPY_AND_PAST_THE_SNIPPET_INTO_YOUR_CODE="To add simply copy and past the snippet into your code."
COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED="To add validation to a field if validation is not part of field type properties loaded above. So if you have validation set as a field property this extra property will not be needed."

View File

@ -1496,6 +1496,12 @@ class ComponentbuilderModelAdmin_view extends AdminModel
{
$data['system_name'] = $data['name_single'];
}
// validate that the list and single view name are not the same
if ($data['name_single'] === $data['name_list'])
{
$data['name_list'] .= '_s';
}
// Set the GUID if empty or not valid
if (empty($data['guid']) && $data['id'] > 0)

View File

@ -40,24 +40,21 @@ class JFormFieldCustomfolderlist extends JFormFieldList
protected function getOptions()
{
// get custom folder folder
$localfolder = JComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
$localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
// set the default
$options[] = JHtml::_('select.option', '', JText::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S',$localfolder));
// import all needed classes
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S',$localfolder));
// setup the folder if it does not exist
if (!JFolder::exists($localfolder))
if (!\JFolder::exists($localfolder))
{
JFolder::create($localfolder);
\JFolder::create($localfolder);
}
// now check if there are files in the folder
if ($folders = JFolder::folders($localfolder))
if ($folders = \JFolder::folders($localfolder))
{
$options = array();
$options = [];
foreach ($folders as $folder)
{
$options[] = JHtml::_('select.option', $folder, $folder);
$options[] = Html::_('select.option', $folder, $folder);
}
}
return $options;

View File

@ -29,6 +29,7 @@ use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\FOF\Encrypt\AES;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\String\ComponentCodeNameHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Componentbuilder\Extrusion\Helper\Extrusion;
@ -1407,6 +1408,9 @@ class ComponentbuilderModelJoomla_component extends AdminModel
{
$data['system_name'] = $data['name'];
}
// make sure that the component code name is safe.
$data['name_code'] = ComponentCodeNameHelper::safe($data['name_code']);
// Set the GUID if empty or not valid
if (empty($data['guid']) && $data['id'] > 0)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.10" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>6th April, 2024</creationDate>
<creationDate>9th April, 2024</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl>
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>3.2.1-alpha1</version>
<version>3.2.1-alpha2</version>
<description><![CDATA[
<h1>Component Builder (v.3.2.1-alpha1)</h1>
<h1>Component Builder (v.3.2.1-alpha2)</h1>
<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.

View File

@ -1577,4 +1577,22 @@
<maintainerurl>https://dev.vdm.io</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>pkg_component_builder</element>
<type>package</type>
<client>site</client>
<version>3.2.1-alpha2</version>
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.1-alpha2.zip</downloadurl>
</downloads>
<tags>
<tag>alpha</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://dev.vdm.io</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates>

View File

@ -0,0 +1,48 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 3rd September, 2020
* @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\Utilities\String;
/**
* Control the naming of a component code name
*
* @since 3.2.1
*/
abstract class ComponentCodeNameHelper
{
/**
* Making component code name safe for namespacing.
*
* This function processes a given string to format it according to PHP namespace naming conventions.
* ensures no spaces or underscores are present.
*
* @param string $string The component code name string to make safe
*
* @return string A namespace-safe string on success
* @since 3.2.1
*/
public static function safe(string $string): string
{
// Trim whitespace from both ends of the string
$string = trim($string);
// Replace any sequence of non-alphanumeric characters or underscores with a single underscore
$string = preg_replace('/[^\p{L}\p{N}]+/u', '', $string);
// Ensure the first character is uppercase (useful if the input string started with an invalid character)
$string = ucfirst($string);
// Return the namespace-safe component code name
return $string;
}
}

View File

@ -9627,7 +9627,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">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 3.2.1-alpha1 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 3.2.1-alpha2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Set db if not set already.
if (!isset($db))