Component Builder (v.3.2.2-alpha2)
+ Component Builder (v.3.2.2-alpha3)
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 6e4ea55aa..d5a360541 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -151,7 +151,7 @@
3.2.2-alpha
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha2.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha3.zip
alpha
@@ -166,10 +166,10 @@
pkg_component_builder
package
site
- 3.2.2-alpha2
+ 3.2.2-alpha3
https://dev.vdm.io
- https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha2.zip
+ https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v3.2.2-alpha3.zip
alpha
diff --git a/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Response.php b/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Response.php
index ed98fff86..263f37b76 100644
--- a/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Response.php
+++ b/libraries/vendor_jcb/VDM.Joomla.Gitea/src/Utilities/Response.php
@@ -12,7 +12,7 @@
namespace VDM\Joomla\Gitea\Utilities;
-use Joomla\Http\Response as JoomlaResponse;
+use Joomla\CMS\Http\Response as JoomlaResponse;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\StringHelper;
diff --git a/libraries/vendor_jcb/VDM.Joomla.Openai/src/Utilities/Response.php b/libraries/vendor_jcb/VDM.Joomla.Openai/src/Utilities/Response.php
index 826f8060f..8f5d70513 100644
--- a/libraries/vendor_jcb/VDM.Joomla.Openai/src/Utilities/Response.php
+++ b/libraries/vendor_jcb/VDM.Joomla.Openai/src/Utilities/Response.php
@@ -12,7 +12,7 @@
namespace VDM\Joomla\Openai\Utilities;
-use Joomla\Http\Response as JoomlaResponse;
+use Joomla\CMS\Http\Response as JoomlaResponse;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\StringHelper;
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/ActiveRegistry.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/ActiveRegistry.php
index 861fcf962..e714bd291 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/ActiveRegistry.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/ActiveRegistry.php
@@ -40,6 +40,14 @@ abstract class ActiveRegistry implements Activeregistryinterface
**/
protected bool $addAsArray = false;
+ /**
+ * Base switch to keep array values unique
+ *
+ * @var boolean
+ * @since 3.2.2
+ **/
+ protected bool $uniqueArray = false;
+
/**
* Check if the registry has any content.
*
@@ -157,7 +165,16 @@ abstract class ActiveRegistry implements Activeregistryinterface
// Convert to array if it's not already an array
$array = [$array];
}
- $array[] = $value;
+
+ if ($this->uniqueArray && in_array($value, $array))
+ {
+ // we do nothing
+ return;
+ }
+ else
+ {
+ $array[] = $value;
+ }
}
else
{
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php
new file mode 100644
index 000000000..e51e873eb
--- /dev/null
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Grep.php
@@ -0,0 +1,218 @@
+
+ * @git 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\Abstraction;
+
+
+use Joomla\CMS\Factory;
+use Joomla\CMS\Filesystem\Folder;
+use Joomla\CMS\Application\CMSApplication;
+use VDM\Joomla\Gitea\Repository\Contents;
+use VDM\Joomla\Interfaces\GrepInterface;
+
+
+/**
+ * Global Resource Empowerment Platform
+ *
+ * The Grep feature will try to find your power in the repositories listed in the global
+ * Options of JCB in the super powers tab, and if it can't be found there will try the global core
+ * Super powers of JCB. All searches are performed according the the [algorithm:cascading]
+ * See documentation for more details: https://git.vdm.dev/joomla/super-powers/wiki
+ *
+ * @since 3.2.1
+ */
+abstract class Grep implements GrepInterface
+{
+ /**
+ * The local path
+ *
+ * @var string
+ * @since 3.2.0
+ **/
+ public ?string $path;
+
+ /**
+ * All approved paths
+ *
+ * @var array
+ * @since 3.2.0
+ **/
+ public ?array $paths;
+
+ /**
+ * Order of global search
+ *
+ * @var array
+ * @since 3.2.1
+ **/
+ protected array $order = ['local', 'remote'];
+
+ /**
+ * Gitea Repository Contents
+ *
+ * @var Contents
+ * @since 3.2.0
+ **/
+ protected Contents $contents;
+
+ /**
+ * Joomla Application object
+ *
+ * @var CMSApplication
+ * @since 3.2.0
+ **/
+ protected CMSApplication $app;
+
+ /**
+ * Constructor.
+ *
+ * @param Contents $contents The Gitea Repository Contents object.
+ * @param array $paths The approved paths
+ * @param string|null $path The local path
+ * @param CMSApplication|null $app The CMS Application object.
+ *
+ * @throws \Exception
+ * @since 3.2.0
+ */
+ public function __construct(Contents $contents, array $paths, ?string $path = null, ?CMSApplication $app = null)
+ {
+ $this->paths = $paths;
+ $this->contents = $contents;
+ $this->path = $path;
+ $this->app = $app ?: Factory::getApplication();
+
+ $this->init();
+ }
+
+ /**
+ * Get all remote powers GUID's
+ *
+ * @return array|null
+ * @since 3.2.0
+ */
+ public function getRemotePowersGuid(): ?array
+ {
+ if (!is_array($this->paths) || $this->paths === [])
+ {
+ return null;
+ }
+
+ $powers = [];
+ foreach ($this->paths as $path)
+ {
+ // Get remote index
+ $this->remoteIndex($path);
+
+ if (isset($path->index) && is_object($path->index))
+ {
+ $powers = array_merge($powers, array_keys((array) $path->index));
+ }
+ }
+
+ return empty($powers) ? null : array_unique($powers);
+ }
+
+ /**
+ * Get a power
+ *
+ * @param string $guid The global unique id of the power
+ * @param array|null $order The search order
+ *
+ * @return object|null
+ * @since 3.2.0
+ */
+ public function get(string $guid, ?array $order = null): ?object
+ {
+ if ($order === null)
+ {
+ $order = $this->order;
+ }
+
+ // we can only search if we have paths
+ if (is_array($this->paths) && $this->paths !== [])
+ {
+ foreach ($order as $target)
+ {
+ if (($function_name = $this->getFunctionName($target)) !== null &&
+ ($power = $this->{$function_name}($guid)) !== null)
+ {
+ return $power;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Load the remote repository index of powers
+ *
+ * @param object $path The repository path details
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ abstract protected function remoteIndex(object &$path): void;
+
+ /**
+ * Get function name
+ *
+ * @param string $name The targeted function name
+ *
+ * @return string|null
+ * @since 3.2.0
+ */
+ protected function getFunctionName(string $name): ?string
+ {
+ $function_name = 'search' . ucfirst(strtolower($name));
+
+ return method_exists($this, $function_name) ? $function_name : null;
+ }
+
+ /**
+ * Set path details
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ protected function init(): void
+ {
+ if (is_array($this->paths) && $this->paths !== [])
+ {
+ foreach ($this->paths as $n => &$path)
+ {
+ if (isset($path->owner) && strlen($path->owner) > 1 &&
+ isset($path->repo) && strlen($path->repo) > 1)
+ {
+ // build the path
+ $path->path = trim($path->owner) . '/' . trim($path->repo);
+
+ // update the branch
+ if ($path->branch === 'default' || empty($path->branch))
+ {
+ $path->branch = null;
+ }
+
+ // set local path
+ if ($this->path && Folder::exists($this->path . '/' . $path->path))
+ {
+ $path->full_path = $this->path . '/' . $path->path;
+ }
+ }
+ else
+ {
+ unset($this->paths[$n]);
+ }
+ }
+ }
+ }
+}
+
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php
index 4e1e9e214..e48829abd 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Abstraction/Registry.php
@@ -12,7 +12,6 @@
namespace VDM\Joomla\Abstraction;
-use VDM\Joomla\Interfaces\Activeregistryinterface;
use VDM\Joomla\Interfaces\Registryinterface;
use VDM\Joomla\Abstraction\ActiveRegistry;
@@ -24,7 +23,7 @@ use VDM\Joomla\Abstraction\ActiveRegistry;
*
* @since 3.2.0
*/
-abstract class Registry extends ActiveRegistry implements Activeregistryinterface, Registryinterface
+abstract class Registry extends ActiveRegistry implements Registryinterface
{
/**
* Path separator
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DatabaseKeys.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DatabaseKeys.php
index e9496c54c..3c3cce1db 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DatabaseKeys.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Builder/DatabaseKeys.php
@@ -23,5 +23,20 @@ use VDM\Joomla\Abstraction\Registry;
*/
final class DatabaseKeys extends Registry implements Registryinterface
{
+ /**
+ * Base switch to add values as string or array
+ *
+ * @var boolean
+ * @since 3.2.0
+ **/
+ protected bool $addAsArray = true;
+
+ /**
+ * Base switch to keep array values unique
+ *
+ * @var boolean
+ * @since 3.2.2
+ **/
+ protected bool $uniqueArray = true;
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
index 30852bd9a..ad8a18fce 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Config.php
@@ -57,6 +57,17 @@ class Config extends BaseConfig
$this->config = $config ?: JoomlaFactory::getConfig();
}
+ /**
+ * get Gitea Username
+ *
+ * @return string the access token
+ * @since 3.2.0
+ */
+ protected function getGiteausername(): ?string
+ {
+ return $this->custom_gitea_username ?? $this->params->get('gitea_username');
+ }
+
/**
* get Gitea Access Token
*
@@ -95,6 +106,22 @@ class Config extends BaseConfig
return null;
}
+ /**
+ * get Custom Gitea Username
+ *
+ * @return string the custom access token
+ * @since 3.2.0
+ */
+ protected function getCustomgiteausername(): ?string
+ {
+ if ($this->add_custom_gitea_url == 2)
+ {
+ return $this->params->get('custom_gitea_username');
+ }
+
+ return null;
+ }
+
/**
* get Custom Gitea Access Token
*
@@ -148,6 +175,12 @@ class Config extends BaseConfig
$paths = $this->params->get('super_powers_core_repos');
}
+ // get the users own power repo (can overwrite all)
+ if (!empty($this->gitea_username))
+ {
+ $repos[$this->gitea_username . '.super-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
+ }
+
if (!empty($paths) && is_array($paths))
{
foreach ($paths as $path)
@@ -845,6 +878,11 @@ class Config extends BaseConfig
{
// some defaults repos we need by JCB
$repos = [];
+ // get the users own power repo (can overwrite all)
+ if (!empty($this->gitea_username))
+ {
+ $repos[$this->gitea_username . '.joomla-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ }
$repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) ['owner' => $this->joomla_powers_core_organisation, 'repo' => 'joomla-powers', 'branch' => 'master'];
return $repos;
@@ -866,15 +904,12 @@ class Config extends BaseConfig
/**
* Get joomla power approved paths
*
- * @return array The paths to the repositories on Gitea
+ * @return array The approved paths to the repositories on Gitea
* @since 3.2.0
*/
protected function getApprovedjoomlapaths(): array
{
- // some defaults repos we need by JCB
- $approved = $this->joomla_powers_init_repos;
-
- return array_values($approved);
+ return array_values($this->joomla_powers_init_repos);
}
/**
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php
index de049af55..ad4465b3e 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Customview/Data.php
@@ -244,7 +244,7 @@ class Data
);
// Make sure the icon is only an icon path
- if (strpos($item->icon, '#') !== false)
+ if (isset($item->icon) && strpos($item->icon, '#') !== false)
{
$item->icon = strstr($item->icon, '#', true);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower.php
index 55878976f..8ef3d92a2 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/JoomlaPower.php
@@ -207,96 +207,192 @@ final class JoomlaPower implements PowerInterface
}
/**
- * Set a power
+ * Set a Joomla power
*
- * @param string $guid The global unique id of the power
+ * @param string $guid The global unique id of the power
*
- * @return bool true on successful setting of a power
+ * @return bool true on successful setting of a power
* @since 3.2.1
*/
private function set(string $guid): bool
{
- // check if we have been here before
+ // Check if power is already set
if ($this->isPowerSet($guid))
{
return $this->state[$guid];
}
- elseif ($this->isGuidValid($guid))
+
+ // Validate GUID
+ if (!$this->isGuidValid($guid))
{
- // get the power data
- $this->active[$guid] = $this->getPowerData($guid);
+ $this->state[$guid] = false;
+ return false;
+ }
- if (is_object($this->active[$guid]))
+ // Get the power data
+ $this->active[$guid] = $this->getPowerData($guid);
+
+ // Validate power data object
+ if ($this->active[$guid] === null)
+ {
+ return $this->handlePowerNotFound($guid);
+ }
+
+ // Prevent recursive loading of the same power
+ $this->state[$guid] = true;
+
+ // Convert settings to array if valid JSON
+ $settings = $this->convertSettingsToArray(
+ $this->active[$guid]->settings
+ );
+
+ // Set the target version if settings array is valid
+ if (!$this->setTargetVersion($guid, $settings))
+ {
+ return false;
+ }
+
+ // Set class name and namespace
+ $this->setClassAndNamespace($guid);
+
+ return true;
+ }
+
+ /**
+ * Convert settings JSON string to array
+ *
+ * @param string $settingsJson
+ *
+ * @return array|null
+ * @since 3.2.2
+ */
+ private function convertSettingsToArray(string $settingsJson): ?array
+ {
+ if (JsonHelper::check($settingsJson))
+ {
+ return json_decode($settingsJson, true);
+ }
+
+ return null;
+ }
+
+ /**
+ * Set the target version based on Joomla version and settings
+ *
+ * @param string $guid
+ * @param array|null $settings
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ private function setTargetVersion(string $guid, ?array $settings): bool
+ {
+ $joomla_version = $this->config->joomla_version;
+
+ if (!$joomla_version || !ArrayHelper::check($settings))
+ {
+ return false;
+ }
+
+ $joomla_version_target = null;
+ $target_found = false;
+
+ foreach ($settings as $namespace)
+ {
+ // Set default values for all versions
+ if ($namespace['joomla_version'] == 0)
{
- // make sure that in recursion we
- // don't try to load this power again
- // since during the load of a power we also load
- // all powers linked to it
- $this->state[$guid] = true;
+ $this->setNamespaceAndType($guid, $namespace);
+ $target_found = true;
+ }
- // convert settings to an array
- if (JsonHelper::check($this->active[$guid]->settings))
- {
- $this->active[$guid]->settings = $settings
- = json_decode($this->active[$guid]->settings, true);
- }
-
- // set a target version
- $joomla_version = $this->config->joomla_version;
-
- if ($joomla_version && ArrayHelper::check($settings))
- {
- foreach ($settings as $namespace)
- {
- if ($joomla_version == $namespace['joomla_version'] ||
- $namespace['joomla_version'] == 0)
- {
- $this->active[$guid]->namespace = $namespace['namespace'];
- $this->active[$guid]->type = $namespace['type'] ?? 'class';
- break;
- }
- }
-
- $this->active[$guid]->class_name =
- $this->extractLastNameFromNamespace($this->active[$guid]->namespace);
-
- $this->active[$guid]->_namespace =
- $this->removeLastNameFromNamespace($this->active[$guid]->namespace);
-
- // set the approved super power values
- $this->setSuperPowers($guid);
-
- return true;
- }
+ // Check for direct target version
+ if ($joomla_version == $namespace['joomla_version'])
+ {
+ $joomla_version_target = $namespace;
+ break;
}
}
- // we failed to get the power,
- // so we raise an error message
- // only if guid is valid
- if ($this->isGuidValid($guid))
+ if ($joomla_version_target)
{
- // now we search for it via the super power paths
- if (empty($this->retry[$guid]) && $this->superpower->load($guid, ['remote', 'local']))
- {
- // we found it and it was loaded into the database
- unset($this->state[$guid]);
- unset($this->active[$guid]);
-
- // we make sure that this retry only happen once! (just in-case...)
- $this->retry[$guid] = true;
-
- // so we try to load it again
- return $this->set($guid);
- }
+ $this->setNamespaceAndType($guid, $joomla_version_target);
+ $target_found = true;
+ }
+ if (!$target_found)
+ {
$this->app->enqueueMessage(
- Text::sprintf('COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP', $guid),
+ Text::sprintf('COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_WAS_FOUND_BUT_MISSING_A_NAMESPACE_VALUE_FOR_JOOMLA_SP', $guid, $joomla_version),
'Error'
);
+
+ $this->state[$guid] = false;
+
+ return false;
}
- // let's not try again
+ return true;
+ }
+
+ /**
+ * Set namespace and type for the active power
+ *
+ * @param string $guid
+ * @param array $namespace
+ *
+ * @since 3.2.2
+ */
+ private function setNamespaceAndType(string $guid, array $namespace): void
+ {
+ $this->active[$guid]->namespace = $namespace['namespace'];
+ $this->active[$guid]->type = $namespace['type'] ?? 'class';
+ }
+
+ /**
+ * Set class name and namespace for the active power
+ *
+ * @param string $guid
+ *
+ * @since 3.2.2
+ */
+ private function setClassAndNamespace(string $guid): void
+ {
+ $this->active[$guid]->class_name = $this->extractLastNameFromNamespace(
+ $this->active[$guid]->namespace
+ );
+
+ $this->active[$guid]->_namespace = $this->removeLastNameFromNamespace(
+ $this->active[$guid]->namespace
+ );
+ }
+
+ /**
+ * Handle power not found scenario
+ *
+ * @param string $guid
+ *
+ * @return bool
+ * @since 3.2.2
+ */
+ private function handlePowerNotFound(string $guid): bool
+ {
+ if (empty($this->retry[$guid]) && $this->superpower->load($guid, ['remote', 'local']))
+ {
+ // Retry loading the power
+ unset($this->state[$guid]);
+ unset($this->active[$guid]);
+
+ $this->retry[$guid] = true;
+
+ return $this->set($guid);
+ }
+
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP', $guid),
+ 'Error'
+ );
+
$this->state[$guid] = false;
return false;
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
index 41f84bae7..55f811e7d 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power.php
@@ -756,7 +756,7 @@ class Power implements PowerInterface
}
/**
- * Set Extend Class
+ * Set Extend
*
* @param string $guid The global unique id of the power
* @param array $use The use array
@@ -767,9 +767,29 @@ class Power implements PowerInterface
*/
private function setExtend(string $guid, array &$use, array &$as)
{
- // does this extend something
- $this->active[$guid]->extends_name = null;
+ // build the interface extends details
+ if ($this->active[$guid]->type === 'interface')
+ {
+ $this->setExtendInterface($guid, $use, $as);
+ }
+ else
+ {
+ $this->setExtendClass($guid, $use, $as);
+ }
+ }
+ /**
+ * Set Extend Class
+ *
+ * @param string $guid The global unique id of the power
+ * @param array $use The use array
+ * @param array $as The use as array
+ *
+ * @return void
+ * @since 3.2.0
+ */
+ private function setExtendClass(string $guid, array &$use, array &$as)
+ {
// we first check for custom extending options
if ($this->active[$guid]->extends == -1
&& StringHelper::check($this->active[$guid]->extends_custom))
@@ -803,6 +823,89 @@ class Power implements PowerInterface
}
}
}
+ // reset it not found
+ else
+ {
+ $this->active[$guid]->extends = '';
+ $this->active[$guid]->extends_custom = '';
+ }
+ // always rest these for normal classes
+ $this->active[$guid]->extendsinterfaces = null;
+ $this->active[$guid]->extendsinterfaces_custom = '';
+ }
+
+ /**
+ * Set Extend Interface
+ *
+ * @param string $guid The global unique id of the power
+ * @param array $use The use array
+ * @param array $as The use as array
+ *
+ * @return void
+ * @since 3.2.2
+ */
+ private function setExtendInterface(string $guid, array &$use, array &$as)
+ {
+ // does this extends interfaces
+ $this->active[$guid]->extendsinterfaces = (isset($this->active[$guid]->extendsinterfaces)
+ && JsonHelper::check(
+ $this->active[$guid]->extendsinterfaces
+ )) ? json_decode((string)$this->active[$guid]->extendsinterfaces, true) : null;
+
+ if (ArrayHelper::check($this->active[$guid]->extendsinterfaces))
+ {
+ $bucket = [];
+ foreach ($this->active[$guid]->extendsinterfaces as $extend)
+ {
+ // we first check for custom extending options
+ if ($extend == -1
+ && isset($this->active[$guid]->extendsinterfaces_custom)
+ && StringHelper::check($this->active[$guid]->extendsinterfaces_custom))
+ {
+ // reserve extends custom for the linker
+ $this->active[$guid]->unchanged_extendsinterfaces_custom = $this->active[$guid]->extendsinterfaces_custom;
+
+ $bucket[] = $this->placeholder->update_(
+ $this->customcode->update($this->active[$guid]->extendsinterfaces_custom)
+ );
+
+ // just add once
+ unset($this->active[$guid]->extendsinterfaces_custom);
+ }
+ // does this extend existing
+ elseif (GuidHelper::valid($extend))
+ {
+ // check if it was set
+ if ($this->set($extend))
+ {
+ $extends_name = $this->get($extend, 1)->class_name;
+ // add to use
+ $use[] = $extend;
+
+ // add padding if the two names are the same
+ if ($extends_name === $this->active[$guid]->class_name)
+ {
+ $extends_name = $as[$extend]
+ = 'Extending' . $extends_name;
+ }
+ // get the name
+ $bucket[] = $extends_name;
+ }
+ }
+ }
+ if ($bucket !== [])
+ {
+ $this->active[$guid]->extends_name = implode(', ', $bucket);
+ }
+ }
+ else
+ {
+ $this->active[$guid]->extendsinterfaces = null;
+ $this->active[$guid]->extendsinterfaces_custom = '';
+ }
+ // always rest these for interfaces
+ $this->active[$guid]->extends = '';
+ $this->active[$guid]->extends_custom = '';
}
/**
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php
index 41e97e7d4..7e0402a29 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Power/Infusion.php
@@ -115,6 +115,8 @@ class Infusion
'unchanged_description' => 'description',
'extends' => 'extends',
'unchanged_extends_custom' => 'extends_custom',
+ 'extendsinterfaces' => 'extendsinterfaces',
+ 'unchanged_extendsinterfaces_custom' => 'extendsinterfaces_custom',
'guid' => 'guid',
'unchanged_head' => 'head',
'use_selection' => 'use_selection',
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php
index e51113bdb..42aa0a117 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/JoomlaPower.php
@@ -113,9 +113,8 @@ class JoomlaPower implements ServiceProviderInterface
public function getGrep(Container $container): Grep
{
return new Grep(
- $container->get('Config')->local_joomla_powers_repository_path,
- $container->get('Config')->approved_joomla_paths,
- $container->get('Gitea.Repository.Contents')
+ $container->get('Gitea.Repository.Contents'),
+ $container->get('Config')->approved_joomla_paths
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php
index 845ce4041..43997f63e 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Service/Power.php
@@ -140,9 +140,9 @@ class Power implements ServiceProviderInterface
public function getGrep(Container $container): Grep
{
return new Grep(
- $container->get('Config')->local_powers_repository_path,
+ $container->get('Gitea.Repository.Contents'),
$container->get('Config')->approved_paths,
- $container->get('Gitea.Repository.Contents')
+ $container->get('Config')->local_powers_repository_path
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php
index b9bb447ee..84dd2bdd4 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Config.php
@@ -57,6 +57,17 @@ class Config extends BaseConfig
$this->config = $config ?: JoomlaFactory::getConfig();
}
+ /**
+ * get Gitea Username
+ *
+ * @return string the access token
+ * @since 3.2.0
+ */
+ protected function getGiteausername(): ?string
+ {
+ return $this->custom_gitea_username ?? $this->params->get('gitea_username');
+ }
+
/**
* get Gitea Access Token
*
@@ -95,6 +106,22 @@ class Config extends BaseConfig
return null;
}
+ /**
+ * get Custom Gitea Username
+ *
+ * @return string the custom access token
+ * @since 3.2.0
+ */
+ protected function getCustomgiteausername(): ?string
+ {
+ if ($this->add_custom_gitea_url == 2)
+ {
+ return $this->params->get('custom_gitea_username');
+ }
+
+ return null;
+ }
+
/**
* get Custom Gitea Access Token
*
@@ -135,48 +162,40 @@ class Config extends BaseConfig
{
// some defaults repos we need by JCB
$repos = [];
+ // get the users own power repo (can overwrite all)
+ if (!empty($this->gitea_username))
+ {
+ $repos[$this->gitea_username . '.joomla-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ }
$repos[$this->joomla_powers_core_organisation . '.joomla-powers'] = (object) ['owner' => $this->joomla_powers_core_organisation, 'repo' => 'joomla-powers', 'branch' => 'master'];
return $repos;
}
/**
- * get temporary path
+ * Get Joomla power push repo
*
- * @return string The temporary path
- * @since 3.2.0
+ * @return object|null The push repository on Gitea
+ * @since 3.2.1
*/
- protected function getTmppath(): string
+ protected function getJoomlapowerspushrepo(): ?object
{
- // get the temporary path
- return $this->config->get('tmp_path');
- }
-
- /**
- * Get local joomla super powers repository path
- *
- * @return string The path to the local repository
- * @since 3.2.0
- */
- protected function getLocaljoomlapowersrepositorypath(): string
- {
- $default = $this->tmp_path . '/joomla_powers';
-
- return $this->params->get('local_joomla_powers_repository_path', $default);
+ // some defaults repos we need by JCB
+ if (!empty($this->gitea_username))
+ {
+ return (object) ['owner' => $this->gitea_username, 'repo' => 'joomla-powers', 'branch' => 'master'];
+ }
}
/**
* Get joomla power approved paths
*
- * @return array The paths to the repositories on Gitea
+ * @return array The approved paths to the repositories on Gitea
* @since 3.2.0
*/
protected function getApprovedjoomlapaths(): array
{
- // some defaults repos we need by JCB
- $approved = $this->joomla_powers_init_repos;
-
- return array_values($approved);
+ return array_values($this->joomla_powers_init_repos);
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php
index 1c0b0ed5a..8c4f5b254 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Grep.php
@@ -12,10 +12,11 @@
namespace VDM\Joomla\Componentbuilder\JoomlaPower;
+use Joomla\CMS\Language\Text;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\JsonHelper;
-use VDM\Joomla\Componentbuilder\Interfaces\GrepInterface;
-use VDM\Joomla\Componentbuilder\Power\Grep as ExtendingGrep;
+use VDM\Joomla\Interfaces\GrepInterface;
+use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
/**
@@ -31,87 +32,12 @@ use VDM\Joomla\Componentbuilder\Power\Grep as ExtendingGrep;
final class Grep extends ExtendingGrep implements GrepInterface
{
/**
- * Get a local power
+ * Order of global search
*
- * @param object $path The repository path details
- * @param string $guid The global unique id of the power
- *
- * @return object|null
- * @since 3.2.0
- */
- private function getLocal(object $path, string $guid): ?object
- {
- if (empty($path->local->{$guid}->settings))
- {
- return null;
- }
-
- // get the settings
- if (($settings = FileHelper::getContent($path->full_path . '/' . $path->local->{$guid}->settings, null)) !== null &&
- JsonHelper::check($settings))
- {
- $power = json_decode($settings);
-
- if (isset($power->guid))
- {
- return $power;
- }
- }
-
- return null;
- }
-
- /**
- * Get a remote power
- *
- * @param object $path The repository path details
- * @param string $guid The global unique id of the power
- *
- * @return object|null
- * @since 3.2.0
- */
- private function getRemote(object $path, string $guid): ?object
- {
- if (empty($path->index->{$guid}->settings))
- {
- return null;
- }
-
- // get the settings
- if (($power = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->settings, $path->branch)) !== null &&
- isset($power->guid))
- {
- return $power;
- }
-
- return null;
- }
-
- /**
- * Load the local repository index of powers
- *
- * @param object $path The repository path details
- *
- * @return void
- * @since 3.2.0
- */
- private function localIndex(object &$path)
- {
- if (isset($path->local) || !isset($path->full_path))
- {
- return;
- }
-
- if (($content = FileHelper::getContent($path->full_path . '/joomla-powers.json', null)) !== null &&
- JsonHelper::check($content))
- {
- $path->local = json_decode($content);
-
- return;
- }
-
- $path->local = null;
- }
+ * @var array
+ * @since 3.2.1
+ **/
+ protected array $order = ['remote'];
/**
* Load the remote repository index of powers
@@ -121,7 +47,7 @@ final class Grep extends ExtendingGrep implements GrepInterface
* @return void
* @since 3.2.0
*/
- private function remoteIndex(object &$path)
+ protected function remoteIndex(object &$path): void
{
if (isset($path->index))
{
@@ -141,6 +67,99 @@ final class Grep extends ExtendingGrep implements GrepInterface
$path->index = null;
}
+ }
+
+ /**
+ * Search for a remote power
+ *
+ * @param string $guid The global unique id of the power
+ *
+ * @return object|null
+ * @since 3.2.0
+ */
+ protected function searchRemote(string $guid): ?object
+ {
+ // we can only search if we have paths
+ if ($this->path && $this->paths)
+ {
+ foreach ($this->paths as $path)
+ {
+ // get local index
+ $this->remoteIndex($path);
+
+ if (!empty($path->index) && isset($path->index->{$guid}))
+ {
+ return $this->getRemote($path, $guid);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Get a remote power
+ *
+ * @param object $path The repository path details
+ * @param string $guid The global unique id of the power
+ *
+ * @return object|null
+ * @since 3.2.0
+ */
+ protected function getRemote(object $path, string $guid): ?object
+ {
+ if (empty($path->index->{$guid}->settings))
+ {
+ return null;
+ }
+
+ // get the settings
+ if (($power = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->settings, $path->branch)) !== null &&
+ isset($power->guid))
+ {
+ // set the git details in params
+ $power->params = (object) [
+ 'git' => [
+ 'owner' => $path->owner,
+ 'repo' => $path->repo,
+ 'branch' => $path->branch
+ ]
+ ];
+
+ return $power;
+ }
+
+ return null;
+ }
+
+ /**
+ * Load the remote file
+ *
+ * @param string $owner The repository owner
+ * @param string $repo The repository name
+ * @param string $path The repository path to file
+ * @param string|null $branch The repository branch name
+ *
+ * @return mixed
+ * @since 3.2.0
+ */
+ protected function loadRemoteFile(string $owner, string $repo, string $path, ?string $branch)
+ {
+ try
+ {
+ $data = $this->contents->get($owner, $repo, $path, $branch);
+ }
+ catch (\Exception $e)
+ {
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_PFILE_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path, $e->getMessage()),
+ 'Error'
+ );
+
+ return null;
+ }
+
+ return $data;
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php
index 502ef177d..941fb5789 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/JoomlaPower/Service/JoomlaPower.php
@@ -91,9 +91,8 @@ class JoomlaPower implements ServiceProviderInterface
public function getGrep(Container $container): Grep
{
return new Grep(
- $container->get('Config')->local_joomla_powers_repository_path,
- $container->get('Config')->approved_joomla_paths,
- $container->get('Gitea.Repository.Contents')
+ $container->get('Gitea.Repository.Contents'),
+ $container->get('Config')->approved_joomla_paths
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php
index 8e0085333..b5167fdb0 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Config.php
@@ -57,6 +57,17 @@ class Config extends BaseConfig
$this->config = $config ?: JoomlaFactory::getConfig();
}
+ /**
+ * get Gitea Username
+ *
+ * @return string the access token
+ * @since 3.2.0
+ */
+ protected function getGiteausername(): ?string
+ {
+ return $this->custom_gitea_username ?? $this->params->get('gitea_username');
+ }
+
/**
* get Gitea Access Token
*
@@ -95,6 +106,22 @@ class Config extends BaseConfig
return null;
}
+ /**
+ * get Custom Gitea Username
+ *
+ * @return string the custom access token
+ * @since 3.2.0
+ */
+ protected function getCustomgiteausername(): ?string
+ {
+ if ($this->add_custom_gitea_url == 2)
+ {
+ return $this->params->get('custom_gitea_username');
+ }
+
+ return null;
+ }
+
/**
* get Custom Gitea Access Token
*
@@ -148,6 +175,12 @@ class Config extends BaseConfig
$paths = $this->params->get('super_powers_init_repos');
}
+ // get the users own power repo (can overwrite all)
+ if (!empty($this->gitea_username))
+ {
+ $repos[$this->gitea_username . '.super-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
+ }
+
if (!empty($paths) && is_array($paths))
{
foreach ($paths as $path)
@@ -171,6 +204,22 @@ class Config extends BaseConfig
return $repos;
}
+ /**
+ * Get super power push repo
+ *
+ * @return object|null The push repository on Gitea
+ * @since 3.2.1
+ */
+ protected function getSuperpowerspushrepo(): ?object
+ {
+ if (!empty($this->gitea_username))
+ {
+ return (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
+ }
+
+ return null;
+ }
+
/**
* get temporary path
*
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php
index 20e2e9d37..590fce1d6 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Grep.php
@@ -12,14 +12,11 @@
namespace VDM\Joomla\Componentbuilder\Power;
-use Joomla\CMS\Factory;
-use Joomla\CMS\Filesystem\Folder;
-use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
-use VDM\Joomla\Gitea\Repository\Contents;
use VDM\Joomla\Utilities\FileHelper;
use VDM\Joomla\Utilities\JsonHelper;
-use VDM\Joomla\Componentbuilder\Interfaces\GrepInterface;
+use VDM\Joomla\Interfaces\GrepInterface;
+use VDM\Joomla\Abstraction\Grep as ExtendingGrep;
/**
@@ -32,114 +29,36 @@ use VDM\Joomla\Componentbuilder\Interfaces\GrepInterface;
*
* @since 3.2.0
*/
-class Grep implements GrepInterface
+final class Grep extends ExtendingGrep implements GrepInterface
{
/**
- * The local path
+ * Load the remote repository index of powers
*
- * @var string
- * @since 3.2.0
- **/
- public ?string $path;
-
- /**
- * All approved paths
+ * @param object $path The repository path details
*
- * @var array
- * @since 3.2.0
- **/
- public ?array $paths;
-
- /**
- * Gitea Repository Contents
- *
- * @var Contents
- * @since 3.2.0
- **/
- protected Contents $contents;
-
- /**
- * Joomla Application object
- *
- * @var CMSApplication
- * @since 3.2.0
- **/
- protected CMSApplication $app;
-
- /**
- * Constructor.
- *
- * @param string $path The local path
- * @param array $paths The approved paths
- * @param Contents $contents The Gitea Repository Contents object.
- * @param CMSApplication|null $app The CMS Application object.
- *
- * @throws \Exception
+ * @return void
* @since 3.2.0
*/
- public function __construct(string $path, array $paths, Contents $contents, ?CMSApplication $app = null)
+ protected function remoteIndex(object &$path): void
{
- $this->path = $path;
- $this->paths = $paths;
- $this->contents = $contents;
- $this->app = $app ?: Factory::getApplication();
-
- $this->init();
- }
-
- /**
- * Get all remote powers GUID's
- *
- * @return array|null
- * @since 3.2.0
- */
- public function getRemotePowersGuid(): ?array
- {
- if (!is_array($this->paths) || $this->paths === [])
+ if (isset($path->index))
{
- return null;
+ return;
}
- $powers = [];
- foreach ($this->paths as $path)
+ try
{
- // Get local index
- $this->remoteIndex($path);
-
- if (isset($path->index) && is_object($path->index))
- {
- $powers = array_merge($powers, array_keys((array) $path->index));
- }
+ $path->index = $this->contents->get($path->owner, $path->repo, 'super-powers.json', $path->branch);
}
-
- return empty($powers) ? null : array_unique($powers);
- }
-
- /**
- * Get a power
- *
- * @param string $guid The global unique id of the power
- * @param array $order The search order
- *
- * @return object|null
- * @since 3.2.0
- */
- public function get(string $guid, array $order = ['local', 'remote']): ?object
- {
- // we can only search if we have paths
- if (is_array($this->paths) && $this->paths !== [])
+ catch (\Exception $e)
{
- foreach ($order as $target)
- {
- if (($function_name = $this->getFunctionName($target)) !== null &&
- ($power = $this->{$function_name}($guid)) !== null)
- {
- return $power;
- }
- }
- }
+ $this->app->enqueueMessage(
+ Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
+ 'Error'
+ );
- return null;
+ $path->index = null;
+ }
}
/**
@@ -150,7 +69,7 @@ class Grep implements GrepInterface
* @return object|null
* @since 3.2.0
*/
- private function searchLocal(string $guid): ?object
+ protected function searchLocal(string $guid): ?object
{
// we can only search if we have paths
if ($this->path && $this->paths)
@@ -178,7 +97,7 @@ class Grep implements GrepInterface
* @return object|null
* @since 3.2.0
*/
- private function searchRemote(string $guid): ?object
+ protected function searchRemote(string $guid): ?object
{
// we can only search if we have paths
if ($this->path && $this->paths)
@@ -207,7 +126,7 @@ class Grep implements GrepInterface
* @return object|null
* @since 3.2.0
*/
- private function getLocal(object $path, string $guid): ?object
+ protected function getLocal(object $path, string $guid): ?object
{
if (empty($path->local->{$guid}->settings) || empty($path->local->{$guid}->code))
{
@@ -240,7 +159,7 @@ class Grep implements GrepInterface
* @return object|null
* @since 3.2.0
*/
- private function getRemote(object $path, string $guid): ?object
+ protected function getRemote(object $path, string $guid): ?object
{
if (empty($path->index->{$guid}->settings) || empty($path->index->{$guid}->code))
{
@@ -254,6 +173,14 @@ class Grep implements GrepInterface
// get the code
if (($code = $this->loadRemoteFile($path->owner, $path->repo, $path->index->{$guid}->power, $path->branch)) !== null)
{
+ // set the git details in params
+ $power->params = (object) [
+ 'git' => [
+ 'owner' => $path->owner,
+ 'repo' => $path->repo,
+ 'branch' => $path->branch
+ ]
+ ];
$power->main_class_code = $code;
return $power;
}
@@ -262,100 +189,6 @@ class Grep implements GrepInterface
return null;
}
- /**
- * Set path details
- *
- * @return void
- * @since 3.2.0
- */
- private function init()
- {
- if (is_array($this->paths) && $this->paths !== [])
- {
- foreach ($this->paths as $n => &$path)
- {
- if (isset($path->owner) && strlen($path->owner) > 1 &&
- isset($path->repo) && strlen($path->repo) > 1)
- {
- // build the path
- $path->path = trim($path->owner) . '/' . trim($path->repo);
-
- // update the branch
- if ($path->branch === 'default' || empty($path->branch))
- {
- $path->branch = null;
- }
-
- // set local path
- if ($this->path && Folder::exists($this->path . '/' . $path->path))
- {
- $path->full_path = $this->path . '/' . $path->path;
- }
- }
- else
- {
- unset($this->paths[$n]);
- }
- }
- }
- }
-
- /**
- * Load the local repository index of powers
- *
- * @param object $path The repository path details
- *
- * @return void
- * @since 3.2.0
- */
- private function localIndex(object &$path)
- {
- if (isset($path->local) || !isset($path->full_path))
- {
- return;
- }
-
- if (($content = FileHelper::getContent($path->full_path . '/super-powers.json', null)) !== null &&
- JsonHelper::check($content))
- {
- $path->local = json_decode($content);
-
- return;
- }
-
- $path->local = null;
- }
-
- /**
- * Load the remote repository index of powers
- *
- * @param object $path The repository path details
- *
- * @return void
- * @since 3.2.0
- */
- private function remoteIndex(object &$path)
- {
- if (isset($path->index))
- {
- return;
- }
-
- try
- {
- $path->index = $this->contents->get($path->owner, $path->repo, 'super-powers.json', $path->branch);
- }
- catch (\Exception $e)
- {
- $this->app->enqueueMessage(
- Text::sprintf('COM_COMPONENTBUILDER_PSUPER_POWERB_REPOSITORY_AT_BSSB_GAVE_THE_FOLLOWING_ERRORBR_SP', $this->contents->api(), $path->path, $e->getMessage()),
- 'Error'
- );
-
- $path->index = null;
- }
- }
-
/**
* Load the remote file
*
@@ -367,7 +200,7 @@ class Grep implements GrepInterface
* @return mixed
* @since 3.2.0
*/
- private function loadRemoteFile(string $owner, string $repo, string $path, ?string $branch)
+ protected function loadRemoteFile(string $owner, string $repo, string $path, ?string $branch)
{
try
{
@@ -387,18 +220,29 @@ class Grep implements GrepInterface
}
/**
- * Get function name
+ * Load the local repository index of powers
*
- * @param string $name The targeted function name
+ * @param object $path The repository path details
*
- * @return string|null
+ * @return void
* @since 3.2.0
*/
- private function getFunctionName(string $name): ?string
+ protected function localIndex(object &$path)
{
- $function_name = 'search' . ucfirst(strtolower($name));
+ if (isset($path->local) || !isset($path->full_path))
+ {
+ return;
+ }
- return method_exists($this, $function_name) ? $function_name : null;
+ if (($content = FileHelper::getContent($path->full_path . '/super-powers.json', null)) !== null &&
+ JsonHelper::check($content))
+ {
+ $path->local = json_decode($content);
+
+ return;
+ }
+
+ $path->local = null;
}
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php
index b307743ad..e62c3a350 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Service/Power.php
@@ -91,9 +91,9 @@ class Power implements ServiceProviderInterface
public function getGrep(Container $container): Grep
{
return new Grep(
- $container->get('Config')->local_powers_repository_path,
+ $container->get('Gitea.Repository.Contents'),
$container->get('Config')->approved_paths,
- $container->get('Gitea.Repository.Contents')
+ $container->get('Config')->local_powers_repository_path
);
}
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php
index 223cf9289..97b62ad40 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Power/Super.php
@@ -12,7 +12,7 @@
namespace VDM\Joomla\Componentbuilder\Power;
-use VDM\Joomla\Componentbuilder\Interfaces\GrepInterface as Grep;
+use VDM\Joomla\Interfaces\GrepInterface as Grep;
use VDM\Joomla\Componentbuilder\Interfaces\Database\InsertInterface as Insert;
use VDM\Joomla\Componentbuilder\Interfaces\Database\UpdateInterface as Update;
use VDM\Joomla\Utilities\GuidHelper;
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php
index 92805b604..3d8d66197 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Table.php
@@ -3139,22 +3139,6 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'method_selection' => [
- 'name' => 'method_selection',
- 'label' => 'COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_LABEL',
- 'type' => 'subform',
- 'title' => false,
- 'list' => 'powers',
- 'store' => 'json',
- 'tab_name' => 'Code',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
'load_selection' => [
'name' => 'load_selection',
'label' => 'COM_COMPONENTBUILDER_POWER_LOAD_SELECTION_LABEL',
@@ -3171,22 +3155,6 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'licensing_template' => [
- 'name' => 'licensing_template',
- 'label' => 'COM_COMPONENTBUILDER_POWER_LICENSING_TEMPLATE_LABEL',
- 'type' => 'textarea',
- 'title' => false,
- 'list' => 'powers',
- 'store' => 'base64',
- 'tab_name' => 'Licensing',
- 'db' => [
- 'type' => 'TEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
'description' => [
'name' => 'description',
'label' => 'COM_COMPONENTBUILDER_POWER_DESCRIPTION_LABEL',
@@ -3219,18 +3187,18 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'extends' => [
- 'name' => 'extends',
- 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDS_LABEL',
- 'type' => 'classpowers',
+ 'licensing_template' => [
+ 'name' => 'licensing_template',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_LICENSING_TEMPLATE_LABEL',
+ 'type' => 'textarea',
'title' => false,
'list' => 'powers',
- 'store' => NULL,
- 'tab_name' => 'Code',
+ 'store' => 'base64',
+ 'tab_name' => 'Licensing',
'db' => [
- 'type' => 'VARCHAR(36)',
- 'default' => '',
- 'null_switch' => 'NOT NULL',
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NULL',
'unique_key' => false,
'key' => false,
],
@@ -3251,13 +3219,13 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'property_selection' => [
- 'name' => 'property_selection',
- 'label' => 'COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_LABEL',
- 'type' => 'subform',
+ 'extendsinterfaces_custom' => [
+ 'name' => 'extendsinterfaces_custom',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_CUSTOM_LABEL',
+ 'type' => 'text',
'title' => false,
'list' => 'powers',
- 'store' => 'json',
+ 'store' => NULL,
'tab_name' => 'Code',
'db' => [
'type' => 'TEXT',
@@ -3283,6 +3251,22 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
+ 'extends' => [
+ 'name' => 'extends',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDS_LABEL',
+ 'type' => 'classpowers',
+ 'title' => false,
+ 'list' => 'powers',
+ 'store' => NULL,
+ 'tab_name' => 'Code',
+ 'db' => [
+ 'type' => 'VARCHAR(36)',
+ 'default' => '',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
'extends_custom' => [
'name' => 'extends_custom',
'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_LABEL',
@@ -3331,13 +3315,45 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'head' => [
- 'name' => 'head',
- 'label' => 'COM_COMPONENTBUILDER_POWER_HEAD_LABEL',
- 'type' => 'editor',
+ 'property_selection' => [
+ 'name' => 'property_selection',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_LABEL',
+ 'type' => 'subform',
'title' => false,
'list' => 'powers',
- 'store' => 'base64',
+ 'store' => 'json',
+ 'tab_name' => 'Code',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'extendsinterfaces' => [
+ 'name' => 'extendsinterfaces',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_LABEL',
+ 'type' => 'interfacepowers',
+ 'title' => false,
+ 'list' => 'powers',
+ 'store' => 'json',
+ 'tab_name' => 'Code',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
+ 'method_selection' => [
+ 'name' => 'method_selection',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_LABEL',
+ 'type' => 'subform',
+ 'title' => false,
+ 'list' => 'powers',
+ 'store' => 'json',
'tab_name' => 'Code',
'db' => [
'type' => 'TEXT',
@@ -3363,6 +3379,22 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
+ 'head' => [
+ 'name' => 'head',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_HEAD_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'powers',
+ 'store' => 'base64',
+ 'tab_name' => 'Code',
+ 'db' => [
+ 'type' => 'TEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
'use_selection' => [
'name' => 'use_selection',
'label' => 'COM_COMPONENTBUILDER_POWER_USE_SELECTION_LABEL',
@@ -3379,22 +3411,6 @@ class Table extends BaseTable implements Tableinterface
'key' => false,
],
],
- 'main_class_code' => [
- 'name' => 'main_class_code',
- 'label' => 'COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_LABEL',
- 'type' => 'editor',
- 'title' => false,
- 'list' => 'powers',
- 'store' => 'base64',
- 'tab_name' => 'Code',
- 'db' => [
- 'type' => 'MEDIUMTEXT',
- 'default' => 'EMPTY',
- 'null_switch' => 'NOT NULL',
- 'unique_key' => false,
- 'key' => false,
- ],
- ],
'add_licensing_template' => [
'name' => 'add_licensing_template',
'label' => 'COM_COMPONENTBUILDER_POWER_ADD_LICENSING_TEMPLATE_LABEL',
@@ -3411,6 +3427,22 @@ class Table extends BaseTable implements Tableinterface
'key' => true,
],
],
+ 'main_class_code' => [
+ 'name' => 'main_class_code',
+ 'label' => 'COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_LABEL',
+ 'type' => 'editor',
+ 'title' => false,
+ 'list' => 'powers',
+ 'store' => 'base64',
+ 'tab_name' => 'Code',
+ 'db' => [
+ 'type' => 'MEDIUMTEXT',
+ 'default' => 'EMPTY',
+ 'null_switch' => 'NOT NULL',
+ 'unique_key' => false,
+ 'key' => false,
+ ],
+ ],
'guid' => [
'name' => 'guid',
'label' => 'COM_COMPONENTBUILDER_POWER_GUID_LABEL',
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/GrepInterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/GrepInterface.php
similarity index 92%
rename from libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/GrepInterface.php
rename to libraries/vendor_jcb/VDM.Joomla/src/Interfaces/GrepInterface.php
index a3219192d..5b1badb56 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Interfaces/GrepInterface.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/GrepInterface.php
@@ -9,7 +9,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-namespace VDM\Joomla\Componentbuilder\Interfaces;
+namespace VDM\Joomla\Interfaces;
/**
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php
index bb97adef6..c41162d59 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Interfaces/Registryinterface.php
@@ -12,12 +12,15 @@
namespace VDM\Joomla\Interfaces;
+use VDM\Joomla\Interfaces\Activeregistryinterface;
+
+
/**
* The Registry Interface
*
* @since 3.2.0
*/
-interface Registryinterface
+interface Registryinterface extends Activeregistryinterface
{
/**
* Sets a value into the registry using multiple keys.
diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Utilities/StringHelper.php b/libraries/vendor_jcb/VDM.Joomla/src/Utilities/StringHelper.php
index fad233560..5d79075b6 100644
--- a/libraries/vendor_jcb/VDM.Joomla/src/Utilities/StringHelper.php
+++ b/libraries/vendor_jcb/VDM.Joomla/src/Utilities/StringHelper.php
@@ -12,7 +12,7 @@
namespace VDM\Joomla\Utilities;
-use Joomla\CMS\Filter\InputFilter;
+use Joomla\Filter\InputFilter;
use Joomla\CMS\Language\Language;
use VDM\Joomla\Utilities\Component\Helper;
diff --git a/script.php b/script.php
index c2528fd1d..06c5fc63a 100644
--- a/script.php
+++ b/script.php
@@ -6441,9 +6441,9 @@ class Com_ComponentbuilderInstallerScript
$power->type_title = 'Componentbuilder Power';
$power->type_alias = 'com_componentbuilder.power';
$power->table = '{"special": {"dbtable": "#__componentbuilder_power","key": "id","type": "Power","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
- $power->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","namespace":"namespace","type":"type","power_version":"power_version","licensing_template":"licensing_template","description":"description","extends":"extends","approved":"approved","add_head":"add_head","extends_custom":"extends_custom","implements_custom":"implements_custom","implements":"implements","head":"head","approved_paths":"approved_paths","main_class_code":"main_class_code","add_licensing_template":"add_licensing_template","guid":"guid","name":"name"}}';
+ $power->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","namespace":"namespace","type":"type","power_version":"power_version","description":"description","licensing_template":"licensing_template","approved":"approved","extendsinterfaces_custom":"extendsinterfaces_custom","add_head":"add_head","extends":"extends","extends_custom":"extends_custom","implements_custom":"implements_custom","implements":"implements","extendsinterfaces":"extendsinterfaces","approved_paths":"approved_paths","head":"head","add_licensing_template":"add_licensing_template","main_class_code":"main_class_code","guid":"guid","name":"name"}}';
$power->router = 'ComponentbuilderHelperRoute::getPowerRoute';
- $power->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/power.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","approved","add_head","add_licensing_template"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "extends","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"},{"sourceColumn": "implements","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"}]}';
+ $power->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/power.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","approved","add_head","add_licensing_template"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "extends","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"},{"sourceColumn": "implements","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"},{"sourceColumn": "extendsinterfaces","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"}]}';
// Set the object into the content types table.
$power_Inserted = $db->insertObject('#__content_types', $power);
@@ -8043,9 +8043,9 @@ class Com_ComponentbuilderInstallerScript
$power->type_title = 'Componentbuilder Power';
$power->type_alias = 'com_componentbuilder.power';
$power->table = '{"special": {"dbtable": "#__componentbuilder_power","key": "id","type": "Power","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
- $power->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","namespace":"namespace","type":"type","power_version":"power_version","licensing_template":"licensing_template","description":"description","extends":"extends","approved":"approved","add_head":"add_head","extends_custom":"extends_custom","implements_custom":"implements_custom","implements":"implements","head":"head","approved_paths":"approved_paths","main_class_code":"main_class_code","add_licensing_template":"add_licensing_template","guid":"guid","name":"name"}}';
+ $power->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "system_name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "head","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","namespace":"namespace","type":"type","power_version":"power_version","description":"description","licensing_template":"licensing_template","approved":"approved","extendsinterfaces_custom":"extendsinterfaces_custom","add_head":"add_head","extends":"extends","extends_custom":"extends_custom","implements_custom":"implements_custom","implements":"implements","extendsinterfaces":"extendsinterfaces","approved_paths":"approved_paths","head":"head","add_licensing_template":"add_licensing_template","main_class_code":"main_class_code","guid":"guid","name":"name"}}';
$power->router = 'ComponentbuilderHelperRoute::getPowerRoute';
- $power->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/power.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","approved","add_head","add_licensing_template"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "extends","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"},{"sourceColumn": "implements","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"}]}';
+ $power->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/power.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","version","hits","approved","add_head","add_licensing_template"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "extends","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"},{"sourceColumn": "implements","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"},{"sourceColumn": "extendsinterfaces","targetTable": "#__componentbuilder_power","targetColumn": "guid","displayColumn": "name"}]}';
// Check if power type is already in content_type DB.
$power_id = null;
@@ -9810,7 +9810,7 @@ class Com_ComponentbuilderInstallerScript
echo '
-
Upgrade to Version 3.2.2-alpha2 Was Successful! Let us know if anything is not working as expected.
';
+ Upgrade to Version 3.2.2-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/language/en-GB/en-GB.com_componentbuilder.ini b/site/language/en-GB/en-GB.com_componentbuilder.ini
index 5a431b4d0..252f8b8df 100644
--- a/site/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/site/language/en-GB/en-GB.com_componentbuilder.ini
@@ -101,6 +101,7 @@ 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="File at %s/%s gave the following error!
%s
"
COM_COMPONENTBUILDER_PJOOMLA_POWER_BGUIDSB_NOT_FOUNDP="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!
"
COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_THIS_ERROR_USUALLY_HAPPENS_IF_IT_IS_A_NEW_COMPONENT_BECAUSE_WE_NEED_A_COMPONENT_ID_TO_DO_THIS_BUILD_WITH_YOUR_SQL_DUMP="Please try again, this error usually happens if it is a new component, because we need a component ID to do this build with your sql dump."
COM_COMPONENTBUILDER_PLUGIN="Plugin"
COM_COMPONENTBUILDER_PPOWER_BGUIDSB_NOT_FOUNDP="Power guid:%s not found!
"