Release of v5.1.1-beta5

Completely refactors the SQL tweaks and SQL dump classes.
This commit is contained in:
2025-06-25 20:14:59 +00:00
parent af4b12a82b
commit cf681b2b16
20 changed files with 1415 additions and 1921 deletions

View File

@ -1,7 +1,6 @@
# v5.1.1-beta4
# v5.1.1-beta5
- Fix the FieldXML interface mismatch. #1228
- Adds Initialize, Reset, and Push functionality to the Repository entities.
- Completely refactors the SQL tweaks and SQL dump classes.
# v5.1.1-beta
@ -25,6 +24,8 @@
- Fixes issue with loading the Component Builder Wiki.
- Adds advanced version update notice to the Component Builder Dashboard.
- Completely refactors the class that builds the Component Dashboard. #1134
- Fix the FieldXML interface mismatch. #1228
- Adds Initialize, Reset, and Push functionality to the Repository entities.
# v5.1.0

View File

@ -3292,7 +3292,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 5.1.1-beta4 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 5.1.1-beta5 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();

View File

@ -7,11 +7,11 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
> 🎥 [Original... Quick Hello World Demo](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45), yes JCB has been around for over a decade.
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generatorit's a **full-stack development pipeline for Joomla extensions**.
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x - and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator-it's a **full-stack development pipeline for Joomla extensions**.
You can install this component easily. The latest release (**5.1.1-beta4**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
You can install this component easily. The latest release (**5.1.1-beta5**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
Upgrades are seamless through Joomlas built-in extension update mechanism.
Upgrades are seamless through Joomla's built-in extension update mechanism.
---
@ -19,21 +19,21 @@ Upgrades are seamless through Joomlas built-in extension update mechanism.
Here are just some of the key powers JCB brings:
* 🔁 **Bi-Directional IDE Sync** Fetch custom logic from compiled projects and reintegrate on rebuild.
* 🧱 **Build Joomla Components, Plugins, and Modules** Fully native and independently compiled.
* 🧠 **Superpowers (PHP Class Builder)** Create namespaced abstract, interface, and trait-based PHP classes visually.
* 🔌 **Joomla Powers** Intelligent Joomla class referencing via dynamic placeholders (JPKs) that adapt to Joomla versions.
* 🗃️ **Smart Boilerplating** Start fast with 6+ curated demo blueprints for instant use or customization.
* 🔂 **Round-Trip Development** Add, update, and persist changes across compiled code using insert/replace tags.
* 🔐 **Field Types Engine** Blueprint reusable Joomla-native fields with constraints, security, DB structure, and logic.
* 🧬 **Admin Views, Custom Admin Views & Site Views** Fine-grained design for structured or dynamic backend/front-end UIs.
* 🧮 **Dynamic GET Builder** Advanced visual query designer for cross-table, filter-rich, deeply joined SQL fetches.
* 💡 **Snippets, Layouts, Templates & Libraries** Shareable GUI-linked modules for reusable HTML/CSS/JS integration.
* 🧰 **Custom Code System** Write logic once and reuse anywhere; full support for HTML & PHP placeholders and tracking.
* 🛠️ **Multi-Version Compilation** Compile version-specific code for J3, J4, J5 without compatibility bloat.
* 📦 **Package Management** Export/import blueprints, version control builds, sync with Git, and distribute clean packages.
* 🖥️ **CLI Integration** Build commands natively via terminal using Joomla's CLI runner.
* 🌐 **Update Server Support** Integrate custom update mechanisms for extensions post-deployment.
* 🔁 **Bi-Directional IDE Sync** - Fetch custom logic from compiled projects and reintegrate on rebuild.
* 🧱 **Build Joomla Components, Plugins, and Modules** - Fully native and independently compiled.
* 🧠 **Superpowers (PHP Class Builder)** - Create namespaced abstract, interface, and trait-based PHP classes visually.
* 🔌 **Joomla Powers** - Intelligent Joomla class referencing via dynamic placeholders (JPKs) that adapt to Joomla versions.
* 🗃️ **Smart Boilerplating** - Start fast with 6+ curated demo blueprints for instant use or customization.
* 🔂 **Round-Trip Development** - Add, update, and persist changes across compiled code using insert/replace tags.
* 🔐 **Field Types Engine** - Blueprint reusable Joomla-native fields with constraints, security, DB structure, and logic.
* 🧬 **Admin Views, Custom Admin Views & Site Views** - Fine-grained design for structured or dynamic backend/front-end UIs.
* 🧮 **Dynamic GET Builder** - Advanced visual query designer for cross-table, filter-rich, deeply joined SQL fetches.
* 💡 **Snippets, Layouts, Templates & Libraries** - Shareable GUI-linked modules for reusable HTML/CSS/JS integration.
* 🧰 **Custom Code System** - Write logic once and reuse anywhere; full support for HTML & PHP placeholders and tracking.
* 🛠️ **Multi-Version Compilation** - Compile version-specific code for J3, J4, J5 without compatibility bloat.
* 📦 **Package Management** - Export/import blueprints, version control builds, sync with Git, and distribute clean packages.
* 🖥️ **CLI Integration** - Build commands natively via terminal using Joomla's CLI runner.
* 🌐 **Update Server Support** - Integrate custom update mechanisms for extensions post-deployment.
<details>
<summary>📚 View 100+ Additional Advanced Features</summary>
@ -200,7 +200,7 @@ Here are just some of the key powers JCB brings:
## 📦 Get Started Now
* 🔽 **Download**: [Stable Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) · [Nightly J5](https://git.vdm.dev/joomla/pkg-component-builder/archive/5.x.zip) · [Nightly J4](https://git.vdm.dev/joomla/pkg-component-builder/archive/4.x.zip)
* 📥 **Install**: Use Joomlas extension manager
* 📥 **Install**: Use Joomla's extension manager
* 🎓 **Learn**: [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE) · [How to Install Demo Blueprints](https://vdm.bz/how-to-install-jcb-packages)
---
@ -220,7 +220,7 @@ Here are just some of the key powers JCB brings:
## 🌱 Why It's Free
JCB is developed by developers for developers. Its purpose is to democratize high-performance Joomla development by empowering everyone — from solo builders to large teams — to work with clean, scalable, maintainable, and versionable code. This isnt a template generator — its a full-scale **extension engineering platform**.
JCB is developed by developers for developers. Its purpose is to democratize high-performance Joomla development by empowering everyone — from solo builders to large teams — to work with clean, scalable, maintainable, and versionable code. This isn't a template generator — it's a full-scale **extension engineering platform**.
---
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
* **Company:** [Vast Development Method](https://dev.vdm.io)
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
* **Created:** 30th April, 2015 · **Last Build:** 25th June, 2025 · **Version:** 5.1.1-beta4
* **Created:** 30th April, 2015 · **Last Build:** 25th June, 2025 · **Version:** 5.1.1-beta5
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
* **Lines:** 1093361 · **Fields:** 2096 · **Files:** 7498 · **Folders:** 728
* **Lines:** 1092899 · **Fields:** 2096 · **Files:** 7506 · **Folders:** 728
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.

View File

@ -7,11 +7,11 @@ This is a professional-grade [Joomla 5.x](https://extensions.joomla.org/extensio
> 🎥 [Original... Quick Hello World Demo](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45), yes JCB has been around for over a decade.
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generatorit's a **full-stack development pipeline for Joomla extensions**.
JCB generates native Joomla components, plugins, and modules for Joomla 3.x, 4.x, and 5.x - and is already prepared for Joomla 6. Every compiled project is tailored for the specific version without needing backward compatibility plugins. With integrated version-aware compiling, smart boilerplating, and Git-powered project syncing, JCB is much more than a code generator-it's a **full-stack development pipeline for Joomla extensions**.
You can install this component easily. The latest release (**5.1.1-beta4**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
You can install this component easily. The latest release (**5.1.1-beta5**) is available on [Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) and updated frequently with full source access.
Upgrades are seamless through Joomlas built-in extension update mechanism.
Upgrades are seamless through Joomla's built-in extension update mechanism.
---
@ -19,21 +19,21 @@ Upgrades are seamless through Joomlas built-in extension update mechanism.
Here are just some of the key powers JCB brings:
* 🔁 **Bi-Directional IDE Sync** Fetch custom logic from compiled projects and reintegrate on rebuild.
* 🧱 **Build Joomla Components, Plugins, and Modules** Fully native and independently compiled.
* 🧠 **Superpowers (PHP Class Builder)** Create namespaced abstract, interface, and trait-based PHP classes visually.
* 🔌 **Joomla Powers** Intelligent Joomla class referencing via dynamic placeholders (JPKs) that adapt to Joomla versions.
* 🗃️ **Smart Boilerplating** Start fast with 6+ curated demo blueprints for instant use or customization.
* 🔂 **Round-Trip Development** Add, update, and persist changes across compiled code using insert/replace tags.
* 🔐 **Field Types Engine** Blueprint reusable Joomla-native fields with constraints, security, DB structure, and logic.
* 🧬 **Admin Views, Custom Admin Views & Site Views** Fine-grained design for structured or dynamic backend/front-end UIs.
* 🧮 **Dynamic GET Builder** Advanced visual query designer for cross-table, filter-rich, deeply joined SQL fetches.
* 💡 **Snippets, Layouts, Templates & Libraries** Shareable GUI-linked modules for reusable HTML/CSS/JS integration.
* 🧰 **Custom Code System** Write logic once and reuse anywhere; full support for HTML & PHP placeholders and tracking.
* 🛠️ **Multi-Version Compilation** Compile version-specific code for J3, J4, J5 without compatibility bloat.
* 📦 **Package Management** Export/import blueprints, version control builds, sync with Git, and distribute clean packages.
* 🖥️ **CLI Integration** Build commands natively via terminal using Joomla's CLI runner.
* 🌐 **Update Server Support** Integrate custom update mechanisms for extensions post-deployment.
* 🔁 **Bi-Directional IDE Sync** - Fetch custom logic from compiled projects and reintegrate on rebuild.
* 🧱 **Build Joomla Components, Plugins, and Modules** - Fully native and independently compiled.
* 🧠 **Superpowers (PHP Class Builder)** - Create namespaced abstract, interface, and trait-based PHP classes visually.
* 🔌 **Joomla Powers** - Intelligent Joomla class referencing via dynamic placeholders (JPKs) that adapt to Joomla versions.
* 🗃️ **Smart Boilerplating** - Start fast with 6+ curated demo blueprints for instant use or customization.
* 🔂 **Round-Trip Development** - Add, update, and persist changes across compiled code using insert/replace tags.
* 🔐 **Field Types Engine** - Blueprint reusable Joomla-native fields with constraints, security, DB structure, and logic.
* 🧬 **Admin Views, Custom Admin Views & Site Views** - Fine-grained design for structured or dynamic backend/front-end UIs.
* 🧮 **Dynamic GET Builder** - Advanced visual query designer for cross-table, filter-rich, deeply joined SQL fetches.
* 💡 **Snippets, Layouts, Templates & Libraries** - Shareable GUI-linked modules for reusable HTML/CSS/JS integration.
* 🧰 **Custom Code System** - Write logic once and reuse anywhere; full support for HTML & PHP placeholders and tracking.
* 🛠️ **Multi-Version Compilation** - Compile version-specific code for J3, J4, J5 without compatibility bloat.
* 📦 **Package Management** - Export/import blueprints, version control builds, sync with Git, and distribute clean packages.
* 🖥️ **CLI Integration** - Build commands natively via terminal using Joomla's CLI runner.
* 🌐 **Update Server Support** - Integrate custom update mechanisms for extensions post-deployment.
<details>
<summary>📚 View 100+ Additional Advanced Features</summary>
@ -200,7 +200,7 @@ Here are just some of the key powers JCB brings:
## 📦 Get Started Now
* 🔽 **Download**: [Stable Releases](https://git.vdm.dev/joomla/pkg-component-builder/releases) · [Nightly J5](https://git.vdm.dev/joomla/pkg-component-builder/archive/5.x.zip) · [Nightly J4](https://git.vdm.dev/joomla/pkg-component-builder/archive/4.x.zip)
* 📥 **Install**: Use Joomlas extension manager
* 📥 **Install**: Use Joomla's extension manager
* 🎓 **Learn**: [Tutorials](https://www.youtube.com/playlist?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE) · [How to Install Demo Blueprints](https://vdm.bz/how-to-install-jcb-packages)
---
@ -220,7 +220,7 @@ Here are just some of the key powers JCB brings:
## 🌱 Why It's Free
JCB is developed by developers for developers. Its purpose is to democratize high-performance Joomla development by empowering everyone — from solo builders to large teams — to work with clean, scalable, maintainable, and versionable code. This isnt a template generator — its a full-scale **extension engineering platform**.
JCB is developed by developers for developers. Its purpose is to democratize high-performance Joomla development by empowering everyone — from solo builders to large teams — to work with clean, scalable, maintainable, and versionable code. This isn't a template generator — it's a full-scale **extension engineering platform**.
---
@ -229,9 +229,9 @@ JCB is developed by developers for developers. Its purpose is to democratize hig
* **Company:** [Vast Development Method](https://dev.vdm.io)
* **Author:** [Llewellyn van der Merwe](mailto:joomla@vdm.io)
* **Component:** [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
* **Created:** 30th April, 2015 · **Last Build:** 25th June, 2025 · **Version:** 5.1.1-beta4
* **Created:** 30th April, 2015 · **Last Build:** 25th June, 2025 · **Version:** 5.1.1-beta5
* **License:** GNU General Public License version 2 or later; see LICENSE.txt · **Copyright:** Copyright (C) 2015 Vast Development Method. All rights reserved.
* **Lines:** 1093361 · **Fields:** 2096 · **Files:** 7498 · **Folders:** 728
* **Lines:** 1092899 · **Fields:** 2096 · **Files:** 7506 · **Folders:** 728
> Generated with [JCB](https://www.joomlacomponentbuilder.com) — The Smartest Way to Build Joomla Extensions.

View File

@ -4759,7 +4759,6 @@ COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_HINT="Value/Example Here"
COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_LABEL="Value/Example"
COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_MESSAGE="Error! Please add value/example here."
COM_COMPONENTBUILDER_FIELDTYPE_EXPERT_MODE_CUSTOM="Expert Mode - Custom"
COM_COMPONENTBUILDER_FIELDTYPE_FIELDS="Fields"
COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES="Fieldtypes Categories"
COM_COMPONENTBUILDER_FIELDTYPE_FIFTY="50"
COM_COMPONENTBUILDER_FIELDTYPE_FLOAT="FLOAT"

View File

@ -1,190 +0,0 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\User\UserFactoryInterface;
// No direct access to this file
defined('_JEXEC') or die;
// set the defaults
$items = $displayData->vxifields;
$user = Factory::getApplication()->getIdentity();
$id = $displayData->item->id;
// set the edit URL
$edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
// set a return value
$return = ($id) ? "index.php?option=com_componentbuilder&view=fieldtype&layout=edit&id=" . $id : "";
// check for a return value
$jinput = Factory::getApplication()->input;
if ($_return = $jinput->get('return', null, 'base64'))
{
$return .= "&return=" . $_return;
}
// check if return value was set
if (StringHelper::check($return))
{
// set the referral values
$ref = ($id) ? "&ref=fieldtype&refid=" . $id . "&return=" . urlencode(base64_encode($return)) : "&return=" . urlencode(base64_encode($return));
}
else
{
$ref = ($id) ? "&ref=fieldtype&refid=" . $id : "";
}
// set the create new URL
$new = "index.php?option=com_componentbuilder&view=fields&task=field.add" . $ref;
// set the create new and close URL
$close_new = "index.php?option=com_componentbuilder&view=fields&task=field.add";
// load the action object
$can = ComponentbuilderHelper::getActions('field');
?>
<div class="form-vertical">
<?php if ($can->get('field.create')): ?>
<div class="btn-group">
<a class="btn btn-small btn-success" href="<?php echo $new; ?>"><span class="icon-new icon-white"></span> <?php echo Text::_('COM_COMPONENTBUILDER_NEW'); ?></a>
<a class="btn btn-small" onclick="Joomla.submitbutton('fieldtype.cancel');" href="<?php echo $close_new; ?>"><span class="icon-new"></span> <?php echo Text::_('COM_COMPONENTBUILDER_CLOSE_NEW'); ?></a>
</div><br /><br />
<?php endif; ?>
<?php if (ArrayHelper::check($items)): ?>
<table class="footable table data fields" data-show-toggle="true" data-toggle-column="first" data-sorting="true" data-paging="true" data-paging-size="20" data-filtering="true">
<thead>
<tr>
<th data-type="html" data-sort-use="text">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_NAME_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL'); ?>
</th>
<th data-breakpoints="xs sm" data-type="html" data-sort-use="text">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'); ?>
</th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?>
</th>
<th data-breakpoints="all" data-type="html" data-sort-use="text">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'); ?>
</th>
<th width="10" data-breakpoints="xs sm md">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_STATUS'); ?>
</th>
<th width="5" data-type="number" data-breakpoints="xs sm md">
<?php echo Text::_('COM_COMPONENTBUILDER_FIELD_ID'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $i => $item): ?>
<?php
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
$userChkOut = Factory::getContainer()->
get(UserFactoryInterface::class)->
loadUserById($item->checked_out ?? 0);
$canDo = ComponentbuilderHelper::getActions('field',$item,'fields');
?>
<tr>
<td>
<?php if (!$displayData->isModal && $canDo->get('field.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?><?php echo $ref; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo Html::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'fields.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<?php if (!$displayData->isModal): ?>
<?php echo $displayData->escape($item->name); ?>
<?php else: ?>
<?php
$link = "{$edit}&id={$item->id}";
$dataId = $item->{$displayData->getModalTitleKey()} ?? 0;
$itemHtml = '<a href="' . $displayData->escape($link, false) . '">' . $displayData->escape($item->name, false) . '</a>';
$attribs = 'data-content-select data-content-type="com_componentbuilder.field"'
. ' data-id="' . $dataId . '"'
. ' data-title="' . $displayData->escape($item->name, false) . '"'
. ' data-uri="' . $displayData->escape($link, false) . '"'
. ' data-html="' . $displayData->escape($itemHtml, false) . '"';
?>
<a class="select-link" href="javascript:void(0)" <?php echo $attribs; ?>>
<?php echo $displayData->escape($item->name); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</td>
<td>
<?php echo $displayData->escape($item->fieldtype_name); ?>
</td>
<td>
<?php echo Text::_($item->datatype); ?>
</td>
<td>
<?php echo Text::_($item->indexes); ?>
</td>
<td>
<?php echo Text::_($item->null_switch); ?>
</td>
<td>
<?php echo Text::_($item->store); ?>
</td>
<td>
<?php if (!$displayData->isModal && $user->authorise('core.edit', 'com_componentbuilder.field.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.field"><?php echo $displayData->escape($item->category_title); ?></a>
<?php else: ?>
<?php echo $displayData->escape($item->category_title); ?>
<?php endif; ?>
</td>
<?php if ($item->published == 1): ?>
<td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo Text::_('COM_COMPONENTBUILDER_PUBLISHED'); ?>">
<?php echo Text::_('COM_COMPONENTBUILDER_PUBLISHED'); ?>
</span>
</td>
<?php elseif ($item->published == 0): ?>
<td class="center" data-sort-value="2">
<span class="status-metro status-inactive" title="<?php echo Text::_('COM_COMPONENTBUILDER_INACTIVE'); ?>">
<?php echo Text::_('COM_COMPONENTBUILDER_INACTIVE'); ?>
</span>
</td>
<?php elseif ($item->published == 2): ?>
<td class="center" data-sort-value="3">
<span class="status-metro status-archived" title="<?php echo Text::_('COM_COMPONENTBUILDER_ARCHIVED'); ?>">
<?php echo Text::_('COM_COMPONENTBUILDER_ARCHIVED'); ?>
</span>
</td>
<?php elseif ($item->published == -2): ?>
<td class="center" data-sort-value="4">
<span class="status-metro status-trashed" title="<?php echo Text::_('COM_COMPONENTBUILDER_TRASHED'); ?>">
<?php echo Text::_('COM_COMPONENTBUILDER_TRASHED'); ?>
</span>
</td>
<?php endif; ?>
<td class="nowrap center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<div class="alert alert-no-items">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php endif; ?>
</div>

File diff suppressed because one or more lines are too long

View File

@ -33,7 +33,6 @@ use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Componentbuilder\Utilities\FilterHelper;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\GetHelper;
@ -289,253 +288,10 @@ class FieldtypeModel extends AdminModel
$this->db->updateObject('#__componentbuilder_fieldtype', $objectUpdate, 'id');
}
}
$this->fieldtypevvvv = $item->guid;
return $item;
}
/**
* Method to get list data.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getVxifields()
{
// Get the user object.
$user = Factory::getApplication()->getIdentity();
// Create a new query object.
$db = $this->getDatabase();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
$query->select($db->quoteName('c.title','category_title'));
// From the componentbuilder_field table
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON (' . $db->quoteName('a.catid') . ' = ' . $db->quoteName('c.id') . ')');
// Filtering "extension"
$filter_extension = $this->state->get("filter.extension");
$field_guids = [];
$get_ids = true;
if ($get_ids && $filter_extension !== null && !empty($filter_extension))
{
// column name, and id
$type_extension = explode('__', $filter_extension);
if (($guids = FilterHelper::linked((string) $type_extension[1], (string) $type_extension[0])) !== null)
{
$field_guids = $guids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// Filtering "admin_view"
$filter_admin_view = $this->state->get("filter.admin_view");
if ($get_ids && $filter_admin_view !== null && !empty($filter_admin_view))
{
if (($guids = FilterHelper::linked((string) $filter_admin_view, 'admin_view')) !== null)
{
// view will return less fields, so we ignore the component
$field_guids = $guids;
}
else
{
// there is none
$query->where($db->quoteName('a.id') . ' = ' . 0);
$get_ids = false;
}
}
// now check if we have GUIDs
if ($get_ids && UtilitiesArrayHelper::check($field_guids))
{
$query->where($db->quoteName('a.guid') . ' IN ("' . implode('","', $field_guids) . '")');
}
// From the componentbuilder_fieldtype table.
$query->select($db->quoteName(['g.name','g.id'],['fieldtype_name','fieldtype_id']));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'g') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('g.guid') . ')');
// Filter by fieldtypevvvv global.
$fieldtypevvvv = $this->fieldtypevvvv;
if (is_numeric($fieldtypevvvv ))
{
$query->where('a.fieldtype = ' . (int) $fieldtypevvvv );
}
elseif (is_string($fieldtypevvvv))
{
$query->where('a.fieldtype = ' . $db->quote($fieldtypevvvv));
}
else
{
$query->where('a.fieldtype = -5');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
$_access = $this->getState('filter.access');
if ($_access && is_numeric($_access))
{
$query->where('a.access = ' . (int) $_access);
}
elseif (UtilitiesArrayHelper::check($_access))
{
// Secure the array for the query
$_access = ArrayHelper::toInteger($_access);
// Filter by the Access Array.
$query->where('a.access IN (' . implode(',', $_access) . ')');
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Order the results by ordering
$query->order('a.published ASC');
$query->order('a.ordering ASC');
// Load the items
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
$items = $db->loadObjectList();
// Set values to display correctly.
if (UtilitiesArrayHelper::check($items))
{
// Get the user object if not set.
if (!isset($user) || !ObjectHelper::check($user))
{
$user = $this->getCurrentUser();
}
foreach ($items as $nr => &$item)
{
// Remove items the user can't access.
$access = ($user->authorise('field.access', 'com_componentbuilder.field.' . (int) $item->id) && $user->authorise('field.access', 'com_componentbuilder'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// set selection value to a translatable value
if (UtilitiesArrayHelper::check($items))
{
foreach ($items as $nr => &$item)
{
// convert datatype
$item->datatype = $this->selectionTranslationVxifields($item->datatype, 'datatype');
// convert indexes
$item->indexes = $this->selectionTranslationVxifields($item->indexes, 'indexes');
// convert null_switch
$item->null_switch = $this->selectionTranslationVxifields($item->null_switch, 'null_switch');
// convert store
$item->store = $this->selectionTranslationVxifields($item->store, 'store');
}
}
return $items;
}
return false;
}
/**
* Method to convert selection values to translatable string.
*
* @return string The translatable string.
*/
public function selectionTranslationVxifields($value,$name)
{
// Array of datatype language strings
if ($name === 'datatype')
{
$datatypeArray = array(
0 => 'COM_COMPONENTBUILDER_FIELD_SELECT_AN_OPTION',
'CHAR' => 'COM_COMPONENTBUILDER_FIELD_CHAR',
'VARCHAR' => 'COM_COMPONENTBUILDER_FIELD_VARCHAR',
'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT',
'MEDIUMTEXT' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT',
'LONGTEXT' => 'COM_COMPONENTBUILDER_FIELD_LONGTEXT',
'BLOB' => 'COM_COMPONENTBUILDER_FIELD_BLOB',
'TINYBLOB' => 'COM_COMPONENTBUILDER_FIELD_TINYBLOB',
'MEDIUMBLOB' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMBLOB',
'LONGBLOB' => 'COM_COMPONENTBUILDER_FIELD_LONGBLOB',
'DATETIME' => 'COM_COMPONENTBUILDER_FIELD_DATETIME',
'DATE' => 'COM_COMPONENTBUILDER_FIELD_DATE',
'TIME' => 'COM_COMPONENTBUILDER_FIELD_TIME',
'INT' => 'COM_COMPONENTBUILDER_FIELD_INT',
'TINYINT' => 'COM_COMPONENTBUILDER_FIELD_TINYINT',
'BIGINT' => 'COM_COMPONENTBUILDER_FIELD_BIGINT',
'FLOAT' => 'COM_COMPONENTBUILDER_FIELD_FLOAT',
'DECIMAL' => 'COM_COMPONENTBUILDER_FIELD_DECIMAL',
'DOUBLE' => 'COM_COMPONENTBUILDER_FIELD_DOUBLE'
);
// Now check if value is found in this array
if (isset($datatypeArray[$value]) && UtilitiesStringHelper::check($datatypeArray[$value]))
{
return $datatypeArray[$value];
}
}
// Array of indexes language strings
if ($name === 'indexes')
{
$indexesArray = array(
1 => 'COM_COMPONENTBUILDER_FIELD_UNIQUE_KEY',
2 => 'COM_COMPONENTBUILDER_FIELD_KEY',
0 => 'COM_COMPONENTBUILDER_FIELD_NONE'
);
// Now check if value is found in this array
if (isset($indexesArray[$value]) && UtilitiesStringHelper::check($indexesArray[$value]))
{
return $indexesArray[$value];
}
}
// Array of null_switch language strings
if ($name === 'null_switch')
{
$null_switchArray = array(
'NULL' => 'COM_COMPONENTBUILDER_FIELD_NULL',
'NOT NULL' => 'COM_COMPONENTBUILDER_FIELD_NOT_NULL'
);
// Now check if value is found in this array
if (isset($null_switchArray[$value]) && UtilitiesStringHelper::check($null_switchArray[$value]))
{
return $null_switchArray[$value];
}
}
// Array of store language strings
if ($name === 'store')
{
$storeArray = array(
0 => 'COM_COMPONENTBUILDER_FIELD_DEFAULT',
1 => 'COM_COMPONENTBUILDER_FIELD_JSON',
2 => 'COM_COMPONENTBUILDER_FIELD_BASE64',
3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY',
5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY',
6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM'
);
// Now check if value is found in this array
if (isset($storeArray[$value]) && UtilitiesStringHelper::check($storeArray[$value]))
{
return $storeArray[$value];
}
}
return $value;
}
/**
* Method to get the record form.
*

View File

@ -181,9 +181,6 @@ class HtmlView extends BaseHtmlView
$this->referral .= '&return=' . (string) $return;
}
// Get Linked view data
$this->vxifields = $this->get('Vxifields');
// Set the toolbar
if ($this->getLayout() !== 'modal')
{
@ -421,16 +418,6 @@ class HtmlView extends BaseHtmlView
}
// Add Ajax Token
$this->getDocument()->addScriptDeclaration("var token = '" . Session::getFormToken() . "';");
// Add the CSS for Footable
Html::_('stylesheet', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', ['version' => 'auto']);
Html::_('stylesheet', 'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css', ['version' => 'auto']);
// Add the JavaScript for Footable (adding all functions)
Html::_('script', 'media/com_componentbuilder/footable-v3/js/footable.min.js', ['version' => 'auto']);
$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});";
$this->getDocument()->addScriptDeclaration($footable);
// add scripts
foreach ($this->scripts as $script)
{

View File

@ -79,18 +79,6 @@ $tmpl = $tmpl ? '&tmpl=' . $tmpl : '';
</div>
<?php echo Html::_('uitab.endTab'); ?>
<?php if ($this->canDo->get('field.access')) : ?>
<?php echo Html::_('uitab.addTab', 'fieldtypeTab', 'fields', Text::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDS', true)); ?>
<div class="row">
</div>
<div class="row">
<div class="col-md-12">
<?php echo LayoutHelper::render('fieldtype.fields_fullwidth', $this); ?>
</div>
</div>
<?php echo Html::_('uitab.endTab'); ?>
<?php endif; ?>
<?php $this->ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>
<?php $this->tab_name = 'fieldtypeTab'; ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>

View File

@ -7,9 +7,9 @@
<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>5.1.1-beta4</version>
<version>5.1.1-beta5</version>
<description><![CDATA[
<h1>Component Builder (v.5.1.1-beta4)</h1>
<h1>Component Builder (v.5.1.1-beta5)</h1>
<div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.

View File

@ -134,7 +134,7 @@
<version>5.1.1-beta</version>
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta4.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta5.zip</downloadurl>
</downloads>
<tags>
<tag>beta</tag>
@ -149,10 +149,10 @@
<element>pkg_component_builder</element>
<type>package</type>
<client>site</client>
<version>5.1.1-beta4</version>
<version>5.1.1-beta5</version>
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta4.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/vdm-io/pkg-component-builder/archive/refs/tags/v5.1.1-beta5.zip</downloadurl>
</downloads>
<tags>
<tag>beta</tag>

View File

@ -15,6 +15,7 @@ namespace VDM\Joomla\Abstraction;
use Joomla\CMS\Factory;
use Joomla\Database\DatabaseInterface as JoomlaDatabase;
use VDM\Joomla\Utilities\Component\Helper;
use VDM\Joomla\Database\QuoteTrait;
/**
@ -24,6 +25,13 @@ use VDM\Joomla\Utilities\Component\Helper;
*/
abstract class Database
{
/**
* Function to quote values
*
* @since 5.1.1
*/
use QuoteTrait;
/**
* Database object to query local DB
*
@ -32,14 +40,6 @@ abstract class Database
*/
protected JoomlaDatabase $db;
/**
* Date format to return
*
* @var string
* @since 5.0.2
*/
protected string $dateFormat = 'Y-m-d H:i:s';
/**
* Current component code name
*
@ -70,82 +70,6 @@ abstract class Database
$this->table = '#__' . $this->componentCode;
}
/**
* Safely quote a value for database use, preserving data integrity.
*
* - Native ints/floats passed as-is
* - Clean integer strings are cast to int
* - Clean float strings are cast to float
* - Scientific notation is quoted to preserve original form
* - Leading-zero integers are quoted
* - Dates are formatted and quoted
* - Booleans are converted to TRUE/FALSE
* - Null is converted to NULL
* - All else is quoted with Joomla's db quote
*
* @param mixed $value The value to quote.
*
* @return mixed
* @since 3.2.0
*/
protected function quote($value)
{
// NULL handling
if ($value === null)
{
return 'NULL';
}
// DateTime handling
if ($value instanceof \DateTimeInterface)
{
return $this->db->quote($value->format($this->getDateFormat()));
}
// Native numeric types
if (is_int($value) || is_float($value))
{
return $value;
}
// Stringified numeric values
if (is_string($value) && is_numeric($value))
{
// Case 1: Leading-zero integers like "007"
if ($value[0] === '0' && strlen($value) > 1 && ctype_digit($value))
{
return $this->db->quote($value);
}
// Case 2: Scientific notation - preserve exact format
if (stripos($value, 'e') !== false)
{
return $this->db->quote($value);
}
// Case 3: Decimal float string (not scientific)
if (str_contains($value, '.'))
{
return (float) $value;
}
// Case 4: Pure integer string
if (ctype_digit($value))
{
return (int) $value;
}
}
// Boolean handling
if (is_bool($value))
{
return $value ? 'TRUE' : 'FALSE';
}
// Everything else
return $this->db->quote($value);
}
/**
* Set a table name, adding the
* core component as needed

View File

@ -55,6 +55,8 @@ class Infusion extends Interpretation
*/
public $removeSiteEditFolder = true;
public $secondRunAdmin;
/**
* Constructor
*/

View File

@ -63,8 +63,17 @@ class Sql
*/
public function set(object &$item)
{
if (isset($item->add_sql) && (int) $item->add_sql === 1 && isset($item->source))
if (isset($item->add_sql) && (int) $item->add_sql === 1
&& isset($item->source) && isset($item->name_single_code))
{
// avoid setting this a multiple time for the same name_singe_code
if ((int) $item->source === 1 && isset($this->dispenser->hub['sql'])
&& is_array($this->dispenser->hub['sql'])
&& isset($this->dispenser->hub['sql'][$item->name_single_code]))
{
return;
}
if ((int) $item->source === 1 && isset($item->tables) &&
($string = $this->dump->get(
$item->tables, $item->name_single_code, $item->guid

View File

@ -13,10 +13,10 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use Joomla\CMS\Factory;
use Joomla\Database\DatabaseInterface as JoomlaDatabase;
use VDM\Joomla\Componentbuilder\Compiler\Registry;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Database\QuoteTrait;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Utilities\StringHelper;
/**
@ -26,6 +26,13 @@ use VDM\Joomla\Utilities\StringHelper;
*/
class Sqldump
{
/**
* Function to quote values
*
* @since 5.1.1
*/
use QuoteTrait;
/**
* The compiler registry
*
@ -37,251 +44,91 @@ class Sqldump
/**
* Database object to query local DB
*
* @var JoomlaDatabase
* @since 3.2.0
**/
protected $db;
protected JoomlaDatabase $db;
/**
* Constructor
*
* @param Registry $registry The compiler registry object.
* @param Registry $registry The compiler registry object.
* @param JoomlaDatabase|null $db The joomla database object.
* @since 3.2.0
*/
public function __construct(Registry $registry)
public function __construct(Registry $registry, ?JoomlaDatabase $db = null)
{
$this->registry = $registry;
$this->db = Factory::getDbo();
$this->db = $db ?: Factory::getContainer()->get(JoomlaDatabase::class);
}
/**
* Get SQL Dump
* Generate SQL dump for given view data.
*
* @param array $tables The tables to use in build
* @param string $view The target view/table to dump in
* @param string $view_guid The guid of the target view
* @param array $tables Tables configuration array.
* @param string $view Target view name.
* @param string $viewGuid Unique GUID for view (used in registry path).
*
* @return string|null The data found with the alias
* @since 3.2.0
* @return string|null SQL dump or null on failure.
* @since 3.2.0
*/
public function get(array $tables, string $view, string $view_guid): ?string
public function get(array $tables, string $view, string $viewGuid): ?string
{
// first build a query statement to get all the data (insure it must be added - check the tweaking)
if (ArrayHelper::check($tables)
&& $this->registry-> // default is to add
get('builder.sql_tweak.' . $view_guid . '.add', true))
if (empty($tables) || !$this->shouldBuildDump($viewGuid))
{
$counter = 'a';
return null;
}
// Create a new query object.
$query = $this->db->getQuery(true);
$query = $this->db->getQuery(true);
$runQuery = false;
$alias = 'a';
$fieldsAdded = false;
// switch to only trigger the run of the query if we have tables to query
$run_query = false;
foreach ($tables as $table)
foreach ($tables as $tableConfig)
{
if (empty($tableConfig['table']) || empty($tableConfig['sourcemap']))
{
if (isset($table['table']))
continue;
}
$fieldMappings = $this->parseFieldMappings($tableConfig['sourcemap'], $alias);
if ($alias === 'a')
{
if (!empty($fieldMappings['select']))
{
if ($counter === 'a')
{
// the main table fields
if (strpos((string) $table['sourcemap'], PHP_EOL) !== false)
{
$fields = explode(PHP_EOL, (string) $table['sourcemap']);
if (ArrayHelper::check($fields))
{
// reset array buckets
$sourceArray = [];
$targetArray = [];
foreach ($fields as $field)
{
if (strpos($field, "=>") !== false)
{
list($source, $target) = explode(
"=>", $field
);
$sourceArray[] = $counter . '.' . trim(
$source
);
$targetArray[] = trim($target);
}
}
if (ArrayHelper::check(
$sourceArray
)
&& ArrayHelper::check(
$targetArray
))
{
// add to query
$query->select(
$this->db->quoteName(
$sourceArray, $targetArray
)
);
$query->from(
'#__' . $table['table'] . ' AS a'
);
$run_query = true;
}
// we may need to filter the selection
if (($ids_ = $this->registry->
get('builder.sql_tweak.' . $view_guid . '.where', null)) !== null)
{
// add to query the where filter
$query->where(
'a.id IN (' . $ids_ . ')'
);
}
}
}
}
else
{
// the other tables
if (strpos((string) $table['sourcemap'], PHP_EOL) !== false)
{
$fields = explode(PHP_EOL, (string) $table['sourcemap']);
if (ArrayHelper::check($fields))
{
// reset array buckets
$sourceArray = [];
$targetArray = [];
foreach ($fields as $field)
{
if (strpos($field, "=>") !== false)
{
list($source, $target) = explode(
"=>", $field
);
$sourceArray[] = $counter . '.' . trim(
$source
);
$targetArray[] = trim($target);
}
if (strpos($field, "==") !== false)
{
list($aKey, $bKey) = explode(
"==", $field
);
// add to query
$query->join(
'LEFT', $this->db->quoteName(
'#__' . $table['table'],
$counter
) . ' ON (' . $this->db->quoteName(
'a.' . trim($aKey)
) . ' = ' . $this->db->quoteName(
$counter . '.' . trim($bKey)
) . ')'
);
}
}
if (ArrayHelper::check(
$sourceArray
)
&& ArrayHelper::check(
$targetArray
))
{
// add to query
$query->select(
$this->db->quoteName(
$sourceArray, $targetArray
)
);
}
}
}
}
$counter++;
$query->select($this->db->quoteName($fieldMappings['select'], $fieldMappings['alias']));
$query->from($this->db->quoteName('#__' . $tableConfig['table'], $alias));
$this->applyWhereFilter($query, $viewGuid);
$fieldsAdded = true;
$runQuery = true;
}
else
}
else
{
$this->applyJoins($query, $tableConfig['table'], $alias, $fieldMappings['joins']);
if (!empty($fieldMappings['select']))
{
// see where
// var_dump($view, $view_guid);
// exit;
$query->select($this->db->quoteName($fieldMappings['select'], $fieldMappings['alias']));
$fieldsAdded = true;
}
}
// check if we should run query
if ($run_query)
{
try{
// now get the data
$this->db->setQuery($query);
$this->db->execute();
if ($this->db->getNumRows())
{
// get the data
$data = $this->db->loadObjectList();
$alias++;
}
// start building the MySql dump
$dump = "--";
$dump .= PHP_EOL . "-- Dumping data for table `#__"
. Placefix::_("component") . "_" . $view
. "`";
$dump .= PHP_EOL . "--";
$dump .= PHP_EOL . PHP_EOL . "INSERT INTO `#__" . Placefix::_("component") . "_" . $view . "` (";
foreach ($data as $line)
{
$comaSet = 0;
foreach ($line as $fieldName => $fieldValue)
{
if ($comaSet == 0)
{
$dump .= $this->db->quoteName($fieldName);
}
else
{
$dump .= ", " . $this->db->quoteName(
$fieldName
);
}
$comaSet++;
}
break;
}
$dump .= ") VALUES";
$coma = 0;
foreach ($data as $line)
{
if ($coma == 0)
{
$dump .= PHP_EOL . "(";
}
else
{
$dump .= "," . PHP_EOL . "(";
}
$comaSet = 0;
foreach ($line as $fieldName => $fieldValue)
{
if ($comaSet == 0)
{
$dump .= $this->escape($fieldValue);
}
else
{
$dump .= ", " . $this->escape(
$fieldValue
);
}
$comaSet++;
}
$dump .= ")";
$coma++;
}
$dump .= ";";
if ($runQuery && $fieldsAdded)
{
try {
$this->db->setQuery($query)->execute();
// return build dump query
return $dump;
}
} catch (\Throwable $e) {
// see where
// var_dump($view, $view_guid);
// exit;
if ($this->db->getNumRows())
{
$data = $this->db->loadObjectList();
return $this->buildSqlDump($view, $data);
}
} catch (\Throwable $e) {
// Log or handle exception if needed
}
}
@ -289,35 +136,141 @@ class Sqldump
}
/**
* Escape the values for a SQL dump
* Determine if a dump should be built.
*
* @param string|array $value the value to escape
* @param string $viewGuid
*
* @return string|array on success with escaped string
* @since 3.2.0
* @return bool
* @since 5.1.1
*/
protected function shouldBuildDump(string $viewGuid): bool
{
return (bool) $this->registry->get("builder.sql_tweak.{$viewGuid}.add", true);
}
/**
* Apply optional WHERE clause if set in registry.
*
* @param $query
* @param string $viewGuid
*
* @return void
* @since 5.1.1
*/
protected function applyWhereFilter($query, string $viewGuid): void
{
if ($ids = $this->registry->get("builder.sql_tweak.{$viewGuid}.where"))
{
$query->where("a.id IN ({$ids})");
}
}
/**
* Parse sourcemap lines into SELECT and JOIN definitions.
*
* @param string $map
* @param string $alias
*
* @return array{select: string[], alias: string[], joins: array<int, array{from: string, to: string}>}
* @since 5.1.1
*/
protected function parseFieldMappings(string $map, string $alias): array
{
$lines = explode(PHP_EOL, trim($map));
$select = [];
$aliasFields = [];
$joins = [];
foreach ($lines as $line)
{
$line = trim($line);
if (str_contains($line, '=>'))
{
[$from, $to] = array_map('trim', explode('=>', $line));
$select[] = "{$alias}.{$from}";
$aliasFields[] = $to;
}
elseif (str_contains($line, '=='))
{
[$left, $right] = array_map('trim', explode('==', $line));
$joins[] = ['from' => $left, 'to' => $right];
}
}
return [
'select' => $select,
'alias' => $aliasFields,
'joins' => $joins,
];
}
/**
* Apply JOINs to the query.
*
* @param $query
* @param string $table
* @param string $alias
* @param array $joins
*
* @return void
* @since 5.1.1
*/
protected function applyJoins($query, string $table, string $alias, array $joins): void
{
foreach ($joins as $join)
{
$query->join(
'LEFT',
$this->db->quoteName("#__{$table}", $alias) . ' ON (' .
$this->db->quoteName("a.{$join['from']}") . ' = ' .
$this->db->quoteName("{$alias}.{$join['to']}") . ')'
);
}
}
/**
* Build the SQL INSERT DUMP statement from data.
*
* @param string $view
* @param array<object> $data
*
* @return string
* @since 5.1.1
*/
protected function buildSqlDump(string $view, array $data): string
{
$tableName = "#__" . Placefix::_("component") . "_{$view}";
$fields = array_keys((array) $data[0]);
$header = "--\n-- Dumping data for table `{$tableName}`\n--\n";
$insert = "INSERT INTO `{$tableName}` (" . implode(', ', array_map([$this->db, 'quoteName'], $fields)) . ") VALUES\n";
$rows = array_map(function ($row)
{
$values = array_map([$this, 'escape'], (array) $row);
return '(' . implode(', ', $values) . ')';
}, $data);
return $header . $insert . implode(",\n", $rows) . ";";
}
/**
* Escape SQL value for safe dump using strict quoting rules.
*
* @param mixed $value The value to escape.
*
* @return mixed Escaped SQL-safe literal or quoted string.
* @since 3.2.0
*/
protected function escape($value)
{
// if array then return mapped
if (ArrayHelper::check($value))
if (is_array($value))
{
return array_map(__METHOD__, $value);
return implode(', ', array_map([$this, 'escape'], $value));
}
// if string make sure it is correctly escaped
if (StringHelper::check($value) && !is_numeric($value))
{
return $this->db->quote($value);
}
// if empty value return place holder
if (empty($value))
{
return "''";
}
// if not array or string then return number
return $value;
return $this->quote($value);
}
}

View File

@ -15,7 +15,6 @@ namespace VDM\Joomla\Componentbuilder\Compiler\Model;
use VDM\Joomla\Componentbuilder\Compiler\Registry;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\ObjectHelper;
/**
@ -63,117 +62,101 @@ class Sqltweaking
if (ArrayHelper::check($item->sql_tweak))
{
// build the tweak settings
$this->tweak(
array_map(
fn($array) => array_map(
function ($value) {
if (!ArrayHelper::check($value)
&& !ObjectHelper::check(
$value
)
&& strval($value) === strval(
intval($value)
))
{
return $value;
}
return $value;
}, $array
), array_values($item->sql_tweak)
)
);
$this->tweak($item->sql_tweak);
}
unset($item->sql_tweak);
}
/**
* To limit the SQL Demo data build in the views
* Limit the SQL Demo data build in the views by applying tweak settings.
*
* @param array $settings Tweaking array.
* @param array $settings The tweak configuration array.
*
* @return void
* @since 3.2.0
* @since 3.2.0
*/
protected function tweak($settings)
protected function tweak(array $settings): void
{
if (ArrayHelper::check($settings))
if (!ArrayHelper::check($settings))
{
foreach ($settings as $setting)
return;
}
foreach ($settings as $setting)
{
$adminView = $setting['adminview'] ?? null;
if (!$adminView)
{
// should sql dump be added
if (1 == $setting['add_sql'])
continue;
}
$addSql = (int) ($setting['add_sql'] ?? 0);
$addSqlOptions = (int) ($setting['add_sql_options'] ?? 0);
if ($addSql === 1 && $addSqlOptions === 2)
{
$ids = $setting['ids'] ?? '';
$idArray = $this->normalizeIds($ids);
if (!empty($idArray))
{
// add sql (by option)
if (2 == $setting['add_sql_options'])
{
// rest always
$id_array = [];
// by id (first remove backups)
$ids = $setting['ids'];
// now get the ids
if (strpos((string) $ids, ',') !== false)
{
$id_array = (array) array_map(
'trim', explode(',', (string) $ids)
);
}
else
{
$id_array[] = trim((string) $ids);
}
$id_array_new = [];
// check for ranges
foreach ($id_array as $key => $id)
{
if (strpos($id, '=>') !== false)
{
$id_range = (array) array_map(
'trim', explode('=>', $id)
);
unset($id_array[$key]);
// build range
if (count((array) $id_range) == 2)
{
$range = range(
$id_range[0], $id_range[1]
);
$id_array_new = [...$id_array_new, ...$range];
}
}
}
if (ArrayHelper::check($id_array_new))
{
$id_array = [...$id_array_new, ...$id_array];
}
// final fixing to array
if (ArrayHelper::check($id_array))
{
// unique
$id_array = array_unique($id_array, SORT_NUMERIC);
// sort
sort($id_array, SORT_NUMERIC);
// now set it to global
$this->registry->
set('builder.sql_tweak.' . $setting['adminview'] . '.where', implode(',', $id_array));
}
}
}
else
{
// do not add sql dump options
$this->registry->
set('builder.sql_tweak.' . $setting['adminview'] . '.add', false);
$this->registry->set(
'builder.sql_tweak.' . $adminView . '.where',
implode(',', $idArray)
);
}
}
elseif ($addSql === 0)
{
$this->registry->set(
'builder.sql_tweak.' . $adminView . '.add',
false
);
}
}
}
/**
* Normalize a comma-separated string of IDs or ID ranges into a unique, sorted array.
*
* Supports individual IDs (e.g., "1,3,5") and ranges (e.g., "10 => 12").
*
* @param string $ids Raw ID string from settings.
*
* @return array<int> Normalized list of numeric IDs.
* @since 5.1.1
*/
private function normalizeIds(string $ids): array
{
$rawIds = array_map('trim', explode(',', $ids));
$finalIds = [];
foreach ($rawIds as $id)
{
if (strpos($id, '=>') !== false)
{
$rangeParts = array_map('trim', explode('=>', $id));
if (count($rangeParts) === 2 && is_numeric($rangeParts[0]) && is_numeric($rangeParts[1]))
{
$range = range((int) $rangeParts[0], (int) $rangeParts[1]);
$finalIds = array_merge($finalIds, $range);
continue;
}
}
if (is_numeric($id))
{
$finalIds[] = (int) $id;
}
}
$finalIds = array_unique($finalIds, SORT_NUMERIC);
sort($finalIds, SORT_NUMERIC);
return $finalIds;
}
}

View File

@ -0,0 +1,120 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September, 2022
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace VDM\Joomla\Database;
/**
* Database Quote Trait
*
* @since 5.1.1
*/
trait QuoteTrait
{
/**
* Date format to return
*
* @var string
* @since 5.0.2
*/
protected string $dateFormat = 'Y-m-d H:i:s';
/**
* Safely quote a value for database use, preserving data integrity.
*
* - Native ints/floats passed as-is
* - Clean integer strings are cast to int
* - Clean float strings are cast to float
* - Scientific notation is quoted to preserve original form
* - Leading-zero integers are quoted
* - Dates are formatted and quoted
* - Booleans are converted to TRUE/FALSE
* - Null is converted to NULL
* - All else is quoted with Joomla's db quote
*
* @param mixed $value The value to quote.
*
* @return mixed
* @since 3.2.0
*/
protected function quote($value)
{
// NULL handling
if ($value === null)
{
return 'NULL';
}
// DateTime handling
if ($value instanceof \DateTimeInterface)
{
return $this->db->quote($value->format($this->getDateFormat()));
}
// Native numeric types
if (is_int($value) || is_float($value))
{
return $value;
}
// Stringified numeric values
if (is_string($value) && is_numeric($value))
{
// Case 1: Leading-zero integers like "007"
if ($value[0] === '0' && strlen($value) > 1 && ctype_digit($value))
{
return $this->db->quote($value);
}
// Case 2: Scientific notation - preserve exact format
if (stripos($value, 'e') !== false)
{
return $this->db->quote($value);
}
// Case 3: Decimal float string (not scientific)
if (str_contains($value, '.'))
{
return (float) $value;
}
// Case 4: Pure integer string
if (ctype_digit($value))
{
return (int) $value;
}
}
// Boolean handling
if (is_bool($value))
{
return $value ? 'TRUE' : 'FALSE';
}
// Everything else
return $this->db->quote($value);
}
/**
* Get the date format used for SQL dumps.
*
* This format is used when quoting DateTimeInterface values
* to ensure consistent formatting in INSERT statements.
*
* @return string The SQL-compatible date format.
* @since 5.0.2
*/
protected function getDateFormat(): string
{
return $this->dateFormat;
}
}

View File

@ -9,11 +9,11 @@
*/
// Some Global Values
jform_vvvvwcivxs_required = false;
jform_vvvvwcjvxt_required = false;
jform_vvvvwckvxu_required = false;
jform_vvvvwclvxv_required = false;
jform_vvvvwcnvxw_required = false;
jform_vvvvwcivxr_required = false;
jform_vvvvwcjvxs_required = false;
jform_vvvvwckvxt_required = false;
jform_vvvvwclvxu_required = false;
jform_vvvvwcnvxv_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
@ -45,26 +45,26 @@ function vvvvwci(location_vvvvwci)
{
jQuery('#jform_admin_view').closest('.control-group').show();
// add required attribute to admin_view field
if (jform_vvvvwcivxs_required)
if (jform_vvvvwcivxr_required)
{
updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required');
jform_vvvvwcivxs_required = false;
jform_vvvvwcivxr_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
// remove required attribute from admin_view field
if (!jform_vvvvwcivxs_required)
if (!jform_vvvvwcivxr_required)
{
updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required');
jform_vvvvwcivxs_required = true;
jform_vvvvwcivxr_required = true;
}
}
}
@ -77,26 +77,26 @@ function vvvvwcj(location_vvvvwcj)
{
jQuery('#jform_site_view').closest('.control-group').show();
// add required attribute to site_view field
if (jform_vvvvwcjvxt_required)
if (jform_vvvvwcjvxs_required)
{
updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required');
jform_vvvvwcjvxt_required = false;
jform_vvvvwcjvxs_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
// remove required attribute from site_view field
if (!jform_vvvvwcjvxt_required)
if (!jform_vvvvwcjvxs_required)
{
updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required');
jform_vvvvwcjvxt_required = true;
jform_vvvvwcjvxs_required = true;
}
}
}
@ -122,26 +122,26 @@ function vvvvwck(type_vvvvwck)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvwckvxu_required)
if (jform_vvvvwckvxt_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvwckvxu_required = false;
jform_vvvvwckvxt_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvwckvxu_required)
if (!jform_vvvvwckvxt_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvwckvxu_required = true;
jform_vvvvwckvxt_required = true;
}
}
}
@ -178,26 +178,26 @@ function vvvvwcl(type_vvvvwcl)
{
jQuery('#jform_article').closest('.control-group').show();
// add required attribute to article field
if (jform_vvvvwclvxv_required)
if (jform_vvvvwclvxu_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvwclvxv_required = false;
jform_vvvvwclvxu_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
// remove required attribute from article field
if (!jform_vvvvwclvxv_required)
if (!jform_vvvvwclvxu_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvwclvxv_required = true;
jform_vvvvwclvxu_required = true;
}
}
}
@ -259,26 +259,26 @@ function vvvvwcn(target_vvvvwcn)
{
jQuery('#jform_groups').closest('.control-group').show();
// add required attribute to groups field
if (jform_vvvvwcnvxw_required)
if (jform_vvvvwcnvxv_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_vvvvwcnvxw_required = false;
jform_vvvvwcnvxv_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
// remove required attribute from groups field
if (!jform_vvvvwcnvxw_required)
if (!jform_vvvvwcnvxv_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_vvvvwcnvxw_required = true;
jform_vvvvwcnvxv_required = true;
}
}
}

View File

@ -9,15 +9,15 @@
*/
// Some Global Values
jform_vvvvwbyvxi_required = false;
jform_vvvvwbyvxj_required = false;
jform_vvvvwbyvxk_required = false;
jform_vvvvwbyvxl_required = false;
jform_vvvvwbyvxm_required = false;
jform_vvvvwbyvxn_required = false;
jform_vvvvwbzvxo_required = false;
jform_vvvvwcavxp_required = false;
jform_vvvvwccvxq_required = false;
jform_vvvvwcevxr_required = false;
jform_vvvvwbzvxn_required = false;
jform_vvvvwcavxo_required = false;
jform_vvvvwccvxp_required = false;
jform_vvvvwcevxq_required = false;
// Initial Script
document.addEventListener('DOMContentLoaded', function()
@ -66,108 +66,108 @@ function vvvvwby(protocol_vvvvwby)
{
jQuery('#jform_authentication').closest('.control-group').show();
// add required attribute to authentication field
if (jform_vvvvwbyvxj_required)
if (jform_vvvvwbyvxi_required)
{
updateFieldRequired('authentication',0);
jQuery('#jform_authentication').prop('required','required');
jQuery('#jform_authentication').attr('aria-required',true);
jQuery('#jform_authentication').addClass('required');
jform_vvvvwbyvxj_required = false;
jform_vvvvwbyvxi_required = false;
}
jQuery('#jform_host').closest('.control-group').show();
// add required attribute to host field
if (jform_vvvvwbyvxk_required)
if (jform_vvvvwbyvxj_required)
{
updateFieldRequired('host',0);
jQuery('#jform_host').prop('required','required');
jQuery('#jform_host').attr('aria-required',true);
jQuery('#jform_host').addClass('required');
jform_vvvvwbyvxk_required = false;
jform_vvvvwbyvxj_required = false;
}
jQuery('#jform_port').closest('.control-group').show();
// add required attribute to port field
if (jform_vvvvwbyvxl_required)
if (jform_vvvvwbyvxk_required)
{
updateFieldRequired('port',0);
jQuery('#jform_port').prop('required','required');
jQuery('#jform_port').attr('aria-required',true);
jQuery('#jform_port').addClass('required');
jform_vvvvwbyvxl_required = false;
jform_vvvvwbyvxk_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
// add required attribute to path field
if (jform_vvvvwbyvxm_required)
if (jform_vvvvwbyvxl_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
jform_vvvvwbyvxm_required = false;
jform_vvvvwbyvxl_required = false;
}
jQuery('.note_ssh_security').closest('.control-group').show();
jQuery('#jform_username').closest('.control-group').show();
// add required attribute to username field
if (jform_vvvvwbyvxn_required)
if (jform_vvvvwbyvxm_required)
{
updateFieldRequired('username',0);
jQuery('#jform_username').prop('required','required');
jQuery('#jform_username').attr('aria-required',true);
jQuery('#jform_username').addClass('required');
jform_vvvvwbyvxn_required = false;
jform_vvvvwbyvxm_required = false;
}
}
else
{
jQuery('#jform_authentication').closest('.control-group').hide();
// remove required attribute from authentication field
if (!jform_vvvvwbyvxj_required)
if (!jform_vvvvwbyvxi_required)
{
updateFieldRequired('authentication',1);
jQuery('#jform_authentication').removeAttr('required');
jQuery('#jform_authentication').removeAttr('aria-required');
jQuery('#jform_authentication').removeClass('required');
jform_vvvvwbyvxj_required = true;
jform_vvvvwbyvxi_required = true;
}
jQuery('#jform_host').closest('.control-group').hide();
// remove required attribute from host field
if (!jform_vvvvwbyvxk_required)
if (!jform_vvvvwbyvxj_required)
{
updateFieldRequired('host',1);
jQuery('#jform_host').removeAttr('required');
jQuery('#jform_host').removeAttr('aria-required');
jQuery('#jform_host').removeClass('required');
jform_vvvvwbyvxk_required = true;
jform_vvvvwbyvxj_required = true;
}
jQuery('#jform_port').closest('.control-group').hide();
// remove required attribute from port field
if (!jform_vvvvwbyvxl_required)
if (!jform_vvvvwbyvxk_required)
{
updateFieldRequired('port',1);
jQuery('#jform_port').removeAttr('required');
jQuery('#jform_port').removeAttr('aria-required');
jQuery('#jform_port').removeClass('required');
jform_vvvvwbyvxl_required = true;
jform_vvvvwbyvxk_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
// remove required attribute from path field
if (!jform_vvvvwbyvxm_required)
if (!jform_vvvvwbyvxl_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
jform_vvvvwbyvxm_required = true;
jform_vvvvwbyvxl_required = true;
}
jQuery('.note_ssh_security').closest('.control-group').hide();
jQuery('#jform_username').closest('.control-group').hide();
// remove required attribute from username field
if (!jform_vvvvwbyvxn_required)
if (!jform_vvvvwbyvxm_required)
{
updateFieldRequired('username',1);
jQuery('#jform_username').removeAttr('required');
jQuery('#jform_username').removeAttr('aria-required');
jQuery('#jform_username').removeClass('required');
jform_vvvvwbyvxn_required = true;
jform_vvvvwbyvxm_required = true;
}
}
}
@ -205,13 +205,13 @@ function vvvvwbz(protocol_vvvvwbz)
jQuery('.note_ftp_signature').closest('.control-group').show();
jQuery('#jform_signature').closest('.control-group').show();
// add required attribute to signature field
if (jform_vvvvwbzvxo_required)
if (jform_vvvvwbzvxn_required)
{
updateFieldRequired('signature',0);
jQuery('#jform_signature').prop('required','required');
jQuery('#jform_signature').attr('aria-required',true);
jQuery('#jform_signature').addClass('required');
jform_vvvvwbzvxo_required = false;
jform_vvvvwbzvxn_required = false;
}
}
else
@ -219,13 +219,13 @@ function vvvvwbz(protocol_vvvvwbz)
jQuery('.note_ftp_signature').closest('.control-group').hide();
jQuery('#jform_signature').closest('.control-group').hide();
// remove required attribute from signature field
if (!jform_vvvvwbzvxo_required)
if (!jform_vvvvwbzvxn_required)
{
updateFieldRequired('signature',1);
jQuery('#jform_signature').removeAttr('required');
jQuery('#jform_signature').removeAttr('aria-required');
jQuery('#jform_signature').removeClass('required');
jform_vvvvwbzvxo_required = true;
jform_vvvvwbzvxn_required = true;
}
}
}
@ -274,26 +274,26 @@ function vvvvwca(protocol_vvvvwca,authentication_vvvvwca)
{
jQuery('#jform_password').closest('.control-group').show();
// add required attribute to password field
if (jform_vvvvwcavxp_required)
if (jform_vvvvwcavxo_required)
{
updateFieldRequired('password',0);
jQuery('#jform_password').prop('required','required');
jQuery('#jform_password').attr('aria-required',true);
jQuery('#jform_password').addClass('required');
jform_vvvvwcavxp_required = false;
jform_vvvvwcavxo_required = false;
}
}
else
{
jQuery('#jform_password').closest('.control-group').hide();
// remove required attribute from password field
if (!jform_vvvvwcavxp_required)
if (!jform_vvvvwcavxo_required)
{
updateFieldRequired('password',1);
jQuery('#jform_password').removeAttr('required');
jQuery('#jform_password').removeAttr('aria-required');
jQuery('#jform_password').removeClass('required');
jform_vvvvwcavxp_required = true;
jform_vvvvwcavxo_required = true;
}
}
}
@ -353,26 +353,26 @@ function vvvvwcc(protocol_vvvvwcc,authentication_vvvvwcc)
{
jQuery('#jform_private').closest('.control-group').show();
// add required attribute to private field
if (jform_vvvvwccvxq_required)
if (jform_vvvvwccvxp_required)
{
updateFieldRequired('private',0);
jQuery('#jform_private').prop('required','required');
jQuery('#jform_private').attr('aria-required',true);
jQuery('#jform_private').addClass('required');
jform_vvvvwccvxq_required = false;
jform_vvvvwccvxp_required = false;
}
}
else
{
jQuery('#jform_private').closest('.control-group').hide();
// remove required attribute from private field
if (!jform_vvvvwccvxq_required)
if (!jform_vvvvwccvxp_required)
{
updateFieldRequired('private',1);
jQuery('#jform_private').removeAttr('required');
jQuery('#jform_private').removeAttr('aria-required');
jQuery('#jform_private').removeClass('required');
jform_vvvvwccvxq_required = true;
jform_vvvvwccvxp_required = true;
}
}
}
@ -432,26 +432,26 @@ function vvvvwce(protocol_vvvvwce,authentication_vvvvwce)
{
jQuery('#jform_private_key').closest('.control-group').show();
// add required attribute to private_key field
if (jform_vvvvwcevxr_required)
if (jform_vvvvwcevxq_required)
{
updateFieldRequired('private_key',0);
jQuery('#jform_private_key').prop('required','required');
jQuery('#jform_private_key').attr('aria-required',true);
jQuery('#jform_private_key').addClass('required');
jform_vvvvwcevxr_required = false;
jform_vvvvwcevxq_required = false;
}
}
else
{
jQuery('#jform_private_key').closest('.control-group').hide();
// remove required attribute from private_key field
if (!jform_vvvvwcevxr_required)
if (!jform_vvvvwcevxq_required)
{
updateFieldRequired('private_key',1);
jQuery('#jform_private_key').removeAttr('required');
jQuery('#jform_private_key').removeAttr('aria-required');
jQuery('#jform_private_key').removeClass('required');
jform_vvvvwcevxr_required = true;
jform_vvvvwcevxq_required = true;
}
}
}