Release of v4.0.3-alpha2

Fix library save as copy error. #1162. Fix the error when no components exists. #1164. Fix search page error due to File class.
This commit is contained in:
Robot 2024-08-21 21:36:52 +02:00
parent 443a2aac58
commit e297cc88bb
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
14 changed files with 62 additions and 39 deletions

View File

@ -1,4 +1,10 @@
# v4.0.3-alpha1 # v4.0.3-alpha2
- Fix library save as copy error. #1162
- Fix the error when no components exists. #1164
- Fix search page error due to File class.
# v4.0.3-alpha
- Add push option to powers area - Add push option to powers area

View File

@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder"> 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 4.0.3-alpha1 Was Successful! Let us know if anything is not working as expected.</h3></div>'; <h3>Upgrade to Version 4.0.3-alpha2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table. // Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions(); $this->setActionLogsExtensions();

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! 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 (4.0.3-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 (4.0.3-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) > 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*: 20th August, 2024 + *Last Build*: 21st August, 2024
+ *Version*: 4.0.3-alpha1 + *Version*: 4.0.3-alpha2
+ *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*: **828072** + *Line count*: **828095**
+ *Field count*: **2098** + *Field count*: **2098**
+ *File count*: **5739** + *File count*: **5740**
+ *Folder count*: **606** + *Folder count*: **606**
> 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).

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! 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 (4.0.3-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 (4.0.3-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) > 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*: 20th August, 2024 + *Last Build*: 21st August, 2024
+ *Version*: 4.0.3-alpha1 + *Version*: 4.0.3-alpha2
+ *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*: **828072** + *Line count*: **828095**
+ *Field count*: **2098** + *Field count*: **2098**
+ *File count*: **5739** + *File count*: **5740**
+ *Folder count*: **606** + *Folder count*: **606**
> 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).

View File

@ -0,0 +1 @@

View File

@ -445,10 +445,10 @@ class CompilerModel extends ListModel
/** /**
* Get all components in the system * Get all components in the system
* *
* @return array * @return array|null
* @since 3.2.0 * @since 3.2.0
**/ **/
public function getComponents(): array public function getComponents(): ?array
{ {
// Get a db connection. // Get a db connection.
$db = $this->getDbo(); $db = $this->getDbo();
@ -471,9 +471,8 @@ class CompilerModel extends ListModel
$db->setQuery($query); $db->setQuery($query);
// return the result // return the result
return $db->loadObjectList(); return $db->loadObjectList() ?? null;
} }
/** /**
* Get all dynamic content * Get all dynamic content

View File

@ -1176,7 +1176,7 @@ class LibraryModel extends AdminModel
// also check to insure these names are not used again // also check to insure these names are not used again
if (!isset(ComponentbuilderHelper::$libraryNames[$data['id']]) && in_array($data['name'], ComponentbuilderHelper::$libraryNames)) if (!isset(ComponentbuilderHelper::$libraryNames[$data['id']]) && in_array($data['name'], ComponentbuilderHelper::$libraryNames))
{ {
$data['name'] = $this->generateUniqe('name', $data['name']); $data['name'] = $this->generateUnique('name', $data['name']);
} }
// Set the Params Items to data // Set the Params Items to data

View File

@ -352,10 +352,10 @@ class SearchModel extends ItemModel
/** /**
* Get all components in the system * Get all components in the system
* *
* @return array * @return array|null
* @since 3.2.0 * @since 3.2.0
**/ **/
public function getComponents(): array public function getComponents(): ?array
{ {
// Get a db connection. // Get a db connection.
$db = $this->getDbo(); $db = $this->getDbo();
@ -378,7 +378,6 @@ class SearchModel extends ItemModel
$db->setQuery($query); $db->setQuery($query);
// return the result // return the result
return $db->loadObjectList(); return $db->loadObjectList() ?? null;
} }
} }

View File

@ -660,13 +660,13 @@ class HtmlView extends BaseHtmlView
foreach (ComponentbuilderHelper::$uk_components[$class] as $name) foreach (ComponentbuilderHelper::$uk_components[$class] as $name)
{ {
// check if the CSS file exists. // check if the CSS file exists.
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'))
{ {
// load the css. // load the css.
Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']);
} }
// check if the JavaScript file exists. // check if the JavaScript file exists.
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js'))
{ {
// load the js. // load the js.
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']);

View File

@ -167,13 +167,13 @@ class HtmlView extends BaseHtmlView
foreach (ComponentbuilderHelper::$uk_components[$class] as $name) foreach (ComponentbuilderHelper::$uk_components[$class] as $name)
{ {
// check if the CSS file exists. // check if the CSS file exists.
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'))
{ {
// load the css. // load the css.
Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']);
} }
// check if the JavaScript file exists. // check if the JavaScript file exists.
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js'))
{ {
// load the js. // load the js.
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']);

View File

@ -384,13 +384,13 @@ class HtmlView extends BaseHtmlView
foreach (ComponentbuilderHelper::$uk_components[$class] as $name) foreach (ComponentbuilderHelper::$uk_components[$class] as $name)
{ {
// check if the CSS file exists. // check if the CSS file exists.
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css'))
{ {
// load the css. // load the css.
Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']);
} }
// check if the JavaScript file exists. // check if the JavaScript file exists.
if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js'))
{ {
// load the js. // load the js.
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']);

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="4.0" method="upgrade"> <extension type="component" version="4.0" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>20th August, 2024</creationDate> <creationDate>21st August, 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>4.0.3-alpha1</version> <version>4.0.3-alpha2</version>
<description><![CDATA[ <description><![CDATA[
<h1>Component Builder (v.4.0.3-alpha1)</h1> <h1>Component Builder (v.4.0.3-alpha2)</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.

View File

@ -77,10 +77,28 @@
<element>pkg_component_builder</element> <element>pkg_component_builder</element>
<type>package</type> <type>package</type>
<client>site</client> <client>site</client>
<version>4.0.3-alpha1</version> <version>4.0.3-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/v4.0.3-alpha1.zip</downloadurl> <downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.3-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="4\.[01234]"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>pkg_component_builder</element>
<type>package</type>
<client>site</client>
<version>4.0.3-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/v4.0.3-alpha2.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>alpha</tag> <tag>alpha</tag>

View File

@ -6614,7 +6614,7 @@ class Interpretation extends Fields
__LINE__,__CLASS__ __LINE__,__CLASS__
) . " check if the CSS file exists."; ) . " check if the CSS file exists.";
$setter .= PHP_EOL . $tabV . Indent::_(5) $setter .= PHP_EOL . $tabV . Indent::_(5)
. "if (File::exists(JPATH_ROOT.'/media/com_" . "if (@file_exists(JPATH_ROOT.'/media/com_"
. CFactory::_('Config')->component_code_name . CFactory::_('Config')->component_code_name
. "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))";
$setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{";
@ -6630,7 +6630,7 @@ class Interpretation extends Fields
__LINE__,__CLASS__ __LINE__,__CLASS__
) . " check if the JavaScript file exists."; ) . " check if the JavaScript file exists.";
$setter .= PHP_EOL . $tabV . Indent::_(5) $setter .= PHP_EOL . $tabV . Indent::_(5)
. "if (File::exists(JPATH_ROOT.'/media/com_" . "if (@file_exists(JPATH_ROOT.'/media/com_"
. CFactory::_('Config')->component_code_name . CFactory::_('Config')->component_code_name
. "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; . "/uikit-v2/js/components/'.\$name.\$size.'.js'))";
$setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{";
@ -6671,7 +6671,7 @@ class Interpretation extends Fields
__LINE__,__CLASS__ __LINE__,__CLASS__
) . " check if the CSS file exists."; ) . " check if the CSS file exists.";
$setter .= PHP_EOL . $tabV . Indent::_(5) $setter .= PHP_EOL . $tabV . Indent::_(5)
. "if (File::exists(JPATH_ROOT.'/media/com_" . "if (@file_exists(JPATH_ROOT.'/media/com_"
. CFactory::_('Config')->component_code_name . CFactory::_('Config')->component_code_name
. "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))";
$setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{";
@ -6687,7 +6687,7 @@ class Interpretation extends Fields
__LINE__,__CLASS__ __LINE__,__CLASS__
) . " check if the JavaScript file exists."; ) . " check if the JavaScript file exists.";
$setter .= PHP_EOL . $tabV . Indent::_(5) $setter .= PHP_EOL . $tabV . Indent::_(5)
. "if (File::exists(JPATH_ROOT.'/media/com_" . "if (@file_exists(JPATH_ROOT.'/media/com_"
. CFactory::_('Config')->component_code_name . CFactory::_('Config')->component_code_name
. "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; . "/uikit-v2/js/components/'.\$name.\$size.'.js'))";
$setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{";
@ -7154,7 +7154,7 @@ class Interpretation extends Fields
$file $file
)) ))
{ {
if (File::exists($file['path'])) if (@file_exists($file['path']))
{ {
$string = FileHelper::getContent( $string = FileHelper::getContent(
$file['path'] $file['path']
@ -7170,7 +7170,7 @@ class Interpretation extends Fields
{ {
if (ArrayHelper::check($doc)) if (ArrayHelper::check($doc))
{ {
if (File::exists($doc['path'])) if (@file_exists($doc['path']))
{ {
$string $string
= FileHelper::getContent( = FileHelper::getContent(