forked from joomla/Component-Builder
Update master #1
@ -1,3 +1,8 @@
|
||||
# v3.1.27
|
||||
|
||||
- Adds better remote repository management for the super power features.
|
||||
- Fixes #1014 so that powers are added to components.
|
||||
|
||||
# v3.1.26
|
||||
|
||||
- Fixed changelog direction so newest changes is listed at top of the file.
|
||||
|
12
README.md
12
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.1.26) 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.1.27) 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*: 18th October, 2023
|
||||
+ *Version*: 3.1.26
|
||||
+ *Last Build*: 20th October, 2023
|
||||
+ *Version*: 3.1.27
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **634483**
|
||||
+ *Field count*: **2045**
|
||||
+ *Line count*: **634936**
|
||||
+ *Field count*: **2047**
|
||||
+ *File count*: **4750**
|
||||
+ *Folder count*: **449**
|
||||
+ *Folder count*: **448**
|
||||
|
||||
> 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)
|
||||
|
@ -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.1.26) 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.1.27) 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*: 18th October, 2023
|
||||
+ *Version*: 3.1.26
|
||||
+ *Last Build*: 20th October, 2023
|
||||
+ *Version*: 3.1.27
|
||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **634483**
|
||||
+ *Field count*: **2045**
|
||||
+ *Line count*: **634936**
|
||||
+ *Field count*: **2047**
|
||||
+ *File count*: **4750**
|
||||
+ *Folder count*: **449**
|
||||
+ *Folder count*: **448**
|
||||
|
||||
> 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)
|
||||
|
@ -872,6 +872,23 @@
|
||||
autocomplete="off"
|
||||
showon="add_custom_gitea_url:2"
|
||||
/>
|
||||
<!-- Super_powers_core_organisation_note Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="super_powers_core_organisation_note" label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_DESCRIPTION" heading="h4" class="alert alert-success super_powers_core_organisation_note" showon="add_custom_gitea_url:2" />
|
||||
<!-- Super_powers_core_organisation Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="super_powers_core_organisation"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_LABEL"
|
||||
size="70"
|
||||
maxlength="150"
|
||||
default="joomla"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_DESCRIPTION"
|
||||
class="text_area"
|
||||
filter="WORD"
|
||||
hint="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_HINT"
|
||||
autocomplete="on"
|
||||
showon="add_custom_gitea_url:2"
|
||||
/>
|
||||
<!-- Super_powers_core Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
|
@ -1144,6 +1144,22 @@ class Get
|
||||
));
|
||||
}
|
||||
|
||||
// FOR THE HELPER CLASS POWERS
|
||||
// Utilities String Helper
|
||||
CFactory::_('Power')->get('1f28cb53-60d9-4db1-b517-3c7dc6b429ef', 1);
|
||||
// Utilities Array Helper
|
||||
CFactory::_('Power')->get('0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a', 1);
|
||||
// Utilities Component Helper
|
||||
CFactory::_('Power')->get('640b5352-fb09-425f-a26e-cd44eda03f15', 1);
|
||||
// Utilities Object Helper
|
||||
CFactory::_('Power')->get('91004529-94a9-4590-b842-e7c6b624ecf5', 1);
|
||||
// Utilities GetHelper
|
||||
CFactory::_('Power')->get('db87c339-5bb6-4291-a7ef-2c48ea1b06bc', 1);
|
||||
// Utilities Json Helper
|
||||
CFactory::_('Power')->get(' 4b225c51-d293-48e4-b3f6-5136cf5c3f18', 1);
|
||||
// Utilities FormHelper
|
||||
CFactory::_('Power')->get('1198aecf-84c6-45d2-aea8-d531aa4afdfa', 1);
|
||||
|
||||
// load powers *+*+*+*+*+*+*+*
|
||||
CFactory::_('Power')->load($this->linkedPowers);
|
||||
// load any other super powers that was found
|
||||
|
@ -3513,6 +3513,11 @@ COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_LABEL="Sub-form Layouts"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWER="Super Power"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_HINT="joomla/super-powers"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_LABEL="Super Powers Core"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_DESCRIPTION="Set the organisation on your Gitea system where all the JCB core super powers repositories can be found."
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_HINT="joomla"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_LABEL="Gitea Core Organisation"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_DESCRIPTION="<p>The organisation on your Gitea system where all the core super powers repositories can be found.<br />Example: https://your.gitea.system.com/<b>[core-org]</b>/super-powers</p><small>These are the core super powers:</small><ul><li>https://git.vdm.dev/joomla/super-powers (required)</li><li>https://git.vdm.dev/joomla/phpseclib (encryption)</li><li>https://git.vdm.dev/joomla/fof (legacy encryption)</li><li>https://git.vdm.dev/joomla/gitea (Easy Gitea classes)</li><li>https://git.vdm.dev/joomla/openai (Easy Openai classes)</li><li>https://git.vdm.dev/joomla/minify (not usually required)</li><li>https://git.vdm.dev/joomla/psr (not usually required)</li><li>https://git.vdm.dev/joomla/jcb-compiler (not usually required)</li><li>https://git.vdm.dev/joomla/jcb-packager (not usually required)</li><li>https://git.vdm.dev/joomla/search (not usually required)</li></ul><p>You <b>should mirror</b> theses repositories to your Gitea system. Depending on your extension setup JCB may need these repositories to effectively build your extension.</p>"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_LABEL="Gitea Core Organisation"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_DOCUMENTATION_DESCRIPTION="Switch to show or hide the documentation of super powers."
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_DOCUMENTATION_LABEL="Documentation"
|
||||
COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_REPOSITORIES_DESCRIPTION="Do you have your own repositories on https://git.vdm.dev/ with super powers?"
|
||||
@ -7390,7 +7395,7 @@ COM_COMPONENTBUILDER_PATH_CODESCODE="Path: <code>%s</code>"
|
||||
COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE_BR_S_S="Path to the zipped package is: <code>%s</code> <br />%s %s"
|
||||
COM_COMPONENTBUILDER_PERMISSIONS="Permissions"
|
||||
COM_COMPONENTBUILDER_PERMISSION_DENIED="Permission Denied!"
|
||||
COM_COMPONENTBUILDER_PFILE_AT_BGITEAREMOTESB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>gitea.remote/%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_PLACEHOLDER="Placeholder"
|
||||
COM_COMPONENTBUILDER_PLACEHOLDERS="Placeholders"
|
||||
COM_COMPONENTBUILDER_PLACEHOLDERS_ACCESS="Placeholders Access"
|
||||
@ -7664,7 +7669,7 @@ COM_COMPONENTBUILDER_PROPERTY="Property"
|
||||
COM_COMPONENTBUILDER_PROPERTY_ALREADY_SELECTED_TRY_ANOTHER="Property already selected, try another."
|
||||
COM_COMPONENTBUILDER_PROPERTY_NAME="Property Name"
|
||||
COM_COMPONENTBUILDER_PROPERTY_VALUE="Property Value"
|
||||
COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BGITVDMDEVSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Super Power</b> repository at <b>git.vdm.dev/%s</b> gave the following error!<br />%s</p>"
|
||||
COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Super Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||
COM_COMPONENTBUILDER_PS_NAMING_MISMATCH_ERROR_SPPTHE_S_NAME_IS_BSB_AND_THE_ENDING_FILE_NAME_IN_THE_NAMESPACE_IS_BSB_THIS_IS_BAD_CONVENTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPA_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP="<p>%s naming mismatch error (%s)</p><p>The %s name is <b>%s</b> and the ending file name in the namespace is <b>%s</b>. This is bad convention, please see <a href=%s >psr-4</a> for more info.</p><p><a href=%s>Click here</a> to fix this issue.</p>"
|
||||
COM_COMPONENTBUILDER_PUBLIC_ACCESS="Public Access"
|
||||
COM_COMPONENTBUILDER_PUBLISHED="Published"
|
||||
|
1
admin/sql/updates/mysql/3.1.26.sql
Normal file
1
admin/sql/updates/mysql/3.1.26.sql
Normal file
@ -0,0 +1 @@
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="4" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>18th October, 2023</creationDate>
|
||||
<creationDate>20th October, 2023</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.1.26</version>
|
||||
<version>3.1.27</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.3.1.26)</h1>
|
||||
<h1>Component Builder (v.3.1.27)</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.
|
||||
|
||||
|
@ -1199,4 +1199,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.1.27</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.1.27.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>stable</tag>
|
||||
</tags>
|
||||
<maintainer>Llewellyn van der Merwe</maintainer>
|
||||
<maintainerurl>https://dev.vdm.io</maintainerurl>
|
||||
<targetplatform name="joomla" version="3.*"/>
|
||||
</update>
|
||||
</updates>
|
@ -86,5 +86,15 @@ abstract class Api
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the API url
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function api()
|
||||
{
|
||||
return $this->uri->api();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class Jcb implements ServiceProviderInterface
|
||||
$gitea_url = Helper::getParams('com_componentbuilder')->get('custom_gitea_url');
|
||||
|
||||
// only load this if we have a custom URL set
|
||||
if ($add_gitea_url == 2 && is_string($gitea_url) && strpos($gitea_url, 'http') !== false)
|
||||
if ($add_gitea_url == 2 && !empty($gitea_url) && strpos($gitea_url, 'http') !== false)
|
||||
{
|
||||
return new Uri($gitea_url);
|
||||
}
|
||||
|
@ -73,6 +73,5 @@ final class Http extends JoomlaHttp
|
||||
|
||||
$this->setOption('headers', $headers);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -135,6 +135,5 @@ final class Uri
|
||||
{
|
||||
$this->version = $version;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,73 @@ class Config extends BaseConfig
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get super power core organisation
|
||||
*
|
||||
* @return string The super power core organisation
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getSuperpowerscoreorganisation(): string
|
||||
{
|
||||
// the VDM default organisation is [joomla]
|
||||
$organisation = 'joomla';
|
||||
|
||||
if ($this->add_custom_gitea_url == 2)
|
||||
{
|
||||
return $this->params->get('super_powers_core_organisation', $organisation);
|
||||
}
|
||||
|
||||
return $organisation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get super power core repos
|
||||
*
|
||||
* @return array The core repositories on Gitea
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getSuperpowerscorerepos(): array
|
||||
{
|
||||
// some defaults repos we need by JCB
|
||||
$repos = [];
|
||||
|
||||
// only add custom init with custom gitea
|
||||
$paths = null;
|
||||
if ($this->add_custom_gitea_url == 2)
|
||||
{
|
||||
$paths = $this->params->get('super_powers_core_repos');
|
||||
}
|
||||
|
||||
if (!empty($paths) && is_array($paths))
|
||||
{
|
||||
foreach ($paths as $path)
|
||||
{
|
||||
$owner = $path->owner ?? null;
|
||||
$repo = $path->repo ?? null;
|
||||
if ($owner !== null && $repo !== null)
|
||||
{
|
||||
// we make sure to get only the objects
|
||||
$repos = ["{$owner}.{$repo}" => $path] + $repos;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$repos[$this->super_powers_core_organisation . '.super-powers'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'super-powers', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.jcb-compiler'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'jcb-compiler', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.jcb-packager'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'jcb-packager', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.phpseclib'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'phpseclib', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.search'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'search', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.gitea'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'gitea', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.openai'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'openai', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.minify'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'minify', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.psr'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'psr', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.fof'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'fof', 'branch' => 'master'];
|
||||
}
|
||||
|
||||
return $repos;
|
||||
}
|
||||
|
||||
/**
|
||||
* get add contributors switch
|
||||
*
|
||||
@ -630,20 +697,11 @@ class Config extends BaseConfig
|
||||
protected function getApprovedpaths(): array
|
||||
{
|
||||
// some defaults repos we need by JCB
|
||||
$approved = [];
|
||||
$approved['joomla.super-powers'] = (object) ['owner' => 'joomla', 'repo' => 'super-powers', 'branch' => 'master'];
|
||||
$approved['joomla.jcb-compiler'] = (object) ['owner' => 'joomla', 'repo' => 'jcb-compiler', 'branch' => 'master'];
|
||||
$approved['joomla.phpseclib'] = (object) ['owner' => 'joomla', 'repo' => 'phpseclib', 'branch' => 'master'];
|
||||
$approved['joomla.search'] = (object) ['owner' => 'joomla', 'repo' => 'search', 'branch' => 'master'];
|
||||
$approved['joomla.gitea'] = (object) ['owner' => 'joomla', 'repo' => 'gitea', 'branch' => 'master'];
|
||||
$approved['joomla.openai'] = (object) ['owner' => 'joomla', 'repo' => 'openai', 'branch' => 'master'];
|
||||
$approved['joomla.minify'] = (object) ['owner' => 'joomla', 'repo' => 'minify', 'branch' => 'master'];
|
||||
$approved['joomla.psr'] = (object) ['owner' => 'joomla', 'repo' => 'psr', 'branch' => 'master'];
|
||||
$approved['joomla.fof'] = (object) ['owner' => 'joomla', 'repo' => 'fof', 'branch' => 'master'];
|
||||
$approved = $this->super_powers_core_repos;
|
||||
|
||||
if (!$this->add_own_powers)
|
||||
{
|
||||
return $approved;
|
||||
return array_values($approved);
|
||||
}
|
||||
|
||||
$paths = $this->params->get('approved_paths');
|
||||
@ -762,6 +820,7 @@ class Config extends BaseConfig
|
||||
{
|
||||
// get posted value
|
||||
$value = $this->input->post->get('add_placeholders', 2, 'INT');
|
||||
|
||||
// get global value
|
||||
if ($value > 1)
|
||||
{
|
||||
@ -780,6 +839,7 @@ class Config extends BaseConfig
|
||||
{
|
||||
// get posted value
|
||||
$value = $this->input->post->get('powers', 2, 'INT');
|
||||
|
||||
// get global value
|
||||
if ($value > 1)
|
||||
{
|
||||
@ -946,6 +1006,5 @@ class Config extends BaseConfig
|
||||
{
|
||||
return 2; // default is version 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,66 @@ class Config extends BaseConfig
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get super power core organisation
|
||||
*
|
||||
* @return string The super power core organisation
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getSuperpowerscoreorganisation(): string
|
||||
{
|
||||
// the VDM default organisation is [joomla]
|
||||
$organisation = 'joomla';
|
||||
|
||||
if ($this->add_custom_gitea_url == 2)
|
||||
{
|
||||
return $this->params->get('super_powers_core_organisation', $organisation);
|
||||
}
|
||||
|
||||
return $organisation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get super power init repos
|
||||
*
|
||||
* @return array The init repositories on Gitea
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getSuperpowersinitrepos(): array
|
||||
{
|
||||
// some defaults repos we need by JCB
|
||||
$repos = [];
|
||||
|
||||
// only add custom init with custom gitea
|
||||
$paths = null;
|
||||
if ($this->add_custom_gitea_url == 2)
|
||||
{
|
||||
$paths = $this->params->get('super_powers_init_repos');
|
||||
}
|
||||
|
||||
if (!empty($paths) && is_array($paths))
|
||||
{
|
||||
foreach ($paths as $path)
|
||||
{
|
||||
$owner = $path->owner ?? null;
|
||||
$repo = $path->repo ?? null;
|
||||
if ($owner !== null && $repo !== null)
|
||||
{
|
||||
// we make sure to get only the objects
|
||||
$repos = ["{$owner}.{$repo}" => $path] + $repos;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$repos[$this->super_powers_core_organisation . '.super-powers'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'super-powers', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.gitea'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'gitea', 'branch' => 'master'];
|
||||
$repos[$this->super_powers_core_organisation . '.openai'] = (object) ['owner' => $this->super_powers_core_organisation, 'repo' => 'openai', 'branch' => 'master'];
|
||||
}
|
||||
|
||||
return $repos;
|
||||
}
|
||||
|
||||
/**
|
||||
* get temporary path
|
||||
*
|
||||
@ -177,10 +237,7 @@ class Config extends BaseConfig
|
||||
protected function getApprovedpaths(): array
|
||||
{
|
||||
// some defaults repos we need by JCB
|
||||
$approved = [];
|
||||
$approved['joomla.super-powers'] = (object) ['owner' => 'joomla', 'repo' => 'super-powers', 'branch' => 'master'];
|
||||
$approved['joomla.gitea'] = (object) ['owner' => 'joomla', 'repo' => 'gitea', 'branch' => 'master'];
|
||||
$approved['joomla.openai'] = (object) ['owner' => 'joomla', 'repo' => 'openai', 'branch' => 'master'];
|
||||
$approved = $this->super_powers_init_repos;
|
||||
|
||||
if (!$this->add_own_powers)
|
||||
{
|
||||
|
@ -347,7 +347,7 @@ final class Grep
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BGITVDMDEVSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $path->path, $e->getMessage()),
|
||||
Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
|
||||
'Error'
|
||||
);
|
||||
|
||||
@ -375,7 +375,7 @@ final class Grep
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
Text::sprintf('COM_COMPONENTBUILDER_PFILE_AT_BGITEAREMOTESB_GAVE_THE_FOLLOWING_ERRORBR_SP', $path, $e->getMessage()),
|
||||
Text::sprintf('COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path, $e->getMessage()),
|
||||
'Error'
|
||||
);
|
||||
|
||||
|
@ -57,7 +57,7 @@ class Gitea implements ServiceProviderInterface
|
||||
$gitea_url = $container->get('Config')->get('custom_gitea_url');
|
||||
|
||||
// only load this if we have a custom URL set
|
||||
if ($add_gitea_url == 2 && is_string($gitea_url) && strpos($gitea_url, 'http') !== false)
|
||||
if ($add_gitea_url == 2 && !empty($gitea_url) && strpos($gitea_url, 'http') !== false)
|
||||
{
|
||||
return new Uri($gitea_url);
|
||||
}
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace VDM\Joomla\Utilities\String;
|
||||
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
|
||||
@ -98,6 +97,5 @@ abstract class FieldHelper
|
||||
// use the default (original behavior/convention)
|
||||
return StringHelper::safe($string);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -6746,7 +6746,7 @@ class com_componentbuilderInstallerScript
|
||||
$query = $db->getQuery(true);
|
||||
// Field to update.
|
||||
$fields = array(
|
||||
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","approved_paths":"default","add_custom_gitea_url":"1","custom_gitea_url":"https://git.vdm.dev","super_powers_core":"joomla/super-powers","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","import_guid_only":"1","export_language_strings":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}'),
|
||||
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"joomla@vdm.io","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","set_browser_storage":"1","storage_time_to_live":"global","super_powers_documentation":"0","powers_repository":"0","super_powers_repositories":"0","approved_paths":"default","add_custom_gitea_url":"1","custom_gitea_url":"https://git.vdm.dev","super_powers_core_organisation":"joomla","super_powers_core":"joomla/super-powers","builder_gif_size":"480-272","compiler_plugin":["componentbuilderactionlogcompiler","componentbuilderfieldorderingcompiler","componentbuilderheaderscompiler","componentbuilderpowersautoloadercompiler","componentbuilderprivacycompiler"],"add_menu_prefix":"1","menu_prefix":"»","minify":"0","language":"en-GB","percentagelanguageadd":"30","assets_table_fix":"2","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","import_guid_only":"1","export_language_strings":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","add_jquery_framework":"1","uikit_load":"1","uikit_min":"","uikit_style":""}'),
|
||||
);
|
||||
// Condition.
|
||||
$conditions = array(
|
||||
@ -9437,7 +9437,7 @@ class com_componentbuilderInstallerScript
|
||||
echo '<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.1.26 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
<h3>Upgrade to Version 3.1.27 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
|
||||
// Set db if not set already.
|
||||
if (!isset($db))
|
||||
|
@ -82,11 +82,11 @@ COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS="Package Owner Details"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_DETAILS_NOT_FOUND="Package owner details not found!"
|
||||
COM_COMPONENTBUILDER_PACKAGE_OWNER_NOT_SET="Package Owner Not Set"
|
||||
COM_COMPONENTBUILDER_PAIDLOCKED="Paid/Locked"
|
||||
COM_COMPONENTBUILDER_PFILE_AT_BGITEAREMOTESB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>File at <b>gitea.remote/%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_PLUGIN="Plugin"
|
||||
COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="<p>Power <b>guid:%s</b> not found!</p>"
|
||||
COM_COMPONENTBUILDER_PROPERTY="Property"
|
||||
COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BGITVDMDEVSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Super Power</b> repository at <b>git.vdm.dev/%s</b> gave the following error!<br />%s</p>"
|
||||
COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP="<p>Super Power</b> repository at <b>%s/%s</b> gave the following error!<br />%s</p>"
|
||||
COM_COMPONENTBUILDER_PS_NAMING_MISMATCH_ERROR_SPPTHE_S_NAME_IS_BSB_AND_THE_ENDING_FILE_NAME_IN_THE_NAMESPACE_IS_BSB_THIS_IS_BAD_CONVENTION_PLEASE_SEE_A_HREFS_PSRFOURA_FOR_MORE_INFOPPA_HREFSCLICK_HEREA_TO_FIX_THIS_ISSUEP="<p>%s naming mismatch error (%s)</p><p>The %s name is <b>%s</b> and the ending file name in the namespace is <b>%s</b>. This is bad convention, please see <a href=%s >psr-4</a> for more info.</p><p><a href=%s>Click here</a> to fix this issue.</p>"
|
||||
COM_COMPONENTBUILDER_SBR_YOU_CAN_ADD_A_BGITHUB_ACCESS_TOKENB_TO_COMPONENTBUILDER_GLOBAL_OPTIONS_TO_MAKE_AUTHENTICATED_REQUESTS_TO_GITHUB_AN_ACCESS_TOKEN_WITH_ONLY_PUBLIC_ACCESS_WILL_DO_TO_RETRIEVE_S="%s<br />You can add a <b>gitHub Access Token</b> to Componentbuilder global options to make authenticated requests to gitHub. An access token with only public access will do to retrieve %s."
|
||||
COM_COMPONENTBUILDER_SELECT_EXTENSION="Select Extension"
|
||||
|
Loading…
Reference in New Issue
Block a user