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 6cb6f4e77..5a043e195 100644
--- a/componentbuilder_update_server.xml
+++ b/componentbuilder_update_server.xml
@@ -429,10 +429,10 @@
Upgrade to Version 2.8.4 Was Successful! Let us know if anything is not working as expected.
';
+ Upgrade to Version 2.8.5 Was Successful! Let us know if anything is not working as expected.
';
}
}
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index ddf22f7fe..224489707 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -3604,16 +3604,16 @@ abstract class ComponentbuilderHelper
{
if ($external)
{
- if ($name = self::getVar(null, $val, $id, $name, '=', $table))
+ if ($_name = self::getVar(null, $val, $id, $name, '=', $table))
{
- $names[] = $name;
+ $names[] = $_name;
}
}
else
{
- if ($name = self::getVar($table, $val, $id, $name))
+ if ($_name = self::getVar($table, $val, $id, $name))
{
- $names[] = $name;
+ $names[] = $_name;
}
}
}
@@ -4691,7 +4691,7 @@ abstract class ComponentbuilderHelper
*
* @returns string on success
**/
- public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true)
+ public static function safeString($string, $type = 'L', $spacer = '_', $replaceNumbers = true, $keepOnlyCharacters = true)
{
if ($replaceNumbers === true)
{
@@ -4720,7 +4720,16 @@ abstract class ComponentbuilderHelper
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
- $string = preg_replace("/[^A-Za-z ]/", '', $string);
+ // remove all and keep only characters
+ if ($keepOnlyCharacters)
+ {
+ $string = preg_replace("/[^A-Za-z ]/", '', $string);
+ }
+ // keep both numbers and characters
+ else
+ {
+ $string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
+ }
// select final adaptations
if ($type === 'L' || $type === 'strtolower')
{
diff --git a/site/models/api.php b/site/models/api.php
index e3c2cfcab..b19b78e40 100644
--- a/site/models/api.php
+++ b/site/models/api.php
@@ -122,9 +122,6 @@ class ComponentbuilderModelApi extends JModelItem
$app->redirect(JURI::root());
return false;
}
- // Load the JEvent Dispatcher
- JPluginHelper::importPlugin('content');
- $this->_dispatcher = JEventDispatcher::getInstance();
// set data object to item.
$this->_item[$pk] = $data;